Skip to content

Commit

Permalink
Merge pull request #1665 from DefiLlama/uniswap-v3-more-chain
Browse files Browse the repository at this point in the history
Uniswap v3 more chain
  • Loading branch information
dtmkeng committed Jul 11, 2024
2 parents b6a3976 + c6ad615 commit f7f1247
Showing 1 changed file with 85 additions and 1 deletion.
86 changes: 85 additions & 1 deletion protocols/uniswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ interface ISeiResponse {
}
const fetchSei = async (options: FetchOptions) => {
try {
const url = `https://omni.icarus.tools/${options.chain}/cush/analyticsProtocolHistoric`;
const url = `https://omni.icarus.tools/${mappingChain(options.chain)}/cush/analyticsProtocolHistoric`;
const body = {
"params": [
options.startTimestamp * 1000, //start
Expand All @@ -327,6 +327,11 @@ const fetchSei = async (options: FetchOptions) => {
return {}
}
}
const mappingChain = (chain: string) => {
if (chain === CHAIN.ERA) return "zksync"
if (chain === CHAIN.ROOTSTOCK) return "rootstock"
return chain
}

adapter.breakdown.v3[CHAIN.SEI] = {
fetch: fetchSei,
Expand All @@ -335,5 +340,84 @@ adapter.breakdown.v3[CHAIN.SEI] = {
methodology
}
}
adapter.breakdown.v3[CHAIN.ERA] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.TAIKO] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.SCROLL] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.ROOTSTOCK] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.FILECOIN] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.BOBA] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.MOONBEAM] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.MANTA] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.MANTLE] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

adapter.breakdown.v3[CHAIN.LINEA] = {
fetch: fetchSei,
start: 0,
meta: {
methodology
}
}

export default adapter;

0 comments on commit f7f1247

Please sign in to comment.