diff --git a/adapters/interport/src/index.ts b/adapters/interport/src/index.ts index fcfa8a5f..f84dbbc4 100644 --- a/adapters/interport/src/index.ts +++ b/adapters/interport/src/index.ts @@ -66,7 +66,7 @@ export const getUserTVLByBlock = async ( const holders = await getAllHolders(blockNumber); for (let i = 0; i < vaultsAddresses.length; i++) { - const {address, token_symbol} = vaultsAddresses[i]; + const {address, underlying_symbol, underlying} = vaultsAddresses[i]; const balanceReads: any[] = []; const farmReads: any[] = []; @@ -100,8 +100,8 @@ export const getUserTVLByBlock = async ( block_number: blockNumber, timestamp: blockTimestamp, user_address: Array.from(holders)[j].toLowerCase(), - token_address: address.toLowerCase(), - token_symbol: token_symbol, + token_address: underlying.toLowerCase(), + token_symbol: underlying_symbol, token_balance: userBalance + farmBalance, usd_price: 0, }); diff --git a/adapters/interport/src/utils/constants.ts b/adapters/interport/src/utils/constants.ts index 5090f44d..64a68b3e 100644 --- a/adapters/interport/src/utils/constants.ts +++ b/adapters/interport/src/utils/constants.ts @@ -3,12 +3,14 @@ export const iUSDC = '0x5b45B414c6CD2a3341bE70Ba22BE786b0124003F' export const stablecoinFarmAddress = "0x29d44c17f4f83b3c77ae2eac4bc1468a496e3196"; export const zeroAddress = "0x0000000000000000000000000000000000000000"; -export const vaultsAddresses: { address: `0x${string}`, token_symbol: string, start_block: bigint }[] = [ +type Address = `0x${string}`; + +export const vaultsAddresses: { address: Address, underlying_symbol: string, start_block: bigint, underlying: Address }[] = [ { - address: iUSDT, token_symbol: "iUSDC", start_block: 3041467n + address: iUSDT, underlying_symbol: "USDC", start_block: 3041467n, underlying: "0xa219439258ca9da29e9cc4ce5596924745e12b93" }, { - address: iUSDC, token_symbol: "iUSDT", start_block: 3041467n + address: iUSDC, underlying_symbol: "USDT", start_block: 3041467n, underlying: "0x176211869ca2b568f2a7d4ee941e073a821ee1ff" } ];