mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
parent
d8071dab68
commit
2898285b5b
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Calypso NFT Hub | SKALE",
|
||||
"name": "Calypso NFT Hub (SKALE)",
|
||||
"title": "Calypso NFT Hub Mainnet",
|
||||
"chain": "honorable-steel-rasalhague",
|
||||
"rpc": ["https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Optimism Bedrock: Goerli Alpha Testnet",
|
||||
"name": "Optimism Bedrock (Goerli Alpha Testnet)",
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://alpha-1-replica-0.bedrock-goerli.optimism.io",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Filecoin — Mainnet",
|
||||
"name": "Filecoin - Mainnet",
|
||||
"chain": "FIL",
|
||||
"status": "incubating",
|
||||
"rpc": ["https://api.node.glif.io/rpc/v0"],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Filecoin — Buildernet",
|
||||
"name": "Filecoin - Buildernet",
|
||||
"chain": "FIL",
|
||||
"status": "incubating",
|
||||
"rpc": [],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Filecoin — Wallaby testnet",
|
||||
"name": "Filecoin - Wallaby testnet",
|
||||
"chain": "FIL",
|
||||
"status": "incubating",
|
||||
"rpc": ["https://wallaby.node.glif.io/rpc/v0"],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Filecoin — Calibration testnet",
|
||||
"name": "Filecoin - Calibration testnet",
|
||||
"chain": "FIL",
|
||||
"status": "incubating",
|
||||
"rpc": ["https://api.calibration.node.glif.io/rpc/v0"],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Filecoin — Butterfly testnet",
|
||||
"name": "Filecoin - Butterfly testnet",
|
||||
"chain": "FIL",
|
||||
"status": "incubating",
|
||||
"rpc": [],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Filecoin — Local testnet",
|
||||
"name": "Filecoin - Local testnet",
|
||||
"chain": "FIL",
|
||||
"status": "incubating",
|
||||
"rpc": [],
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Calypso NFT Hub | SKALE Testnet",
|
||||
"name": "Calypso NFT Hub (SKALE Testnet)",
|
||||
"title": "Calypso NFT Hub Testnet",
|
||||
"chain": "staging-utter-unripe-menkar",
|
||||
"rpc": ["https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar"],
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"https://docs.crab.network/dvm/wallets/dvm-metamask#apply-for-the-test-token"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Pangolin Network Native Token”",
|
||||
"name": "Pangolin Network Native Token",
|
||||
"symbol": "PRING",
|
||||
"decimals": 18
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"rpc": ["https://pangoro-rpc.darwinia.network"],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Pangoro Network Native Token”",
|
||||
"name": "Pangoro Network Native Token",
|
||||
"symbol": "ORING",
|
||||
"decimals": 18
|
||||
},
|
||||
|
|
|
@ -257,6 +257,7 @@ fun checkChain(chainFile: File, connectRPC: Boolean, verbose: Boolean = false) {
|
|||
}
|
||||
}
|
||||
|
||||
val nameRegex = Regex("^[a-zA-Z0-9\\-\\.\\(\\) ]+$")
|
||||
jsonObject["nativeCurrency"]?.let {
|
||||
if (it !is JsonObject) {
|
||||
throw NativeCurrencyMustBeObject()
|
||||
|
@ -275,9 +276,23 @@ fun checkChain(chainFile: File, connectRPC: Boolean, verbose: Boolean = false) {
|
|||
if (it["decimals"] !is Int) {
|
||||
throw NativeCurrencyDecimalMustBeInt()
|
||||
}
|
||||
if (it["name"] !is String) {
|
||||
val currencyName = it["name"]
|
||||
if (currencyName !is String) {
|
||||
throw NativeCurrencyNameMustBeString()
|
||||
}
|
||||
|
||||
if (!nameRegex.matches(currencyName)) {
|
||||
throw IllegalName("currencyName", currencyName)
|
||||
}
|
||||
}
|
||||
|
||||
val chainName = jsonObject["name"]
|
||||
if (chainName !is String) {
|
||||
throw ChainNameMustBeString()
|
||||
}
|
||||
|
||||
if (!nameRegex.matches(chainName)) {
|
||||
throw IllegalName("chain name", chainName)
|
||||
}
|
||||
|
||||
jsonObject["explorers"]?.let {
|
||||
|
|
|
@ -40,4 +40,8 @@ class NativeCurrencyCanOnlyHaveSymbolNameAndDecimals: Exception("Native currency
|
|||
class NativeCurrencyDecimalMustBeInt: Exception("Native currency decimals must be int")
|
||||
class NativeCurrencyNameMustBeString: Exception("Native currency name must be string")
|
||||
|
||||
class ChainNameMustBeString: Exception("Name must be string")
|
||||
|
||||
class IllegalName(type: String,name: String): Exception("Invalid $type: $name")
|
||||
|
||||
class UnreferencedIcon(fileName: String, iconsDownloadPath: File): Exception("Found file $fileName in $iconsDownloadPath that is not referenced")
|
|
@ -9,7 +9,7 @@
|
|||
"https://api.mycryptoapi.com/eth"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Görli Ether",
|
||||
"name": "Goerli Ether",
|
||||
"symbol": "GOR",
|
||||
"decimals": 18
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Ethereum Testnet Görli",
|
||||
"name": "Ethereum Testnet Goerli",
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://rpc.goerli.mudit.blog/",
|
||||
|
@ -11,7 +11,7 @@
|
|||
"https://faucet.goerli.mudit.blog"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Görli Ether",
|
||||
"name": "Goerli Ether",
|
||||
"symbol": "GOR",
|
||||
"decimals": 18
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "Ethereum Testnet Görli",
|
||||
"name": "Ethereum Testnet Goerli",
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://rpc.goerli.mudit.blog/",
|
||||
|
@ -11,7 +11,7 @@
|
|||
"https://faucet.goerli.mudit.blog"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Görli Ether",
|
||||
"name": "Goerli Ether",
|
||||
"symbol": "GOR",
|
||||
"decimals": 18
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user