File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { FetchOptions , SimpleAdapter } from "../../adapters/types" ;
2
+ import { CHAIN } from "../../helpers/chains" ;
3
+ import { DEFAULT_TOTAL_VOLUME_FIELD , getGraphDimensions2 } from "../../helpers/getUniSubgraph" ;
4
+
5
+ const v3Endpoints : { [ key : string ] : string } = {
6
+ [ CHAIN . BERACHAIN ] : "https://api.studio.thegraph.com/query/92670/berav3/version/latest"
7
+ }
8
+ const v3Graphs = getGraphDimensions2 ( {
9
+ graphUrls : v3Endpoints ,
10
+ totalVolume : {
11
+ factory : "factories" ,
12
+ field : DEFAULT_TOTAL_VOLUME_FIELD ,
13
+ } ,
14
+ feesPercent : {
15
+ type : "fees" ,
16
+ ProtocolRevenue : 0 ,
17
+ HoldersRevenue : 0 ,
18
+ UserFees : 100 , // User fees are 100% of collected fees
19
+ SupplySideRevenue : 100 , // 100% of fees are going to LPs
20
+ Revenue : 0 // Revenue is 100% of collected fees
21
+ }
22
+ } ) ;
23
+
24
+
25
+ const adapters : SimpleAdapter = {
26
+ version : 2 ,
27
+ adapter : {
28
+ [ CHAIN . BERACHAIN ] : {
29
+ fetch : ( options : FetchOptions ) => {
30
+ return v3Graphs ( options . chain ) ( options )
31
+ }
32
+ } ,
33
+ }
34
+ }
35
+
36
+
37
+ export default adapters ;
You can’t perform that action at this time.
0 commit comments