diff --git a/dexs/vapordex/v1.ts b/dexs/vapordex/v1.ts index 3a5e82d51b..e57c514a59 100644 --- a/dexs/vapordex/v1.ts +++ b/dexs/vapordex/v1.ts @@ -2,10 +2,11 @@ import * as sdk from "@defillama/sdk"; import { CHAIN } from "../../helpers/chains"; import { univ2Adapter2 } from "../../helpers/getUniSubgraphVolume"; -const v1 = univ2Adapter2( +// Create AVAX adapter with custom fields +const avaxAdapter = univ2Adapter2( { [CHAIN.AVAX]: sdk.graph.modifyEndpoint( - "B6Tur5gXGCcswG8rEtmwfjBqeyDXCDUQSwM9wUXHoui5", + "B6Tur5gXGCcswG8rEtmwfjBqeyDXCDUQSwM9wUXHoui5" ), }, { @@ -14,8 +15,22 @@ const v1 = univ2Adapter2( dayData: "financialsDailySnapshot", dailyVolume: "dailyVolumeUSD", dailyVolumeTimestampField: "timestamp", + } +); + +const apechainAdapter = univ2Adapter2( + { + [CHAIN.APECHAIN]: + "https://api.goldsky.com/api/public/project_cloh4i8580dwo2nz7brhf4r6p/subgraphs/vapordex-v1-apechain/1.0.0/gn", }, + {} // Use default values ); -v1.adapter.avax.start = 1663545600; -export default v1.adapter; +const adapter = { + ...avaxAdapter.adapter, + ...apechainAdapter.adapter, +}; + +adapter.avax.start = 1663545600; +adapter.apechain.start = 2519744; +export default adapter; diff --git a/dexs/vapordex/v2.ts b/dexs/vapordex/v2.ts index 3fefd93614..0b8d92aa97 100644 --- a/dexs/vapordex/v2.ts +++ b/dexs/vapordex/v2.ts @@ -1,11 +1,18 @@ import { CHAIN } from "../../helpers/chains"; import { getUniV3LogAdapter } from "../../helpers/uniswap"; +const FACTORY = "0x62B672E531f8c11391019F6fba0b8B6143504169"; export default { [CHAIN.AVAX]: { fetch: getUniV3LogAdapter({ - factory: "0x62B672E531f8c11391019F6fba0b8B6143504169", + factory: FACTORY, }), - start: '2023-10-17', + start: "2023-10-17", }, -}; \ No newline at end of file + [CHAIN.APECHAIN]: { + fetch: getUniV3LogAdapter({ + factory: FACTORY, + }), + start: "2024-10-29", + }, +};