Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Gnosis 3POOL_BPT/wstETH pool to mid pool ids. #533

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading