Skip to content

Commit

Permalink
update houdini-swap fees
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Aug 20, 2024
1 parent f56b300 commit e22c6da
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions fees/houdini-swap.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import { Chain } from "@defillama/sdk/build/general"
import { Chain } from "@defillama/sdk/build/general";
import { CHAIN } from "../helpers/chains";
import { Adapter, FetchOptions, FetchResultFees } from "../adapters/types";
import { queryIndexer } from "../helpers/indexer";
import { addTokensReceived } from "../helpers/token";

const graph = (_chain: Chain): any => {
return async (timestamp: number, _: any, options: FetchOptions): Promise<FetchResultFees> => {
const dailyFees = options.createBalances();
const query = await queryIndexer(`
SELECT value FROM ethereum.transactions
WHERE block_number > 16416220
and to_address = '\\xc36d36dd4a45f8817a49d3751557fec9871f0e32'
and success = true
and encode(data, 'hex') = ''
AND block_time BETWEEN llama_replace_date_range;
`, options);
query.map((a: any) => dailyFees.addGasToken(a.value))
const dailyFees = await addTokensReceived({target: '0x45CF73349a4895fabA18c0f51f06D79f0794898D', tokens: ['0x922d8563631b03c2c4cf817f4d18f6883aba0109'], options})
return { dailyFees, dailyRevenue: dailyFees, dailyHoldersRevenue: dailyFees, timestamp }
}
}
Expand Down

0 comments on commit e22c6da

Please sign in to comment.