From 0e7db8a70fe51da5284bdb9f3c42b3fe146cf6b1 Mon Sep 17 00:00:00 2001 From: johngrantuk Date: Thu, 3 Aug 2023 11:49:39 +0100 Subject: [PATCH] Update avax connecting config for examples. --- test/testScripts/constants.ts | 25 +++++++++++++++++++++++++ test/testScripts/swapExample.ts | 10 +++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/test/testScripts/constants.ts b/test/testScripts/constants.ts index ad663f8e..a30d0d0b 100644 --- a/test/testScripts/constants.ts +++ b/test/testScripts/constants.ts @@ -130,6 +130,16 @@ export const SOR_CONFIG: Record = { chainId: Network.AVALANCHE, vault: '0xBA12222222228d8Ba445958a75a0704d566BF2C8', weth: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7', + connectingTokens: [ + { + symbol: 'WAVAX', + address: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7', + }, + { + symbol: 'sAVAX', + address: '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be', + }, + ], }, }; @@ -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, diff --git a/test/testScripts/swapExample.ts b/test/testScripts/swapExample.ts index 7d242a2b..0a342651 100644 --- a/test/testScripts/swapExample.ts +++ b/test/testScripts/swapExample.ts @@ -65,10 +65,14 @@ export async function swap(): Promise { 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);