diff --git a/balancer-js/examples/swaps/advanced.ts b/balancer-js/examples/swaps/advanced.ts index f08c68790..f0b80fb0a 100644 --- a/balancer-js/examples/swaps/advanced.ts +++ b/balancer-js/examples/swaps/advanced.ts @@ -6,6 +6,7 @@ * Run command: * yarn example ./examples/swaps/advanced.ts */ +import { FORK_NODES } from '@/test/lib/utils'; import { BalancerSDK, Network, @@ -119,12 +120,12 @@ async function getAndProcessSwaps( } async function swapExample() { - const network = Network.MAINNET; - const rpcUrl = 'https://rpc.ankr.com/polygon'; - const tokenIn = AddressZero; // stMatic - const tokenOut = '0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4'; // Matic + const network = Network.GNOSIS; + const rpcUrl = FORK_NODES[network]; + const tokenIn = '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d'; + const tokenOut = '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1'; const swapType = SwapTypes.SwapExactIn; - const amount = parseFixed('1', 18); + const amount = parseFixed('20000', 18); // Currently Relayer only suitable for ExactIn and non-eth swaps const canUseJoinExitPaths = canUseJoinExit(swapType, tokenIn, tokenOut); diff --git a/balancer-js/src/lib/constants/config.ts b/balancer-js/src/lib/constants/config.ts index 9e6623443..e0a595ec0 100644 --- a/balancer-js/src/lib/constants/config.ts +++ b/balancer-js/src/lib/constants/config.ts @@ -305,6 +305,9 @@ export const BALANCER_NETWORK_CONFIG: Record = { address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6', }, ], + sorTriPathMidPoolIds: [ + '0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059', // 3POOL_BPT/wstETH + ], }, [Network.FANTOM]: { chainId: Network.FANTOM, //250 diff --git a/balancer-js/src/test/lib/utils.ts b/balancer-js/src/test/lib/utils.ts index 673080934..327e1ec6b 100644 --- a/balancer-js/src/test/lib/utils.ts +++ b/balancer-js/src/test/lib/utils.ts @@ -73,6 +73,7 @@ export const FORK_NODES: Record = { [Network.POLYGON]: `${process.env.ALCHEMY_URL_POLYGON}`, [Network.ARBITRUM]: `${process.env.ALCHEMY_URL_ARBITRUM}`, [Network.ZKEVM]: `${process.env.ALCHEMY_URL_ZKEVM}`, + [Network.GNOSIS]: `${process.env.RPC_URL_GNOSIS}`, }; /**