Skip to content

Commit

Permalink
Merge pull request #415 from balancer/gnosis-constants
Browse files Browse the repository at this point in the history
Add Gnosis constants and 3POOL/wstETH midpool.
  • Loading branch information
John Grant authored Aug 31, 2023
2 parents f8077cd + 92cbb55 commit feaae58
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions test/testScripts/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ export const SOR_CONFIG: Record<Network, SorConfig> = {
symbol: 'weth',
address: '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1',
},
{
symbol: 'wsteth',
address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6',
},
],
triPathMidPoolIds: [
'0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059', // 3POOL_BPT/wstETH
],
},
[Network.ZKEVM]: {
Expand Down Expand Up @@ -522,6 +529,16 @@ export const ADDRESSES = {
decimals: 6,
symbol: 'USDT',
},
wstETH: {
address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6',
decimals: 18,
symbol: 'wstETH',
},
STETH: {
address: 'todo',
decimals: 18,
symbol: 'STETH',
},
},
[Network.GOERLI]: {
DAI: {
Expand Down
8 changes: 4 additions & 4 deletions test/testScripts/swapExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ function setUp(networkId: Network, provider: JsonRpcProvider): SOR {
}

export async function swap(): Promise<void> {
const networkId = Network.BASE;
const networkId = Network.GNOSIS;
const provider = new JsonRpcProvider(PROVIDER_URLS[networkId]);
// gasPrice is used by SOR as a factor to determine how many pools to swap against.
// i.e. higher cost means more costly to trade against lots of different pools.
const gasPrice = BigNumber.from('14000000000');
// This determines the max no of pools the SOR will use to swap.
const maxPools = 4;
const tokenIn = ADDRESSES[networkId].DAI;
const tokenOut = ADDRESSES[networkId].BALD;
const tokenIn = ADDRESSES[networkId].WXDAI;
const tokenOut = ADDRESSES[networkId].WETH;
const swapType: SwapTypes = SwapTypes.SwapExactIn;
const swapAmount = parseFixed('900', 18);
const swapAmount = parseFixed('20000', 18);

const sor = setUp(networkId, provider);

Expand Down

0 comments on commit feaae58

Please sign in to comment.