Skip to content

Commit

Permalink
photon fees
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Aug 13, 2024
1 parent c468cda commit 4a28003
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions fees/photon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { FetchOptions, SimpleAdapter } from "../adapters/types";
import { CHAIN } from "../helpers/chains";
import { queryDune } from "../helpers/dune";

const fetch: any = async (options: FetchOptions) => {
const dailyFees = options.createBalances();
const value = (await queryDune("3521814", {
start: options.startTimestamp,
end: options.endTimestamp,
receiver: 'AVUCZyuT35YSuj4RH7fwiyPu82Djn2Hfg7y2ND2XcnZH'
}));
dailyFees.add('So11111111111111111111111111111111111111112', value[0].fee_token_amount);

return { dailyFees, dailyRevenue: dailyFees }

}

const adapter: SimpleAdapter = {
version: 2,
adapter: {
[CHAIN.SOLANA]: {
fetch: fetch,
start: 0,
},
},
isExpensiveAdapter: true
};

export default adapter;

0 comments on commit 4a28003

Please sign in to comment.