mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-04-30 22:02:28 +08:00
Migrate vault assets from ethereum to silicon zkevm (#13410)
Co-authored-by: Juan Ignacio Ubeira <juani@balancerlabs.dev> Co-authored-by: Juan Ignacio Ubeira <juani@balancer.finance> Co-authored-by: Divyanshu Chauhan <53409372+divinit7@users.noreply.github.com> Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Co-authored-by: jan-magpie <155635960+jan-magpie@users.noreply.github.com> Co-authored-by: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com> Co-authored-by: Pekaz <afakafak@gmail.com>
This commit is contained in:
4
projects/fizzswap-v2/index.js
Normal file
4
projects/fizzswap-v2/index.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
const { uniTvlExports } = require('../helper/unknownTokens')
|
||||||
|
module.exports = uniTvlExports({
|
||||||
|
silicon_zk: '0xCB72354080A1d3B8A48425B889025d0799c52095'
|
||||||
|
})
|
||||||
35
projects/fizzswap-v3/index.js
Normal file
35
projects/fizzswap-v3/index.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
const ADDRESSES = require('../helper/coreAssets.json')
|
||||||
|
const { sumTokens2 } = require('../helper/unwrapLPs')
|
||||||
|
const { getLogs } = require('../helper/cache/getLogs')
|
||||||
|
|
||||||
|
async function v3Tvl(api) {
|
||||||
|
const factory = '0x2aeEC787Be499ef6f68e527B64FADF969D048042';
|
||||||
|
const WETH = '0xe66863b695a392507f5d68b6a7b8aa8218914059'.toLowerCase();
|
||||||
|
|
||||||
|
const fromBlock = 1;
|
||||||
|
const eventAbi = 'event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool, uint256 exid)';
|
||||||
|
const topics = [
|
||||||
|
'0x20a108faf9dc51ca2b459a109d08568e65a9cb87569b6b3a334c275d504ff94f',
|
||||||
|
];
|
||||||
|
|
||||||
|
const logs = await getLogs({
|
||||||
|
api,
|
||||||
|
target: factory,
|
||||||
|
topics,
|
||||||
|
fromBlock,
|
||||||
|
eventAbi,
|
||||||
|
onlyArgs: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
return sumTokens2({
|
||||||
|
api, ownerTokens: logs.map(i => {
|
||||||
|
return [[(i.token0.toLowerCase() == WETH) ? ADDRESSES.null : i.token0, i.token1], i.pool]
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
silicon_zk: {
|
||||||
|
tvl: v3Tvl,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -315,6 +315,7 @@
|
|||||||
"shido",
|
"shido",
|
||||||
"shimmer_evm",
|
"shimmer_evm",
|
||||||
"sifchain",
|
"sifchain",
|
||||||
|
"silicon_zk",
|
||||||
"smartbch",
|
"smartbch",
|
||||||
"solana",
|
"solana",
|
||||||
"sommelier",
|
"sommelier",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const DEFAULTS = {
|
|||||||
ABSTRACT_RPC: "https://api.mainnet.abs.xyz",
|
ABSTRACT_RPC: "https://api.mainnet.abs.xyz",
|
||||||
BERACHAIN_RPC: "https://rpc.berachain.com",
|
BERACHAIN_RPC: "https://rpc.berachain.com",
|
||||||
BERACHAIN_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
BERACHAIN_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
||||||
|
SILICON_ZK_RPC_MULTICALL: "0x566da61a4D0841a67bA8F2c7e5975885fa0Af4DA",
|
||||||
}
|
}
|
||||||
|
|
||||||
const ENV_KEYS = [
|
const ENV_KEYS = [
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ const fixBalancesTokens = {
|
|||||||
aptos: {
|
aptos: {
|
||||||
'0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b': { coingeckoId: "usd-coin", decimals: 6 },
|
'0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b': { coingeckoId: "usd-coin", decimals: 6 },
|
||||||
},
|
},
|
||||||
|
silicon_zk: {
|
||||||
|
'0x0000000000000000000000000000000000000000': { coingeckoId: "ethereum", decimals: 18 },
|
||||||
|
'0xe66863b695a392507f5d68b6a7b8aa8218914059': { coingeckoId: "ethereum", decimals: 18 },
|
||||||
|
'0x1e4a5963abfd975d8c9021ce480b42188849d41d': { coingeckoId: "tether", decimals: 18 },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) })
|
ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) })
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ const vaults = {
|
|||||||
klaytn: '0x9abc3f6c11dbd83234d6e6b2c373dfc1893f648d',
|
klaytn: '0x9abc3f6c11dbd83234d6e6b2c373dfc1893f648d',
|
||||||
polygon: '0x506DC4c6408813948470a06ef6e4a1DaF228dbd5',
|
polygon: '0x506DC4c6408813948470a06ef6e4a1DaF228dbd5',
|
||||||
meta: '0x292A00F3b99e3CB9b324EdbaA92258C3C61b55ab',
|
meta: '0x292A00F3b99e3CB9b324EdbaA92258C3C61b55ab',
|
||||||
wemix: '0x445F863df0090f423A6D7005581e30d5841e4D6d'
|
wemix: '0x445F863df0090f423A6D7005581e30d5841e4D6d',
|
||||||
|
silicon_zk: '0x5aAAcf28ECDd691b4a657684135d8848d38236Bb'
|
||||||
}
|
}
|
||||||
|
|
||||||
const farms = {
|
const farms = {
|
||||||
@@ -48,6 +49,7 @@ async function tvl(api) {
|
|||||||
let targetChain = chain
|
let targetChain = chain
|
||||||
if (chain === 'ethereum') targetChain = 'eth'
|
if (chain === 'ethereum') targetChain = 'eth'
|
||||||
if (chain === 'polygon') targetChain = 'matic'
|
if (chain === 'polygon') targetChain = 'matic'
|
||||||
|
if (chain === 'silicon_zk') targetChain = 'silicon'
|
||||||
|
|
||||||
const tokenListURL = 'https://bridge.orbitchain.io/open/v1/api/monitor/rawTokenList'
|
const tokenListURL = 'https://bridge.orbitchain.io/open/v1/api/monitor/rawTokenList'
|
||||||
tokenData = tokenData || getConfig('orbit-bridge', tokenListURL)
|
tokenData = tokenData || getConfig('orbit-bridge', tokenListURL)
|
||||||
@@ -83,6 +85,7 @@ module.exports = {
|
|||||||
polygon: { tvl },
|
polygon: { tvl },
|
||||||
meta: { tvl },
|
meta: { tvl },
|
||||||
wemix: { tvl },
|
wemix: { tvl },
|
||||||
|
silicon_zk: { tvl },
|
||||||
ripple: {
|
ripple: {
|
||||||
tvl: sumTokensExport({ owner: 'rLcxBUrZESqHnruY4fX7GQthRjDCDSAWia' })
|
tvl: sumTokensExport({ owner: 'rLcxBUrZESqHnruY4fX7GQthRjDCDSAWia' })
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user