Skip to content

Commit

Permalink
Merge pull request #698 from joehquak/master
Browse files Browse the repository at this point in the history
Feat: Add `Base` (Coinbase) Network to `Sobal` for Fees & Dexs
  • Loading branch information
dtmkeng authored Aug 3, 2023
2 parents dd11bc4 + 178c43f commit dcce951
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dexs/sobal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Chain } from "@defillama/sdk/build/general";

const endpoints: ChainEndpoints = {
[CHAIN.NEON]: "https://neon-subgraph.sobal.fi/sobal-pools",
[CHAIN.BASE]: "https://api.studio.thegraph.com/query/50526/sobal-base/version/latest",
};

const graphParams = {
Expand All @@ -27,6 +28,11 @@ const adapter: SimpleAdapter = {
fetch: graphs(CHAIN.NEON),
start: async () => 1689613200, // 17TH JULY 5PM GMT
customBackfill: customBackfill(CHAIN.NEON as Chain, graphs),
},
[CHAIN.BASE]: {
fetch: graphs(CHAIN.BASE),
start: async () => 1690850000, // 1ST AUG 12:33 AM GMT
customBackfill: customBackfill(CHAIN.BASE as Chain, graphs),
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions fees/sobal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getTimestampAtStartOfDayUTC } from "../utils/date";
const v2Endpoints = {
[CHAIN.NEON]:
"https://neon-subgraph.sobal.fi/sobal-pools",
[CHAIN.BASE]: "https://api.studio.thegraph.com/query/50526/sobal-base/version/latest",
};

const v2Graphs = (graphUrls: ChainEndpoints) => {
Expand Down Expand Up @@ -72,6 +73,13 @@ const adapter: SimpleAdapter = {
meta: {
methodology
}
},
[CHAIN.BASE]: {
fetch: v2Graphs(v2Endpoints)(CHAIN.BASE),
start: async () => 1690850000, // 1ST AUG 12:33 AM GMT
meta: {
methodology
}
}
}
}
Expand Down

0 comments on commit dcce951

Please sign in to comment.