mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
parent
973e090f5c
commit
684d82580e
|
@ -34,9 +34,11 @@ private fun createOutputFiles() {
|
||||||
val prettyJSONFile = File(buildPath, "chains_pretty.json")
|
val prettyJSONFile = File(buildPath, "chains_pretty.json")
|
||||||
val miniJSONFile = File(buildPath, "chains_mini.json")
|
val miniJSONFile = File(buildPath, "chains_mini.json")
|
||||||
val prettyMiniJSONFile = File(buildPath, "chains_mini_pretty.json")
|
val prettyMiniJSONFile = File(buildPath, "chains_mini_pretty.json")
|
||||||
|
val shortNameMappingJSONFIle = File(buildPath, "shortNameMapping.json")
|
||||||
|
|
||||||
val chainJSONArray = JsonArray<JsonObject>()
|
val chainJSONArray = JsonArray<JsonObject>()
|
||||||
val miniChainJSONArray = JsonArray<JsonObject>()
|
val miniChainJSONArray = JsonArray<JsonObject>()
|
||||||
|
val shortNameMapping = JsonObject()
|
||||||
|
|
||||||
allChainFiles
|
allChainFiles
|
||||||
.map { Klaxon().parseJsonObject(it.reader()) }
|
.map { Klaxon().parseJsonObject(it.reader()) }
|
||||||
|
@ -54,10 +56,12 @@ private fun createOutputFiles() {
|
||||||
}
|
}
|
||||||
miniChainJSONArray.add(miniJSON)
|
miniChainJSONArray.add(miniJSON)
|
||||||
|
|
||||||
|
shortNameMapping[jsonObject["shortName"] as String] = "eip155:" + jsonObject["chainId"]
|
||||||
miniJSONFile.writeText(miniChainJSONArray.toJsonString())
|
miniJSONFile.writeText(miniChainJSONArray.toJsonString())
|
||||||
prettyMiniJSONFile.writeText(miniChainJSONArray.toJsonString(prettyPrint = true))
|
prettyMiniJSONFile.writeText(miniChainJSONArray.toJsonString(prettyPrint = true))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shortNameMappingJSONFIle.writeText(shortNameMapping.toJsonString(prettyPrint = true))
|
||||||
File(buildPath, "index.html").writeText(
|
File(buildPath, "index.html").writeText(
|
||||||
"""
|
"""
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user