diff --git a/fees/dextools.ts b/fees/dextools.ts index cd22f94804..e478dee0c9 100644 --- a/fees/dextools.ts +++ b/fees/dextools.ts @@ -34,7 +34,7 @@ For Tokens created with https://creator.dextools.io, enter "//TOKENCREATOR//" as import { Adapter, FetchOptions } from "../adapters/types"; import { CHAIN } from "../helpers/chains"; -import { evmReceivedGasAndTokens, getSolanaReceived } from '../helpers/token'; +import { addTokensReceived, evmReceivedGasAndTokens, getETHReceived, getSolanaReceived } from '../helpers/token'; const tokens = { ethereum: [ @@ -47,13 +47,31 @@ const tokens = { } as any const target_even: any = { - [CHAIN.ETHEREUM]: '0x4f62c60468A8F4291fec23701A73a325b2540765', - [CHAIN.BSC]: '0x997Cc123cF292F46E55E6E63e806CD77714DB70f', - [CHAIN.BASE]: '0x997Cc123cF292F46E55E6E63e806CD77714DB70f', + [CHAIN.ETHEREUM]: [ + '0x4f62c60468A8F4291fec23701A73a325b2540765', + '0x501424D3F63F30c119cBAE88de531c80D8a93f6B', + '0x96c195F6643A3D797cb90cb6BA0Ae2776D51b5F3', + '0xDeb2FD0a2870Df5eBDC1462E1725B0a30FbB49A3' + ], + [CHAIN.BSC]: ['0x997Cc123cF292F46E55E6E63e806CD77714DB70f'], + [CHAIN.BASE]: ['0x997Cc123cF292F46E55E6E63e806CD77714DB70f'], } const sol = async (options: FetchOptions) => { - const dailyFees = await getSolanaReceived({ options, target: '4sdKYA9NLD1XHThXGPTmFE973mNs1UeVkCH4dFL3Wgho' }) + const dailyFees = await getSolanaReceived({ options, targets:[ + '4sdKYA9NLD1XHThXGPTmFE973mNs1UeVkCH4dFL3Wgho', + 'e24SXSTq1AkusXQEKgZW389taxTTzSuGF8JQqjhbTfc', + 'Hz77efVEvgUHUN55WAY97BiEEFg3DbgYBiCNo4UrQx9r' + ]}) + return { dailyFees, dailyRevenue: dailyFees, } +} + +const fetchEvm = async (options: FetchOptions) => { + const dailyFees = options.createBalances(); + if (tokens[options.chain].length > 0) { + await addTokensReceived({ options, tokens: tokens, targets: target_even[options.chain], balances: dailyFees }) + } + await getETHReceived({ options, balances: dailyFees, targets: target_even[options.chain] }) return { dailyFees, dailyRevenue: dailyFees, } } @@ -63,8 +81,8 @@ const adapter: Adapter = { adapter: [CHAIN.ETHEREUM, CHAIN.BASE, CHAIN.BSC].reduce((all, chain) => ({ ...all, [chain]: { - fetch: evmReceivedGasAndTokens(target_even[chain], tokens[chain]), - } + fetch: fetchEvm, + } }), { [CHAIN.SOLANA]: { fetch: sol,