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

Update avax connecting config for examples. #410

Merged
merged 1 commit into from
Aug 3, 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
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
Loading