Skip to content

Commit

Permalink
add Gnosis 3POOL_BPT/wstETH pool to mid pool ids.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Aug 31, 2023
1 parent a56a2fa commit 2ad1a80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions balancer-js/examples/swaps/advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Run command:
* yarn example ./examples/swaps/advanced.ts
*/
import { FORK_NODES } from '@/test/lib/utils';
import {
BalancerSDK,
Network,
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions balancer-js/src/lib/constants/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ export const BALANCER_NETWORK_CONFIG: Record<Network, BalancerNetworkConfig> = {
address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6',
},
],
sorTriPathMidPoolIds: [
'0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059', // 3POOL_BPT/wstETH
],
},
[Network.FANTOM]: {
chainId: Network.FANTOM, //250
Expand Down
1 change: 1 addition & 0 deletions balancer-js/src/test/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export const FORK_NODES: Record<number, string> = {
[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}`,
};

/**
Expand Down

0 comments on commit 2ad1a80

Please sign in to comment.