From 2b576ee176c3f313283451d1d4c15f97563c4186 Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Abou Hatem De Liz Date: Mon, 11 Sep 2023 10:17:07 -0300 Subject: [PATCH 1/2] Adding missing parameters to sdk.pools.buildExitExactBPTIn method; --- balancer-js/src/modules/pools/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/balancer-js/src/modules/pools/index.ts b/balancer-js/src/modules/pools/index.ts index 6c85014ab..d81a6b598 100644 --- a/balancer-js/src/modules/pools/index.ts +++ b/balancer-js/src/modules/pools/index.ts @@ -371,11 +371,15 @@ export class Pools implements Findable { bptAmount, userAddress, slippage, + shouldUnwrapNativeAsset, + singleTokenOut, }: { pool: Pool; bptAmount: string; userAddress: string; slippage: string; + shouldUnwrapNativeAsset?: boolean; + singleTokenOut?: string; }): ExitExactBPTInAttributes { const concerns = PoolTypeConcerns.from(pool.poolType); if (!concerns || !concerns.exit.buildExitExactBPTIn) @@ -388,7 +392,8 @@ export class Pools implements Findable { slippage, wrappedNativeAsset: this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(), - shouldUnwrapNativeAsset: false, + shouldUnwrapNativeAsset: shouldUnwrapNativeAsset ?? false, + singleTokenOut: singleTokenOut ?? undefined, toInternalBalance: false, }); } From 2dcbfb7d235d2285fd594bdd3a4c7cd133562733 Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Abou Hatem De Liz Date: Mon, 11 Sep 2023 18:36:42 -0300 Subject: [PATCH 2/2] Fixing tests for composable stable pools; --- .../composableStable/recovery.integration.spec.ts | 2 +- .../modules/pools/queries/queries.integration.spec.ts | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/balancer-js/src/modules/pools/pool-types/concerns/composableStable/recovery.integration.spec.ts b/balancer-js/src/modules/pools/pool-types/concerns/composableStable/recovery.integration.spec.ts index ce2daa630..6f41625a7 100644 --- a/balancer-js/src/modules/pools/pool-types/concerns/composableStable/recovery.integration.spec.ts +++ b/balancer-js/src/modules/pools/pool-types/concerns/composableStable/recovery.integration.spec.ts @@ -19,7 +19,7 @@ const { ALCHEMY_URL_POLYGON: jsonRpcUrl } = process.env; const rpcUrl = 'http://127.0.0.1:8137'; const provider = new ethers.providers.JsonRpcProvider(rpcUrl, network); const signer = provider.getSigner(); -const blockNumber = 46939238; +const blockNumber = 47427007; let balancer: BalancerSDK; describe('ComposableStable - recovery', () => { diff --git a/balancer-js/src/modules/pools/queries/queries.integration.spec.ts b/balancer-js/src/modules/pools/queries/queries.integration.spec.ts index efaf3be34..e4773efde 100644 --- a/balancer-js/src/modules/pools/queries/queries.integration.spec.ts +++ b/balancer-js/src/modules/pools/queries/queries.integration.spec.ts @@ -30,13 +30,12 @@ const balPool = { }; const composableStablePool = { - id: '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d', + id: '0x4edcb2b46377530bc18bb4d2c7fe46a992c73e100000000000000000000003ec', poolType: PoolType.ComposableStable, tokensList: [ - '0x2f4eb100552ef93840d5adc30560e5513dfffacb', - '0x82698aecc9e28e9bb27608bd52cf57f704bd1b83', - '0xa13a9247ea42d743238089903570127dda72fe44', - '0xae37d54ae477268b9997d4161b96b8200755935c', + '0x4edcb2b46377530bc18bb4d2c7fe46a992c73e10', + '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', + '0xbe9895146f7af43049ca1c1ae358b0541ea49704', ], };