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",
|
"title": "Calypso NFT Hub Mainnet",
|
||||||
"chain": "honorable-steel-rasalhague",
|
"chain": "honorable-steel-rasalhague",
|
||||||
"rpc": ["https://mainnet.skalenodes.com/v1/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",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://alpha-1-replica-0.bedrock-goerli.optimism.io",
|
"https://alpha-1-replica-0.bedrock-goerli.optimism.io",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Filecoin — Mainnet",
|
"name": "Filecoin - Mainnet",
|
||||||
"chain": "FIL",
|
"chain": "FIL",
|
||||||
"status": "incubating",
|
"status": "incubating",
|
||||||
"rpc": ["https://api.node.glif.io/rpc/v0"],
|
"rpc": ["https://api.node.glif.io/rpc/v0"],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Filecoin — Buildernet",
|
"name": "Filecoin - Buildernet",
|
||||||
"chain": "FIL",
|
"chain": "FIL",
|
||||||
"status": "incubating",
|
"status": "incubating",
|
||||||
"rpc": [],
|
"rpc": [],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Filecoin — Wallaby testnet",
|
"name": "Filecoin - Wallaby testnet",
|
||||||
"chain": "FIL",
|
"chain": "FIL",
|
||||||
"status": "incubating",
|
"status": "incubating",
|
||||||
"rpc": ["https://wallaby.node.glif.io/rpc/v0"],
|
"rpc": ["https://wallaby.node.glif.io/rpc/v0"],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Filecoin — Calibration testnet",
|
"name": "Filecoin - Calibration testnet",
|
||||||
"chain": "FIL",
|
"chain": "FIL",
|
||||||
"status": "incubating",
|
"status": "incubating",
|
||||||
"rpc": ["https://api.calibration.node.glif.io/rpc/v0"],
|
"rpc": ["https://api.calibration.node.glif.io/rpc/v0"],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Filecoin — Butterfly testnet",
|
"name": "Filecoin - Butterfly testnet",
|
||||||
"chain": "FIL",
|
"chain": "FIL",
|
||||||
"status": "incubating",
|
"status": "incubating",
|
||||||
"rpc": [],
|
"rpc": [],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Filecoin — Local testnet",
|
"name": "Filecoin - Local testnet",
|
||||||
"chain": "FIL",
|
"chain": "FIL",
|
||||||
"status": "incubating",
|
"status": "incubating",
|
||||||
"rpc": [],
|
"rpc": [],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Calypso NFT Hub | SKALE Testnet",
|
"name": "Calypso NFT Hub (SKALE Testnet)",
|
||||||
"title": "Calypso NFT Hub Testnet",
|
"title": "Calypso NFT Hub Testnet",
|
||||||
"chain": "staging-utter-unripe-menkar",
|
"chain": "staging-utter-unripe-menkar",
|
||||||
"rpc": ["https://staging-v3.skalenodes.com/v1/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"
|
"https://docs.crab.network/dvm/wallets/dvm-metamask#apply-for-the-test-token"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Pangolin Network Native Token”",
|
"name": "Pangolin Network Native Token",
|
||||||
"symbol": "PRING",
|
"symbol": "PRING",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"rpc": ["https://pangoro-rpc.darwinia.network"],
|
"rpc": ["https://pangoro-rpc.darwinia.network"],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Pangoro Network Native Token”",
|
"name": "Pangoro Network Native Token",
|
||||||
"symbol": "ORING",
|
"symbol": "ORING",
|
||||||
"decimals": 18
|
"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 {
|
jsonObject["nativeCurrency"]?.let {
|
||||||
if (it !is JsonObject) {
|
if (it !is JsonObject) {
|
||||||
throw NativeCurrencyMustBeObject()
|
throw NativeCurrencyMustBeObject()
|
||||||
|
@ -275,9 +276,23 @@ fun checkChain(chainFile: File, connectRPC: Boolean, verbose: Boolean = false) {
|
||||||
if (it["decimals"] !is Int) {
|
if (it["decimals"] !is Int) {
|
||||||
throw NativeCurrencyDecimalMustBeInt()
|
throw NativeCurrencyDecimalMustBeInt()
|
||||||
}
|
}
|
||||||
if (it["name"] !is String) {
|
val currencyName = it["name"]
|
||||||
|
if (currencyName !is String) {
|
||||||
throw NativeCurrencyNameMustBeString()
|
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 {
|
jsonObject["explorers"]?.let {
|
||||||
|
|
|
@ -40,4 +40,8 @@ class NativeCurrencyCanOnlyHaveSymbolNameAndDecimals: Exception("Native currency
|
||||||
class NativeCurrencyDecimalMustBeInt: Exception("Native currency decimals must be int")
|
class NativeCurrencyDecimalMustBeInt: Exception("Native currency decimals must be int")
|
||||||
class NativeCurrencyNameMustBeString: Exception("Native currency name must be string")
|
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")
|
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"
|
"https://api.mycryptoapi.com/eth"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Görli Ether",
|
"name": "Goerli Ether",
|
||||||
"symbol": "GOR",
|
"symbol": "GOR",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Ethereum Testnet Görli",
|
"name": "Ethereum Testnet Goerli",
|
||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://rpc.goerli.mudit.blog/",
|
"https://rpc.goerli.mudit.blog/",
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
"https://faucet.goerli.mudit.blog"
|
"https://faucet.goerli.mudit.blog"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Görli Ether",
|
"name": "Goerli Ether",
|
||||||
"symbol": "GOR",
|
"symbol": "GOR",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Ethereum Testnet Görli",
|
"name": "Ethereum Testnet Goerli",
|
||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://rpc.goerli.mudit.blog/",
|
"https://rpc.goerli.mudit.blog/",
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
"https://faucet.goerli.mudit.blog"
|
"https://faucet.goerli.mudit.blog"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Görli Ether",
|
"name": "Goerli Ether",
|
||||||
"symbol": "GOR",
|
"symbol": "GOR",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user