Skip to content

Commit

Permalink
vertex supports sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
yruej301 committed Jan 17, 2025
1 parent 9cecc29 commit a267dfd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dexs/vertex-protocol/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const archiveSeiUrl = "https://archive.sei-prod.vertexprotocol.com/v1";
const gatewayBaseUrl = "https://gateway.base-prod.vertexprotocol.com/v1";
const archiveBaseUrl = "https://archive.base-prod.vertexprotocol.com/v1";

const gatewaySonicUrl = "https://gateway.base-prod.vertexprotocol.com/v1";
const archiveSonicUrl = "https://archive.base-prod.vertexprotocol.com/v1";

type TURL = {
[s: string]: {
gateway: string;
Expand All @@ -43,6 +46,10 @@ const url: TURL = {
gateway: gatewaySeiUrl,
archive: archiveSeiUrl,
},
[CHAIN.SONIC]: {
gateway: gatewaySonicUrl,
archive: archiveSonicUrl
}
};

const fetchValidSymbols = async (
Expand Down Expand Up @@ -140,6 +147,7 @@ const fetchPerps = async (
const startTime = 1682514000;
const seiStartTime = 1723547681;
const baseStartTime = 1725476671;
const sonicStartTime = 1734543997;

const adapter: BreakdownAdapter = {
breakdown: {
Expand All @@ -160,6 +168,10 @@ const adapter: BreakdownAdapter = {
fetch: fetchSpots,
start: baseStartTime,
},
[CHAIN.SONIC]: {
fetch: fetchSpots,
start: sonicStartTime,
}
},
derivatives: {
[CHAIN.ARBITRUM]: {
Expand All @@ -178,6 +190,10 @@ const adapter: BreakdownAdapter = {
fetch: fetchPerps,
start: baseStartTime,
},
[CHAIN.SONIC]: {
fetch: fetchPerps,
start: sonicStartTime
}
},
},
};
Expand Down

0 comments on commit a267dfd

Please sign in to comment.