Skip to content

Commit

Permalink
add thegraph
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Aug 18, 2024
1 parent 8ff83e2 commit af4672b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions fees/dexscreener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const eth = async (options: FetchOptions) => {
}
}

// TODO: check whether 5qR17nnyyBjoHPiGiAD4ZHFCSJixebJCYymArGgZiDnh was an older address where they received payments
const sol = async (options: FetchOptions) => {
const dailyFees = options.createBalances();
const value = (await queryDune("3986808", {
Expand Down
25 changes: 25 additions & 0 deletions fees/thegraph.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Adapter, FetchOptions, } from "../adapters/types";
import { CHAIN } from "../helpers/chains";

const adapter: Adapter = {
version: 2,
adapter: {
[CHAIN.ARBITRUM]: {
fetch: (async (options: FetchOptions) => {
const dailyFees = options.createBalances();
const logs = await options.getLogs({
targets: ['0x1B07D3344188908Fb6DEcEac381f3eE63C48477a'],
eventAbi: "event TokensPulled(address indexed user,uint256 amount)",
})
logs.map((tx: any) => {
dailyFees.add("0x9623063377ad1b27544c965ccd7342f7ea7e88c7", tx.amount)
})
return { dailyFees, dailyRevenue: dailyFees, }
}) as any,
start: 0
},
},

}

export default adapter;

0 comments on commit af4672b

Please sign in to comment.