Skip to content

Commit 39afb32

Browse files
authored
feat: updated account source in carbon.inc dexs and fees adapter (#4563)
1 parent 5be1fbf commit 39afb32

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

dexs/carbon/index.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
import request, { gql } from "graphql-request";
2-
import { FetchOptions, FetchResultVolume, SimpleAdapter } from "../../adapters/types";
2+
import {
3+
FetchOptions,
4+
FetchResultVolume,
5+
SimpleAdapter,
6+
} from "../../adapters/types";
37
import { CHAIN } from "../../helpers/chains";
48

5-
const baseEndpoint = "https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-base-analytics-083/latest/gn";
9+
const baseEndpoint =
10+
"https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-base-analytics-083/latest/gn";
611

712
const queryBase = gql`
813
query stats($from: String!, $to: String!) {
914
dailyHistories(
10-
where: { timestamp_gte: $from, timestamp_lte: $to, accountSource: "0x8Ab178C07184ffD44F0ADfF4eA2ce6cFc33F3b86" }
15+
where: {
16+
timestamp_gte: $from
17+
timestamp_lte: $to
18+
accountSource: "0x39EcC772f6073242d6FD1646d81FA2D87fe95314"
19+
}
1120
) {
1221
tradeVolume
1322
}
@@ -20,7 +29,11 @@ interface IGraphResponse {
2029
}>;
2130
}
2231

23-
const fetch = async (_a: any, _b: any, options: FetchOptions): Promise<FetchResultVolume> => {
32+
const fetch = async (
33+
_a: any,
34+
_b: any,
35+
options: FetchOptions
36+
): Promise<FetchResultVolume> => {
2437
const response: IGraphResponse = await request(baseEndpoint, queryBase, {
2538
from: String(options.startTimestamp),
2639
to: String(options.endTimestamp),

fees/carbon/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ import request, { gql } from "graphql-request";
22
import { FetchOptions, SimpleAdapter } from "../../adapters/types";
33
import { CHAIN } from "../../helpers/chains";
44

5-
const endpoint = "https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-base-analytics-083/latest/gn";
5+
const endpoint =
6+
"https://api.goldsky.com/api/public/project_cm0bho0j0ji6001t8e26s0wv8/subgraphs/intentx-base-analytics-083/latest/gn";
67

78
const query = gql`
89
query stats($from: String!, $to: String!) {
910
dailyHistories(
10-
where: { timestamp_gte: $from, timestamp_lte: $to, accountSource: "0x8Ab178C07184ffD44F0ADfF4eA2ce6cFc33F3b86" }
11+
where: {
12+
timestamp_gte: $from
13+
timestamp_lte: $to
14+
accountSource: "0x39EcC772f6073242d6FD1646d81FA2D87fe95314"
15+
}
1116
) {
1217
platformFee
1318
}
@@ -42,7 +47,7 @@ const fetch = async (_a: any, _b: any, options: FetchOptions) => {
4247
const methodology = {
4348
Fees: "Trading fee paid by the user.",
4449
Revenue: "Trading fees collected from the users.",
45-
}
50+
};
4651

4752
const adapter: SimpleAdapter = {
4853
version: 1,

0 commit comments

Comments
 (0)