Skip to content

Commit 32e0b4b

Browse files
committed
Update config
1 parent 1bcc1b9 commit 32e0b4b

File tree

4 files changed

+36
-40
lines changed

4 files changed

+36
-40
lines changed

bin/check-config.ts

+35-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { chain, groupBy } from "lodash"
1+
import { chain, groupBy, uniq } from "lodash"
22
import { addressBook, Chain as AddressBookChain } from "blockchain-addressbook"
33

44
type Hex = `0x${string}`
@@ -270,11 +270,32 @@ async function main() {
270270

271271
const dataFileContentPerChain = {} as any
272272

273+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
274+
// check for missing chains
275+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
276+
const missingChains: string[] = []
277+
const allChains = uniq(allConfigs.map((v) => v.chain))
278+
for (const chain of allChains) {
279+
const fs = require("fs")
280+
281+
// only if the chain has a config file
282+
if (!fs.existsSync(`./config/${chain}.json`)) {
283+
missingChains.push(chain)
284+
}
285+
}
286+
if (missingChains.length > 0) {
287+
console.error(`Missing chains: ${missingChains.join(", ")}`)
288+
}
289+
273290
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
274291
// check for missing holder counts
275292
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
276293
const missingHolderCounts: BeefyVault[] = []
277294
for (const vault of allConfigs) {
295+
if (missingChains.includes(vault.chain)) {
296+
continue
297+
}
298+
278299
const subgraphchain = vault.chain === "one" ? "harmony" : vault.chain
279300
dataFileContentPerChain[subgraphchain] = dataFileContentPerChain[subgraphchain] || { no_factory_vaults: [], no_factory_boosts: [] }
280301

@@ -315,9 +336,9 @@ async function main() {
315336
}
316337
}
317338

318-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
319-
// write data files with missing holder counts
320-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
339+
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
340+
// // write data files with missing holder counts
341+
// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
321342
// for (const chain of Object.keys(dataFileContentPerChain)) {
322343
// const fs = require("fs")
323344

@@ -343,13 +364,16 @@ async function main() {
343364
// fs.writeFileSync(targetFile, JSON.stringify(dataFileContent, null, 2))
344365
// }
345366

346-
// // display top 30 missing TVL to focus on the most important vaults
347-
// missingHolderCounts.sort((a, b) => b.tvl - a.tvl)
348-
// console.error(`\n\nMissing TVL for top 30 vaults:`)
349-
// missingHolderCounts.slice(0, 100).forEach((v) => {
350-
// const level = v.eol ? "ERROR" : "WARN"
351-
// console.error(`${level}: Missing TVL for ${v.chain}:${v.id}:${v.vault_address}: ${v.tvl}`)
352-
// })
367+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
368+
// display top 30 missing TVL to focus on the most important vaults
369+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
370+
// display top 30 missing TVL to focus on the most important vaults
371+
missingHolderCounts.sort((a, b) => b.tvl - a.tvl)
372+
console.error(`\n\nMissing TVL for top 30 vaults:`)
373+
missingHolderCounts.slice(0, 100).forEach((v) => {
374+
const level = v.eol ? "ERROR" : "WARN"
375+
console.error(`${level}: Missing TVL for ${v.chain}:${v.id}:${v.vault_address}: ${v.tvl}`)
376+
})
353377

354378
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
355379
// check that the chain config contains all the factory addresses in the addressbook

config/_real.json

-21
This file was deleted.

data/arbitrum_data.json

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"0x9b40e357937bce323b1eb3832173b3d028520708",
2727
"0x9dbbbaecacedf53d5caa295b8293c1def2055adc",
2828
"0x9e75f8298e458b76382870982788988a0799195b",
29+
"0xaf570c4bcc42fe7f62e969bb147a639d74d2dad4",
2930
"0xb1bfc21bee2b2dda4728481dbf52edc3b9f5fb79",
3031
"0xb8ff233d024277b0e188a478c18e9263330a1b51",
3132
"0xba5041b1c06e8c9cfb5ddb4b82bdc52e41ea5fc5",

data/avax_data.json

-8
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
"0x044e87f30bd9bd961c04028ac69155493e1b9ed0",
77
"0x052b006a2cfb2523042b3041f15adc7fa5356312",
88
"0x06ee4edd02e9f2513c57bc08a691a8d9f62f075e",
9-
"0x09e38df01e8f362ed0b065ef1ad57ac7c0124be5",
109
"0x0c89ca08b6831e6b81f9f969f37a966a2c44d3d1",
1110
"0x0d48e4e02ea44003b44360b9045f5a562890b1c6",
1211
"0x10d52685e9f55884a67a88f2b5ed2215d607d0a2",
1312
"0x180a73f4e0a84e4343019529429344cbec21d946",
1413
"0x1b156c5c75e9df4caab2a5cc5999ac58ff4f9090",
1514
"0x1ca786f754d339797bbece959799fba063c22f44",
16-
"0x1d37e81c302f0d0a960242f85c763fb566564369",
1715
"0x22eafb9c7e2858cfda712940896464ddaa83d053",
1816
"0x258e9884c111e2e3e0273372521982bd57ef29bd",
1917
"0x275ef36e6097c68be8765c238100bf061b38a922",
@@ -24,7 +22,6 @@
2422
"0x2c0e2ec5c2c84346497cc82f5aff72f8a29da835",
2523
"0x2d48d94abfad5a95b5fca0fab9cd37dd722c84a4",
2624
"0x2ebaf60a6d6ae9ffe2c418470df0d2444b996ae9",
27-
"0x2f1c8dab052cccfaa131e303162b75faede28e31",
2825
"0x3094ab4af54f5208b867125b5ccecc94bc17cbb6",
2926
"0x326d4521e4cf78fb2f8693b1ebc4d24ece89de01",
3027
"0x35a338091c2077f33bed09717eb31ba0f02efb2f",
@@ -43,14 +40,12 @@
4340
"0x4112d114658c8b9a7598e4b588f75e80b2d9b1f4",
4441
"0x41e6612044aeddeb19102304775ca39c204ad030",
4542
"0x42ab5a790e99df1b5d46f1c5c3e61d0cd63d1f6e",
46-
"0x4409339d013a65fa029c2f587ee410dfebcb1c6e",
4743
"0x440f1249349b185748c9aa8dab26f067a515a68f",
4844
"0x4502e2f6802d48578f76920e5d56557459c04b7d",
4945
"0x491e09eb736c0c4cd85df694a22d1c0dec8c4c25",
5046
"0x4c25854f6da3b5848f7b5c71dcb8eee20b292d3e",
5147
"0x4c7cf6ee7afa810028099c2d1d97c6ab33540412",
5248
"0x4e685c0d068cb0af88ff662b89951ad5b3727387",
53-
"0x4ebe6bdef299aa11ee811bd42646c44a52b23d46",
5449
"0x5508222678c5337e76d93a3005dc008056715655",
5550
"0x5526851c271d8b59f6412e3244a7a6db3a13808f",
5651
"0x57c7128a8fba6425f380af712efdcd7688ace332",
@@ -79,7 +74,6 @@
7974
"0x7e5bc7088ab3da3e7fa1aa7cef1dc73f5b00681c",
8075
"0x808d5f0a62336917da14fa9a10e9575b1040f71c",
8176
"0x813ab5b3fdc59b143c42284665864b24b794c324",
82-
"0x837036a6856ce707c855eb4c5f4f3b86a5c9f0ff",
8377
"0x83e05c8a4adefa875abe0f30a18bb6f9b54b807e",
8478
"0x84cb5ff7f5068ac02a7b0fd4772577c670a5afc6",
8579
"0x865628e18e99ab563405e1f329024c50f7093318",
@@ -123,7 +117,6 @@
123117
"0xb6ae1f6be8575a44d22af3cd2c5385cc9c293978",
124118
"0xba8284dc76fbedd311f14937340e3bc174b4864c",
125119
"0xbacec852971eb461da6ad8f5c2e37694dca56002",
126-
"0xbb7f25af55da4347960c2ed67dff00263469836f",
127120
"0xbbbe0fa93c8ced0614351baf74979ab1243cf9c8",
128121
"0xbda8bc79705bc60226adca2766e94eb5512949a3",
129122
"0xc040e6221b7fe844681c733adcf1c19f9984272a",
@@ -147,7 +140,6 @@
147140
"0xd8e92bcbf66a675b2ac45f0bbbb0f285ba607ab7",
148141
"0xda875a511860f2752b891677489d08caedac00ea",
149142
"0xdb054f4978a485bc5d9ae144b487340b141e41db",
150-
"0xdb4d3830b1fbcadb10cb40ab406bfcf953fac014",
151143
"0xdc5e537764f5ad0f51bf52ccf0767083bb4565ec",
152144
"0xdd63306a9792ecbd1cd6baed3f1b18bea638aace",
153145
"0xdf306fbda58527729a8d5185ab8fef96bfa94c7a",

0 commit comments

Comments
 (0)