Merge branch 'ethereum-lists:master' into master

This commit is contained in:
ammar-lakho 2022-05-20 12:59:48 +05:00 committed by GitHub
commit d5ead22213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 238 additions and 43 deletions

View File

@ -69,6 +69,9 @@ If the chain is an L2 or a shard of another chain you can link it to the parent
where you need to specify type 2 and the reference to an existing parent. The field about bridges is optional. where you need to specify type 2 and the reference to an existing parent. The field about bridges is optional.
You can add a `status` field e.g. to `deprecate` a chain (a chain should never be deleted as this would open the door to replay attacks)
Other options for `status` are `active` (default) or `incubating`
## Aggregation ## Aggregation
There are also aggregated json files with all chains automatically assembled: There are also aggregated json files with all chains automatically assembled:

View File

@ -2,13 +2,15 @@
"name": "ThunderCore Mainnet", "name": "ThunderCore Mainnet",
"chain": "TT", "chain": "TT",
"rpc": [ "rpc": [
"https://mainnet-rpc.thundercore.com" "https://mainnet-rpc.thundercore.com",
"https://mainnet-rpc.thundertoken.net",
"https://mainnet-rpc.thundercore.io"
], ],
"faucets": [ "faucets": [
"https://faucet.thundercore.com" "https://faucet.thundercore.com"
], ],
"nativeCurrency": { "nativeCurrency": {
"name": "ThunderCore Mainnet Ether", "name": "ThunderCore Token",
"symbol": "TT", "symbol": "TT",
"decimals": 18 "decimals": 18
}, },
@ -18,9 +20,11 @@
"networkId": 108, "networkId": 108,
"slip44": 1001, "slip44": 1001,
"explorers": [{ "explorers": [
"name": "ThundercoreScan", {
"url": "https://scan.thundercore.com", "name": "thundercore-viewblock",
"standard": "none" "url": "https://viewblock.io/thundercore",
}] "standard": "EIP3091"
}
]
} }

View File

@ -12,5 +12,5 @@
"shortName": "mrock-old", "shortName": "mrock-old",
"chainId": 1286, "chainId": 1286,
"networkId": 1286, "networkId": 1286,
"deprecated": true "status": "deprecated"
} }

View File

@ -12,5 +12,5 @@
"shortName": "cennz-old", "shortName": "cennz-old",
"chainId": 1337, "chainId": 1337,
"networkId": 1337, "networkId": 1337,
"deprecated": true "status": "deprecated"
} }

View File

@ -8,7 +8,7 @@
"https://faucet-testnet.thundercore.com" "https://faucet-testnet.thundercore.com"
], ],
"nativeCurrency": { "nativeCurrency": {
"name": "ThunderCore Testnet Ether", "name": "ThunderCore Testnet Token",
"symbol": "TST", "symbol": "TST",
"decimals": 18 "decimals": 18
}, },
@ -16,9 +16,11 @@
"shortName": "TST", "shortName": "TST",
"chainId": 18, "chainId": 18,
"networkId": 18, "networkId": 18,
"explorers": [{ "explorers": [
"name": "ThundercoreTestNetScanner", {
"url": "https://scan-testnet.thundercore.com", "name": "thundercore-blockscout-testnet",
"standard": "none" "url": "https://explorer-testnet.thundercore.com",
}] "standard": "EIP3091"
}
]
} }

View File

@ -0,0 +1,30 @@
{
"name": "Cube Chain Testnet",
"chain": "Cube",
"rpc": [
"https://http-testnet.cube.network",
"wss://ws-testnet.cube.network",
"https://http-testnet-sg.cube.network",
"wss://ws-testnet-sg.cube.network",
"https://http-testnet-jp.cube.network",
"wss://ws-testnet-jp.cube.network",
"https://http-testnet-us.cube.network",
"wss://ws-testnet-us.cube.network"
],
"faucets": ["https://faucet.cube.network"],
"nativeCurrency": {
"name": "Cube Chain Test Native Token",
"symbol": "CUBET",
"decimals": 18
},
"infoURL": "https://www.cube.network",
"shortName": "cubet",
"chainId": 1819,
"networkId": 1819,
"slip44": 1819,
"explorers": [{
"name": "cubetest-scan",
"url": "https://testnet.cubescan.network",
"standard": "EIP3091"
}]
}

View File

@ -0,0 +1,22 @@
{
"name": "CloudWalk Testnet",
"chain": "CloudWalk Testnet",
"rpc": [],
"faucets": [],
"nativeCurrency": {
"name": "CloudWalk Native Token",
"symbol": "CWN",
"decimals": 18
},
"infoURL": "https://cloudwalk.io",
"shortName": "cloudwalk_testnet",
"chainId": 2008,
"networkId": 2008,
"explorers": [
{
"name": "CloudWalk Testnet Explorer",
"url": "https://explorer.testnet.cloudwalk.io",
"standard": "none"
}
]
}

View File

@ -0,0 +1,22 @@
{
"name": "CloudWalk Mainnet",
"chain": "CloudWalk Mainnet",
"rpc": [],
"faucets": [],
"nativeCurrency": {
"name": "CloudWalk Native Token",
"symbol": "CWN",
"decimals": 18
},
"infoURL": "https://cloudwalk.io",
"shortName": "cloudwalk_mainnet",
"chainId": 2009,
"networkId": 2009,
"explorers": [
{
"name": "CloudWalk Mainnet Explorer",
"url": "https://explorer.mainnet.cloudwalk.io",
"standard": "none"
}
]
}

View File

@ -15,5 +15,5 @@
"shortName": "SO1-old", "shortName": "SO1-old",
"chainId": 218, "chainId": 218,
"networkId": 218, "networkId": 218,
"deprecated": true "status":"deprecated"
} }

View File

@ -3,21 +3,21 @@
"chain": "OML", "chain": "OML",
"icon": "omlira", "icon": "omlira",
"rpc": [ "rpc": [
"https://seed.omlira.com" "https://seed.omchain.io"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
"name": "Omlira", "name": "omChain",
"symbol": "OML", "symbol": "OMC",
"decimals": 18 "decimals": 18
}, },
"infoURL": "https://omlira.com", "infoURL": "https://omchain.io",
"shortName": "oml", "shortName": "omc",
"chainId": 21816, "chainId": 21816,
"networkId": 21816, "networkId": 21816,
"explorers": [{ "explorers": [{
"name": "omChain Explorer", "name": "omChain Explorer",
"url": "https://explorer.omlira.com", "url": "https://explorer.omchain.io",
"standard": "EIP3091" "standard": "EIP3091"
}] }]
} }

View File

@ -0,0 +1,26 @@
{
"name": "Aitd Testnet",
"chain": "AITD",
"icon": "aitd",
"rpc": [
"http://http-testnet.aitd.io"
],
"faucets": [
"https://aitd-faucet-pre.aitdcoin.com/"
],
"nativeCurrency": {
"name": "AITD Testnet",
"symbol": "AITD",
"decimals": 18
},
"infoURL": "https://www.aitd.io/",
"shortName": "AITD",
"chainId": 239,
"networkId": 239,
"explorers": [{
"name": "AITD Chain Explorer",
"url": "https://aitd-explorer-pre.aitdcoin.com",
"standard": "EIP3091"
}]
}

View File

@ -0,0 +1,23 @@
{
"name": "Piece testnet",
"chain": "PieceNetwork",
"icon": "piecechain",
"rpc": ["https://testnet-rpc0.piecenetwork.com"],
"faucets": ["https://piecenetwork.com/faucet"],
"nativeCurrency": {
"name": "ECE",
"symbol": "ECE",
"decimals": 18
},
"infoURL": "https://piecenetwork.com",
"shortName": "Piece",
"chainId": 30067,
"networkId": 30067,
"explorers": [
{
"name": "Piece Scan",
"url": "https://testnet-scan.piecenetwork.com",
"standard": "EIP3091"
}
]
}

View File

@ -1,18 +1,18 @@
{ {
"name": "Autobahn Network", "name": "Autobahn Network",
"chain": "BNB", "chain": "TXL",
"network": "mainnet", "network": "mainnet",
"rpc": [ "rpc": [
"https://rpc.autobahn.network" "https://rpc.autobahn.network"
], ],
"faucets": [], "faucets": [],
"nativeCurrency": { "nativeCurrency": {
"name": "BNB", "name": "TXL",
"symbol": "BNB", "symbol": "TXL",
"decimals": 18 "decimals": 18
}, },
"infoURL": "https://autobahn.network", "infoURL": "https://autobahn.network",
"shortName": "autobahn", "shortName": "Autobahn Network",
"chainId": 45000, "chainId": 45000,
"networkId": 45000, "networkId": 45000,
"icon": "autobahn", "icon": "autobahn",

View File

@ -1,5 +1,5 @@
{ {
"name": "Mammoth", "name": "Mammoth Mainnet",
"title": "Mammoth Chain", "title": "Mammoth Chain",
"chain": "MMT", "chain": "MMT",
"rpc": [ "rpc": [
@ -19,9 +19,11 @@
"shortName": "mmt", "shortName": "mmt",
"chainId": 8898, "chainId": 8898,
"networkId": 8898, "networkId": 8898,
"icon": "mmt",
"explorers": [{ "explorers": [{
"name": "mmtscan", "name": "mmtscan",
"url": "https://mmtscan.io", "url": "https://mmtscan.io",
"standard": "EIP3091" "standard": "EIP3091",
"icon": "mmt"
}] }]
} }

8
_data/icons/aitd.json Normal file
View File

@ -0,0 +1,8 @@
[
{
"url":"ipfs://QmNUzX12Gtn4fePqJeMcACvECEH2VeUeNaMFja2kfff1WS",
"width":64,
"height":64,
"format":"png"
}
]

View File

@ -0,0 +1,8 @@
[
{
"url":"ipfs://QmPytfZEnKMx5mHiXB9fiuoSvA9jLi7tZ14gERSz2n4MJM",
"width":124,
"height":119,
"format":"png"
}
]

8
_data/icons/mmt.json Normal file
View File

@ -0,0 +1,8 @@
[
{
"url": "ipfs://QmaF5gi2CbDKsJ2UchNkjBqmWjv8JEDP3vePBmxeUHiaK4",
"width": 250,
"height": 250,
"format": "png"
}
]

View File

@ -0,0 +1,8 @@
[
{
"url": "ipfs://QmWAU39z1kcYshAqkENRH8qUjfR5CJehCxA4GiC33p3HpH",
"width": 800,
"height": 800,
"format": "png"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -23,4 +23,4 @@ subprojects {
} }
} }
apply plugin: "com.github.ben-manes.versions" apply from: 'https://raw.githubusercontent.com/ligi/gradle-common/master/versions_plugin_stable_only.gradle'

View File

@ -1,5 +1,5 @@
plugins { plugins {
id("com.google.devtools.ksp").version("1.6.20-1.0.5") id("com.google.devtools.ksp").version("1.6.21-1.0.5")
id("maven-publish") id("maven-publish")
} }

View File

@ -23,7 +23,7 @@ val optionalFields = listOf(
"title", "title",
"network", "network",
"parent", "parent",
"deprecated" "status"
) )
val moshi: Moshi = Moshi.Builder().build() val moshi: Moshi = Moshi.Builder().build()

View File

@ -17,7 +17,7 @@ val dataPath = File(basePath, "_data")
val iconsPath = File(dataPath, "icons") val iconsPath = File(dataPath, "icons")
val chainsPath = File(dataPath, "chains") val chainsPath = File(dataPath, "chains")
private val allFiles = chainsPath.listFiles() ?: error("$chainsPath must contain the chain json files - but it does not") private val allFiles = chainsPath.listFiles() ?: error("${chainsPath.absolutePath} must contain the chain json files - but it does not")
private val allChainFiles = allFiles.filter { !it.isDirectory } private val allChainFiles = allFiles.filter { !it.isDirectory }
fun main(args: Array<String>) { fun main(args: Array<String>) {
@ -235,9 +235,12 @@ fun checkChain(chainFile: File, connectRPC: Boolean) {
throw ENSRegistryAddressMustBeValid() throw ENSRegistryAddressMustBeValid()
} }
} }
jsonObject["deprecated"]?.let { jsonObject["status"]?.let {
if (it !is Boolean) { if (it !is String) {
throw DeprecatedMustBeBoolean() throw StatusMustBeString()
}
if (!setOf("incubating","active","deprecated").contains(it)) {
throw StatusMustBeIncubatingActiveOrDeprecated()
} }
} }
jsonObject["parent"]?.let { jsonObject["parent"]?.let {

View File

@ -26,7 +26,8 @@ class ParentBridgeNoArray: Exception("parent bridge must be array")
class BridgeNoObject: Exception("parent bridges must be array consisting of json objects") class BridgeNoObject: Exception("parent bridges must be array consisting of json objects")
class BridgeOnlyURL: Exception("parent bridge only contain an URL") class BridgeOnlyURL: Exception("parent bridge only contain an URL")
class ParentChainDoesNotExist(chain: String): Exception("Referenced parent chain ($chain) does not exist") class ParentChainDoesNotExist(chain: String): Exception("Referenced parent chain ($chain) does not exist")
class DeprecatedMustBeBoolean: Exception("deprecated must be boolean") class StatusMustBeString: Exception("status must be a string")
class StatusMustBeIncubatingActiveOrDeprecated: Exception("status must be either incubating, active or deprecated")
class NativeCurrencyMustBeObject: Exception("Native currency must be object") class NativeCurrencyMustBeObject: Exception("Native currency must be object")
class NativeCurrencySymbolMustBeString: Exception("Native currency symbol must be string") class NativeCurrencySymbolMustBeString: Exception("Native currency symbol must be string")
class NativeCurrencySymbolMustHaveLessThan7Chars: Exception("Native currency symbol must have less than 7 chars") class NativeCurrencySymbolMustHaveLessThan7Chars: Exception("Native currency symbol must have less than 7 chars")

View File

@ -221,9 +221,14 @@ class TheChainChecker {
checkChain(getFile("invalid/explorermissingurl/eip155-1.json"), false) checkChain(getFile("invalid/explorermissingurl/eip155-1.json"), false)
} }
@Test(expected = DeprecatedMustBeBoolean::class) @Test(expected = StatusMustBeString::class)
fun shouldFailOnInvalidDeprecation() { fun shouldFailOnInvalidStatusType() {
checkChain(getFile("invalid/invalid_deprecation/eip155-1.json"), false) checkChain(getFile("invalid/invalid_status/eip155-1.json"), false)
}
@Test(expected = StatusMustBeIncubatingActiveOrDeprecated::class)
fun shouldFailOnInvalidStatus() {
checkChain(getFile("invalid/invalid_status/eip155-2.json"), false)
} }
@Test @Test

View File

@ -17,5 +17,5 @@
"decimals": 18 "decimals": 18
}, },
"explorers": [], "explorers": [],
"deprecated": "yolo" "status": 1
} }

View File

@ -0,0 +1,21 @@
{
"name": "Ethereum Mainnet",
"shortName": "eth",
"chain": "ETH",
"network": "mainnet",
"chainId": 2,
"networkId": 2,
"rpc": [
"https://mainnet.infura.io/v3/${INFURA_API_KEY}",
"https://api.mycryptoapi.com/eth"
],
"faucets": [],
"infoURL": "https://ethereum.org",
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"explorers": [],
"status": "yolo"
}

View File

@ -15,6 +15,5 @@
"name": "Ether", "name": "Ether",
"symbol": "ETH", "symbol": "ETH",
"decimals": 18 "decimals": 18
}, }
"deprecated": true
} }