-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
1a4bc9c
commit f9bcf57
Showing
6 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const { uniTvlExports } = require('../helper/unknownTokens') | ||
module.exports = uniTvlExports({ | ||
silicon_zk: '0xCB72354080A1d3B8A48425B889025d0799c52095' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,6 +315,7 @@ | |
"shido", | ||
"shimmer_evm", | ||
"sifchain", | ||
"silicon_zk", | ||
"smartbch", | ||
"solana", | ||
"sommelier", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters