Skip to content

Commit

Permalink
fix silverswap import
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Feb 19, 2025
1 parent dab16ef commit 448f91c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
26 changes: 5 additions & 21 deletions dexs/silverswap.ts → dexs/silverswap/getAlgebraData.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as sdk from "@defillama/sdk";
import { SimpleAdapter } from "../adapters/types";
import { CHAIN } from "../helpers/chains";
import { CHAIN } from "../../helpers/chains";
const { request, gql } = require("graphql-request");
import { getTimestampAtStartOfDayUTC } from "../utils/date";
import { getBlock } from "../helpers/getBlock";
import { getTimestampAtStartOfDayUTC } from "../../utils/date";
import { getBlock } from "../../helpers/getBlock";
import { Chain } from "@defillama/sdk/build/general";
import { FetchOptions } from "../adapters/types";
import { FetchOptions } from "../../adapters/types";

export const LINKS: { [key: string]: any } = {
[CHAIN.SONIC]: {
Expand Down Expand Up @@ -86,19 +85,4 @@ export const fetchFee = (chain: string) => {
totalUserFees: data.totalUserFees,
};
};
};


const adapter: SimpleAdapter = {
version: 2,
adapter: {
[CHAIN.SONIC]: {
fetch: fetchVolume,
start: "2024-12-07",

},
},
};
//
export default adapter;

};
17 changes: 17 additions & 0 deletions dexs/silverswap/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { fetchVolume } from "./getAlgebraData";
import { SimpleAdapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";

const adapter: SimpleAdapter = {
version: 2,
adapter: {
[CHAIN.SONIC]: {
fetch: fetchVolume,
start: "2024-12-07",

},
},
};
//
export default adapter;

2 changes: 1 addition & 1 deletion fees/silverswap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Adapter, } from "../adapters/types"
import { CHAIN } from "../helpers/chains"
import { fetchFee } from '../dexs/silverswap';
import { fetchFee } from '../dexs/silverswap/getAlgebraData';

const methodology = {
UserFees: "LPs collect 90% of the fee generated in a pool",
Expand Down

0 comments on commit 448f91c

Please sign in to comment.