Skip to content

Commit

Permalink
add new adapters for electroswap
Browse files Browse the repository at this point in the history
  • Loading branch information
realdealshaman committed Sep 13, 2024
1 parent 6790d32 commit 6c4e587
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions projects/electroswap-v2/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { getUniTVL } = require('../helper/unknownTokens')

module.exports={
etn: {
tvl: getUniTVL({ factory: '0x203D550ed6fA9dAB8A4190720CF9F65138abd15B', useDefaultCoreAssets: false }),
}
}
8 changes: 8 additions & 0 deletions projects/electroswap-v3/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { uniV3Export } = require("../helper/uniswapV3");

module.exports = uniV3Export({
etn: {
factory: "0xbF6Bcbe2be545135391777F3B4698be92E2EB8cA",
fromBlock: 1242016,
},
});
1 change: 1 addition & 0 deletions projects/helper/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"ethereumclassic",
"ethf",
"ethpow",
"etn",
"europa",
"everscale",
"evmos",
Expand Down
1 change: 1 addition & 0 deletions projects/helper/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const DEFAULTS = {
ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01',
RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/",
IDEX_RPC: "https://xchain-rpc.idex.io",
ETN_RPC: "https://rpc.ankr.com/electroneum"
}

const ENV_KEYS = [
Expand Down
4 changes: 4 additions & 0 deletions projects/helper/tokenMapping.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { decimals } = require('@defillama/sdk/build/erc20')
let coreAssets = require('./coreAssets.json')
const ADDRESSES = coreAssets
const nullAddress = ADDRESSES.null
Expand Down Expand Up @@ -127,6 +128,9 @@ const fixBalancesTokens = {
'0x6c76971f98945ae98dd7d4dfca8711ebea946ea6': { coingeckoId: "wrapped-steth", decimals: 18 },
'0xaf204776c7245bf4147c2612bf6e5972ee483701': { coingeckoId: "savings-dai", decimals: 18 },
},
etn: {
'0x138dafbda0ccb3d8e39c19edb0510fc31b7c1c77': { coingeckoId: "electroneum", decimals: 18 }
}
}

ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) })
Expand Down

0 comments on commit 6c4e587

Please sign in to comment.