mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
Merge branch 'ethereum-lists:master' into master
This commit is contained in:
commit
d5ead22213
|
@ -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.
|
||||
|
||||
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
|
||||
|
||||
There are also aggregated json files with all chains automatically assembled:
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
"name": "ThunderCore Mainnet",
|
||||
"chain": "TT",
|
||||
"rpc": [
|
||||
"https://mainnet-rpc.thundercore.com"
|
||||
"https://mainnet-rpc.thundercore.com",
|
||||
"https://mainnet-rpc.thundertoken.net",
|
||||
"https://mainnet-rpc.thundercore.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.thundercore.com"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "ThunderCore Mainnet Ether",
|
||||
"name": "ThunderCore Token",
|
||||
"symbol": "TT",
|
||||
"decimals": 18
|
||||
},
|
||||
|
@ -18,9 +20,11 @@
|
|||
"networkId": 108,
|
||||
"slip44": 1001,
|
||||
|
||||
"explorers": [{
|
||||
"name": "ThundercoreScan",
|
||||
"url": "https://scan.thundercore.com",
|
||||
"standard": "none"
|
||||
}]
|
||||
"explorers": [
|
||||
{
|
||||
"name": "thundercore-viewblock",
|
||||
"url": "https://viewblock.io/thundercore",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
"shortName": "mrock-old",
|
||||
"chainId": 1286,
|
||||
"networkId": 1286,
|
||||
"deprecated": true
|
||||
"status": "deprecated"
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
"shortName": "cennz-old",
|
||||
"chainId": 1337,
|
||||
"networkId": 1337,
|
||||
"deprecated": true
|
||||
}
|
||||
"status": "deprecated"
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"https://faucet-testnet.thundercore.com"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "ThunderCore Testnet Ether",
|
||||
"name": "ThunderCore Testnet Token",
|
||||
"symbol": "TST",
|
||||
"decimals": 18
|
||||
},
|
||||
|
@ -16,9 +16,11 @@
|
|||
"shortName": "TST",
|
||||
"chainId": 18,
|
||||
"networkId": 18,
|
||||
"explorers": [{
|
||||
"name": "ThundercoreTestNetScanner",
|
||||
"url": "https://scan-testnet.thundercore.com",
|
||||
"standard": "none"
|
||||
}]
|
||||
"explorers": [
|
||||
{
|
||||
"name": "thundercore-blockscout-testnet",
|
||||
"url": "https://explorer-testnet.thundercore.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
30
_data/chains/eip155-1819.json
Normal file
30
_data/chains/eip155-1819.json
Normal 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"
|
||||
}]
|
||||
}
|
22
_data/chains/eip155-2008.json
Normal file
22
_data/chains/eip155-2008.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
22
_data/chains/eip155-2009.json
Normal file
22
_data/chains/eip155-2009.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -15,5 +15,5 @@
|
|||
"shortName": "SO1-old",
|
||||
"chainId": 218,
|
||||
"networkId": 218,
|
||||
"deprecated": true
|
||||
"status":"deprecated"
|
||||
}
|
||||
|
|
|
@ -3,21 +3,21 @@
|
|||
"chain": "OML",
|
||||
"icon": "omlira",
|
||||
"rpc": [
|
||||
"https://seed.omlira.com"
|
||||
"https://seed.omchain.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Omlira",
|
||||
"symbol": "OML",
|
||||
"name": "omChain",
|
||||
"symbol": "OMC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://omlira.com",
|
||||
"shortName": "oml",
|
||||
"infoURL": "https://omchain.io",
|
||||
"shortName": "omc",
|
||||
"chainId": 21816,
|
||||
"networkId": 21816,
|
||||
"explorers": [{
|
||||
"name": "omChain Explorer",
|
||||
"url": "https://explorer.omlira.com",
|
||||
"url": "https://explorer.omchain.io",
|
||||
"standard": "EIP3091"
|
||||
}]
|
||||
}
|
||||
|
|
26
_data/chains/eip155-239.json
Normal file
26
_data/chains/eip155-239.json
Normal 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"
|
||||
}]
|
||||
}
|
23
_data/chains/eip155-30067.json
Normal file
23
_data/chains/eip155-30067.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"name": "Autobahn Network",
|
||||
"chain": "BNB",
|
||||
"chain": "TXL",
|
||||
"network": "mainnet",
|
||||
"rpc": [
|
||||
"https://rpc.autobahn.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "BNB",
|
||||
"symbol": "BNB",
|
||||
"name": "TXL",
|
||||
"symbol": "TXL",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://autobahn.network",
|
||||
"shortName": "autobahn",
|
||||
"shortName": "Autobahn Network",
|
||||
"chainId": 45000,
|
||||
"networkId": 45000,
|
||||
"icon": "autobahn",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Mammoth",
|
||||
"name": "Mammoth Mainnet",
|
||||
"title": "Mammoth Chain",
|
||||
"chain": "MMT",
|
||||
"rpc": [
|
||||
|
@ -19,9 +19,11 @@
|
|||
"shortName": "mmt",
|
||||
"chainId": 8898,
|
||||
"networkId": 8898,
|
||||
"icon": "mmt",
|
||||
"explorers": [{
|
||||
"name": "mmtscan",
|
||||
"url": "https://mmtscan.io",
|
||||
"standard": "EIP3091"
|
||||
"standard": "EIP3091",
|
||||
"icon": "mmt"
|
||||
}]
|
||||
}
|
||||
|
|
8
_data/icons/aitd.json
Normal file
8
_data/icons/aitd.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"url":"ipfs://QmNUzX12Gtn4fePqJeMcACvECEH2VeUeNaMFja2kfff1WS",
|
||||
"width":64,
|
||||
"height":64,
|
||||
"format":"png"
|
||||
}
|
||||
]
|
8
_data/icons/cloudwalk.json
Normal file
8
_data/icons/cloudwalk.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"url":"ipfs://QmPytfZEnKMx5mHiXB9fiuoSvA9jLi7tZ14gERSz2n4MJM",
|
||||
"width":124,
|
||||
"height":119,
|
||||
"format":"png"
|
||||
}
|
||||
]
|
8
_data/icons/mmt.json
Normal file
8
_data/icons/mmt.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"url": "ipfs://QmaF5gi2CbDKsJ2UchNkjBqmWjv8JEDP3vePBmxeUHiaK4",
|
||||
"width": 250,
|
||||
"height": 250,
|
||||
"format": "png"
|
||||
}
|
||||
]
|
8
_data/icons/piecechain.json
Normal file
8
_data/icons/piecechain.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"url": "ipfs://QmWAU39z1kcYshAqkENRH8qUjfR5CJehCxA4GiC33p3HpH",
|
||||
"width": 800,
|
||||
"height": 800,
|
||||
"format": "png"
|
||||
}
|
||||
]
|
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
|
@ -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'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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")
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ val optionalFields = listOf(
|
|||
"title",
|
||||
"network",
|
||||
"parent",
|
||||
"deprecated"
|
||||
"status"
|
||||
)
|
||||
|
||||
val moshi: Moshi = Moshi.Builder().build()
|
||||
|
|
|
@ -17,7 +17,7 @@ val dataPath = File(basePath, "_data")
|
|||
val iconsPath = File(dataPath, "icons")
|
||||
|
||||
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 }
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
@ -235,9 +235,12 @@ fun checkChain(chainFile: File, connectRPC: Boolean) {
|
|||
throw ENSRegistryAddressMustBeValid()
|
||||
}
|
||||
}
|
||||
jsonObject["deprecated"]?.let {
|
||||
if (it !is Boolean) {
|
||||
throw DeprecatedMustBeBoolean()
|
||||
jsonObject["status"]?.let {
|
||||
if (it !is String) {
|
||||
throw StatusMustBeString()
|
||||
}
|
||||
if (!setOf("incubating","active","deprecated").contains(it)) {
|
||||
throw StatusMustBeIncubatingActiveOrDeprecated()
|
||||
}
|
||||
}
|
||||
jsonObject["parent"]?.let {
|
||||
|
|
|
@ -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 BridgeOnlyURL: Exception("parent bridge only contain an URL")
|
||||
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 NativeCurrencySymbolMustBeString: Exception("Native currency symbol must be string")
|
||||
class NativeCurrencySymbolMustHaveLessThan7Chars: Exception("Native currency symbol must have less than 7 chars")
|
||||
|
|
|
@ -221,9 +221,14 @@ class TheChainChecker {
|
|||
checkChain(getFile("invalid/explorermissingurl/eip155-1.json"), false)
|
||||
}
|
||||
|
||||
@Test(expected = DeprecatedMustBeBoolean::class)
|
||||
fun shouldFailOnInvalidDeprecation() {
|
||||
checkChain(getFile("invalid/invalid_deprecation/eip155-1.json"), false)
|
||||
@Test(expected = StatusMustBeString::class)
|
||||
fun shouldFailOnInvalidStatusType() {
|
||||
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
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
"decimals": 18
|
||||
},
|
||||
"explorers": [],
|
||||
"deprecated": "yolo"
|
||||
"status": 1
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -15,6 +15,5 @@
|
|||
"name": "Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"deprecated": true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user