Skip to content

Commit

Permalink
Remove runAtCurrTime flag from various adapters and update version fo…
Browse files Browse the repository at this point in the history
…r Arbitrum adapter
  • Loading branch information
g1nt0ki committed Feb 10, 2025
1 parent 5f85b30 commit caf060f
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 22 deletions.
4 changes: 0 additions & 4 deletions dexs/apollox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ const fetchTotalV2Volume = async (chain: Chain) => {
const adapter: SimpleAdapter = {
adapter: {
[CHAIN.BSC]: {
// runAtCurrTime: true,
fetch: async (timestamp) => {
const [v1, v2, totalV2Volume, { v1 : totalV1Volume }] = await Promise.all([
fetchV2Volume(CHAIN.BSC),
Expand All @@ -125,7 +124,6 @@ const adapter: SimpleAdapter = {
start: '2023-04-21',
},
[CHAIN.ARBITRUM]: {
// runAtCurrTime: true,
fetch: async (timestamp) => {
const [v2, totalVolume] = await Promise.all([
fetchV2Volume(CHAIN.ARBITRUM),
Expand All @@ -140,7 +138,6 @@ const adapter: SimpleAdapter = {
start: '2023-04-21',
},
[CHAIN.OP_BNB]: {
// runAtCurrTime: true,
fetch: async (timestamp) => {
const [v2, totalVolume] = await Promise.all([
fetchV2Volume('opbnb'),
Expand All @@ -155,7 +152,6 @@ const adapter: SimpleAdapter = {
start: '2023-04-21',
},
[CHAIN.BASE]: {
// runAtCurrTime: true,
fetch: async (timestamp) => {
const [v2, totalVolume] = await Promise.all([
fetchV2Volume(CHAIN.BASE),
Expand Down
8 changes: 2 additions & 6 deletions dexs/astroport/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ const adapter: SimpleAdapter = {
[DISABLED_ADAPTER_KEY]: disabledAdapter,
[CHAIN.TERRA]: {
fetch: async (timestamp: number) => {
return {
timestamp,
totalVolume: "32540550409.019516" // stop collect data on terra sinc 1653350400
}
throw new Error("Not implemented");
},
runAtCurrTime: true,
},
},
},
};

Expand Down
1 change: 0 additions & 1 deletion dexs/dydx-v4/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import fetchURL from "../../utils/fetchURL"
import { FetchResultVolume, SimpleAdapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";

const fetch = async (timestamp: number): Promise<FetchResultVolume> => {
const markets = (await fetchURL("https://indexer.dydx.trade/v4/perpetualMarkets")).markets;
Expand Down
1 change: 0 additions & 1 deletion fees/0x0dex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const adapter: Adapter = {
adapter: {
[ETHEREUM]: {
fetch,
runAtCurrTime: true,
start: '2023-05-29',
meta: {
methodology: {
Expand Down
5 changes: 2 additions & 3 deletions fees/arbitrum/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { queryIndexer } from "../../helpers/indexer";
const adapter: Adapter = {
adapter: {
[CHAIN.ARBITRUM]: {
fetch: (async (_t: number, _b: any, options: FetchOptions) => {
fetch: (async (options: FetchOptions) => {
const { getFromBlock, getToBlock, createBalances, } = options
const startblock = await getFromBlock()
const endblock = await getToBlock()
Expand Down Expand Up @@ -36,12 +36,11 @@ const adapter: Adapter = {

}) as any,
start: '2021-08-10',
runAtCurrTime: true,
},
},
isExpensiveAdapter: true,
protocolType: ProtocolType.CHAIN,
version: 1
version: 2
}

export default adapter;
1 change: 0 additions & 1 deletion fees/banana-gun-trading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const adapter: SimpleAdapter = {
},
[CHAIN.SOLANA]: {
fetch: fethcFeesSolana,
runAtCurrTime: true,
start: '2023-06-01',
},
[CHAIN.BLAST]: {
Expand Down
1 change: 0 additions & 1 deletion fees/osmosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const adapter: Adapter = {
adapter: {
[CHAIN.COSMOS]: {
fetch,
runAtCurrTime: true,
start: '2022-10-17',
},
},
Expand Down
1 change: 0 additions & 1 deletion helpers/aggregators/duneAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const getAdapter = (
...acc,
[chain]: {
fetch: fetch(chain),
runAtCurrTime: true,
start,
},
};
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion protocols/pancakeswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ const adapter: BreakdownAdapter = {
adapter.breakdown.v2[CHAIN.APTOS] = {
fetch: fetchVolume,
start: '2023-11-09',
// runAtCurrTime: true,
}

export default adapter;

0 comments on commit caf060f

Please sign in to comment.