Skip to content

Commit

Permalink
Merge pull request #410 from balancer/update-avax-connecting
Browse files Browse the repository at this point in the history
Update avax connecting config for examples.
  • Loading branch information
John Grant authored Aug 3, 2023
2 parents a987fb3 + 0e7db8a commit 8916afb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
25 changes: 25 additions & 0 deletions test/testScripts/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ export const SOR_CONFIG: Record<Network, SorConfig> = {
chainId: Network.AVALANCHE,
vault: '0xBA12222222228d8Ba445958a75a0704d566BF2C8',
weth: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
connectingTokens: [
{
symbol: 'WAVAX',
address: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
},
{
symbol: 'sAVAX',
address: '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',
},
],
},
};

Expand Down Expand Up @@ -526,6 +536,21 @@ export const ADDRESSES = {
decimals: 6,
symbol: 'USDC',
},
BETS: {
address: '0x94025780a1ab58868d9b2dbbb775f44b32e8e6e5',
decimals: 18,
symbol: 'BETS',
},
WAVAX: {
address: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
decimals: 6,
symbol: 'WAVAX',
},
sAVAX: {
address: '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',
decimals: 18,
symbol: 'sAVAX',
},
STETH: {
address: 'TOD',
decimals: 6,
Expand Down
10 changes: 7 additions & 3 deletions test/testScripts/swapExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ export async function swap(): Promise<void> {
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].USDC;
const tokenOut = ADDRESSES[networkId].EUROC;
const tokenIn = ADDRESSES[networkId].BETS;
const tokenOut = ADDRESSES[networkId].WAVAX;
const swapType: SwapTypes = SwapTypes.SwapExactIn;
const swapAmount = parseFixed('10', 6);
const swapAmount = parseFixed('1', 18);
// BETS -> https://snowtrace.io//address/0x94025780a1ab58868d9b2dbbb775f44b32e8e6e5 (18)
// BETS -> WAVAX https://snowtrace.io//address/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7 (18)
// BETS -> USDC ()
// via sAVAX: https://snowtrace.io//address/0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be (18)

const sor = setUp(networkId, provider);

Expand Down

0 comments on commit 8916afb

Please sign in to comment.