Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

satori add some chains #2480

Merged
merged 3 commits into from
Feb 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 136 additions & 1 deletion dexs/satori/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@ const arbitrum = {
const xlayer = {
"exchange":"xlayer"
}
const plume = {
"exchange":"plume"
}
const zircuit = {
"exchange":"zircuit"
}
const story = {
"exchange":"story"
}
const ethereum = {
"exchange":"ethereum"
}
const bsc = {
"exchange":"bsc"
}
const optimism = {
"exchange":"optimism"
}
const ton = {
"exchange":"ton"
}

const evm_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,zk_evm)).data;

Expand Down Expand Up @@ -105,6 +127,63 @@ const arbitrum_fetch = async (_timestamp: number) => {
};
};

const plume_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,plume)).data;

return {
totalVolume: volumeData.totalTradVol,
dailyVolume: volumeData.tradVol24h,
dailyFees: volumeData.fee24h,
dailyRevenue : volumeData.fee24h,
timestamp: parseInt(volumeData.time),
};
};

const zircuit_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,zircuit)).data;

return {
totalVolume: volumeData.totalTradVol,
dailyVolume: volumeData.tradVol24h,
dailyFees: volumeData.fee24h,
dailyRevenue : volumeData.fee24h,
timestamp: parseInt(volumeData.time),
};
};

const story_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,story)).data;

return {
totalVolume: volumeData.totalTradVol,
dailyVolume: volumeData.tradVol24h,
dailyFees: volumeData.fee24h,
dailyRevenue : volumeData.fee24h,
timestamp: parseInt(volumeData.time),
};
};
const ethereum_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,ethereum)).data;

return {
totalVolume: volumeData.totalTradVol,
dailyVolume: volumeData.tradVol24h,
dailyFees: volumeData.fee24h,
dailyRevenue : volumeData.fee24h,
timestamp: parseInt(volumeData.time),
};
};
const bsc_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,bsc)).data;

return {
totalVolume: volumeData.totalTradVol,
dailyVolume: volumeData.tradVol24h,
dailyFees: volumeData.fee24h,
dailyRevenue : volumeData.fee24h,
timestamp: parseInt(volumeData.time),
};
};
const xlayer_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,xlayer)).data;

Expand All @@ -116,7 +195,28 @@ const xlayer_fetch = async (_timestamp: number) => {
timestamp: parseInt(volumeData.time),
};
};

const ton_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,ton)).data;

return {
totalVolume: volumeData.totalTradVol,
dailyVolume: volumeData.tradVol24h,
dailyFees: volumeData.fee24h,
dailyRevenue : volumeData.fee24h,
timestamp: parseInt(volumeData.time),
};
};
const optimism_fetch = async (_timestamp: number) => {
const volumeData: VolumeInfo = (await postURL(DATA_URL,optimism)).data;

return {
totalVolume: volumeData.totalTradVol,
dailyVolume: volumeData.tradVol24h,
dailyFees: volumeData.fee24h,
dailyRevenue : volumeData.fee24h,
timestamp: parseInt(volumeData.time),
};
};
const adapter: SimpleAdapter = {
adapter: {
[CHAIN.POLYGON_ZKEVM]: {
Expand Down Expand Up @@ -153,6 +253,41 @@ const adapter: SimpleAdapter = {
fetch:xlayer_fetch,
runAtCurrTime: true,
start: 1684003134,
},
[CHAIN.PLUME]: {
fetch:plume_fetch,
runAtCurrTime: true,
start: 1684003134,
},
[CHAIN.ZIRCUIT]: {
fetch:zircuit_fetch,
runAtCurrTime: true,
start: 1684003134,
},
[CHAIN.STORY]: {
fetch:story_fetch,
runAtCurrTime: true,
start: 1684003134,
},
[CHAIN.ETHEREUM]: {
fetch:ethereum_fetch,
runAtCurrTime: true,
start: 1684003134,
},
[CHAIN.BSC]: {
fetch:bsc_fetch,
runAtCurrTime: true,
start: 1684003134,
},
[CHAIN.OPTIMISM]: {
fetch:optimism_fetch,
runAtCurrTime: true,
start: 1684003134,
},
[CHAIN.TON]: {
fetch:ton_fetch,
runAtCurrTime: true,
start: 1684003134,
}
},
};
Expand Down
Loading