Skip to content

Commit

Permalink
add savmswap
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Apr 3, 2024
1 parent 0a7ce3c commit b93fb92
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
11 changes: 11 additions & 0 deletions dexs/savmswap/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { CHAIN } from "../../helpers/chains";
import { univ2Adapter } from "../../helpers/getUniSubgraphVolume";

const adapter = univ2Adapter({
[CHAIN.SVM]: "https://subgraph.8gr.xyz/subgraphs/name/savmswap/savmswap",
}, {
hasTotalVolume: false,
});

adapter.adapter.svm.start = 1711411200
export default adapter
3 changes: 2 additions & 1 deletion helpers/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ export enum CHAIN {
FRAXTAL = "fraxtal",
IMX = "imx",
KROMA = "kroma",
ZORA = "zora"
ZORA = "zora",
SVM = "svm",
}

// Don´t use
Expand Down
4 changes: 2 additions & 2 deletions helpers/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const BOOL_KEYS = [

const DEFAULTS: any = {
ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01',
ZETA_RPC: "https://zetachain-evm.blockpi.network/v1/rpc/public,https://zetachain-mainnet-archive.allthatnode.com:8545"
ZETA_RPC: "https://zetachain-evm.blockpi.network/v1/rpc/public,https://zetachain-mainnet-archive.allthatnode.com:8545",
SVM_RPC: "https://rpc.cosvm.net"
}

export const ENV_KEYS = new Set([
Expand Down Expand Up @@ -38,4 +39,3 @@ export function getEnv(key: string): any {
const value = process.env[key] ?? DEFAULTS[key]
return BOOL_KEYS.includes(key) ? !!value : value
}

0 comments on commit b93fb92

Please sign in to comment.