From 12d2c2f878b584481d8b82e18a4740cc40e3e123 Mon Sep 17 00:00:00 2001 From: ligi Date: Fri, 14 Jan 2022 21:12:06 +0100 Subject: [PATCH] Normalize explorer URLs --- _data/chains/eip155-1028.json | 2 +- _data/chains/eip155-1088.json | 2 +- _data/chains/eip155-1280.json | 2 +- _data/chains/eip155-1284.json | 6 +++--- _data/chains/eip155-1285.json | 4 ++-- _data/chains/eip155-1287.json | 4 ++-- _data/chains/eip155-1337702.json | 2 +- _data/chains/eip155-137.json | 2 +- _data/chains/eip155-186.json | 2 +- _data/chains/eip155-188.json | 2 +- _data/chains/eip155-189.json | 2 +- _data/chains/eip155-192837465.json | 2 +- _data/chains/eip155-199.json | 2 +- _data/chains/eip155-201018.json | 4 ++-- _data/chains/eip155-2100.json | 2 +- _data/chains/eip155-2101.json | 2 +- _data/chains/eip155-210309.json | 4 ++-- _data/chains/eip155-26.json | 2 +- _data/chains/eip155-262.json | 2 +- _data/chains/eip155-269.json | 2 +- _data/chains/eip155-27.json | 2 +- _data/chains/eip155-28.json | 2 +- _data/chains/eip155-288.json | 2 +- _data/chains/eip155-29.json | 2 +- _data/chains/eip155-356256156.json | 2 +- _data/chains/eip155-4002.json | 2 +- _data/chains/eip155-42261.json | 2 +- _data/chains/eip155-42262.json | 2 +- _data/chains/eip155-43113.json | 2 +- _data/chains/eip155-43114.json | 2 +- _data/chains/eip155-47805.json | 2 +- _data/chains/eip155-486217935.json | 2 +- _data/chains/eip155-52.json | 2 +- _data/chains/eip155-53.json | 2 +- _data/chains/eip155-55.json | 2 +- _data/chains/eip155-58.json | 2 +- _data/chains/eip155-588.json | 2 +- _data/chains/eip155-60000.json | 4 ++-- _data/chains/eip155-60001.json | 4 ++-- _data/chains/eip155-60002.json | 4 ++-- _data/chains/eip155-70000.json | 4 ++-- _data/chains/eip155-70001.json | 4 ++-- _data/chains/eip155-70002.json | 4 ++-- _data/chains/eip155-70103.json | 4 ++-- _data/chains/eip155-80001.json | 2 +- processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt | 6 +++++- .../kotlin/org/ethereum/lists/chains/model/Exceptions.kt | 3 ++- .../kotlin/org/ethereum/lists/chains/TheChainChecker.kt | 6 +++--- 48 files changed, 68 insertions(+), 63 deletions(-) diff --git a/_data/chains/eip155-1028.json b/_data/chains/eip155-1028.json index ee4ed4b7..50b4ca1b 100644 --- a/_data/chains/eip155-1028.json +++ b/_data/chains/eip155-1028.json @@ -16,7 +16,7 @@ "networkId": 1028, "explorers": [{ "name": "testbttcscan", - "url": "https://testscan.bittorrentchain.io/", + "url": "https://testscan.bittorrentchain.io", "standard": "none" }] } diff --git a/_data/chains/eip155-1088.json b/_data/chains/eip155-1088.json index 7c632728..b520cf5a 100644 --- a/_data/chains/eip155-1088.json +++ b/_data/chains/eip155-1088.json @@ -15,7 +15,7 @@ "explorers": [ { "name": "blockscout", - "url": "https://andromeda-explorer.metis.io/", + "url": "https://andromeda-explorer.metis.io", "standard": "EIP3091" } ], diff --git a/_data/chains/eip155-1280.json b/_data/chains/eip155-1280.json index 860e8b1d..e78c0e8a 100644 --- a/_data/chains/eip155-1280.json +++ b/_data/chains/eip155-1280.json @@ -17,7 +17,7 @@ "networkId": 1280, "explorers": [{ "name": "HALOexplorer", - "url": "https://browser.halo.land/", + "url": "https://browser.halo.land", "standard": "none" }] } diff --git a/_data/chains/eip155-1284.json b/_data/chains/eip155-1284.json index f577dce7..ffb88e21 100644 --- a/_data/chains/eip155-1284.json +++ b/_data/chains/eip155-1284.json @@ -18,13 +18,13 @@ "explorers": [ { "name": "blockscout", - "url": "https://blockscout.moonbeam.network/", + "url": "https://blockscout.moonbeam.network", "standard": "none" }, { "name": "moonscan", - "url": "https://moonbeam.moonscan.io/", + "url": "https://moonbeam.moonscan.io", "standard": "none" } ] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-1285.json b/_data/chains/eip155-1285.json index 7df32f94..3940e979 100644 --- a/_data/chains/eip155-1285.json +++ b/_data/chains/eip155-1285.json @@ -18,8 +18,8 @@ "explorers": [ { "name": "moonscan", - "url": "https://moonriver.moonscan.io/", + "url": "https://moonriver.moonscan.io", "standard": "none" } ] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-1287.json b/_data/chains/eip155-1287.json index 8e248cde..9e8dd726 100644 --- a/_data/chains/eip155-1287.json +++ b/_data/chains/eip155-1287.json @@ -18,8 +18,8 @@ "explorers": [ { "name": "moonscan", - "url": "https://moonbase.moonscan.io/", + "url": "https://moonbase.moonscan.io", "standard": "none" } ] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-1337702.json b/_data/chains/eip155-1337702.json index 07598eab..1b33f38e 100644 --- a/_data/chains/eip155-1337702.json +++ b/_data/chains/eip155-1337702.json @@ -20,7 +20,7 @@ "networkId": 1337702, "explorers": [{ "name": "kintsugi explorer", - "url": "https://explorer.kintsugi.themerge.dev/", + "url": "https://explorer.kintsugi.themerge.dev", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-137.json b/_data/chains/eip155-137.json index 72cceea0..175cb125 100644 --- a/_data/chains/eip155-137.json +++ b/_data/chains/eip155-137.json @@ -22,7 +22,7 @@ "slip44": 966, "explorers": [{ "name": "polygonscan", - "url": "https://polygonscan.com/", + "url": "https://polygonscan.com", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-186.json b/_data/chains/eip155-186.json index df7c772b..454e28e6 100644 --- a/_data/chains/eip155-186.json +++ b/_data/chains/eip155-186.json @@ -16,7 +16,7 @@ "networkId": 186, "explorers": [{ "name": "seeleview", - "url": "https://seeleview.net/", + "url": "https://seeleview.net", "standard": "none" }] } diff --git a/_data/chains/eip155-188.json b/_data/chains/eip155-188.json index 800c2526..853d6e99 100644 --- a/_data/chains/eip155-188.json +++ b/_data/chains/eip155-188.json @@ -16,7 +16,7 @@ "networkId": 188, "explorers": [{ "name": "Blockmeta", - "url": "https://bmc.blockmeta.com/", + "url": "https://bmc.blockmeta.com", "standard": "none" }] } diff --git a/_data/chains/eip155-189.json b/_data/chains/eip155-189.json index ba3436d4..947ebfb3 100644 --- a/_data/chains/eip155-189.json +++ b/_data/chains/eip155-189.json @@ -16,7 +16,7 @@ "networkId": 189, "explorers": [{ "name": "Blockmeta", - "url": "https://bmc.blockmeta.com/", + "url": "https://bmc.blockmeta.com", "standard": "none" }] } diff --git a/_data/chains/eip155-192837465.json b/_data/chains/eip155-192837465.json index 5fb0d83d..3c14a961 100644 --- a/_data/chains/eip155-192837465.json +++ b/_data/chains/eip155-192837465.json @@ -16,7 +16,7 @@ "networkId": 192837465, "explorers": [{ "name": "Blockscout", - "url": "https://explorer.gather.network/", + "url": "https://explorer.gather.network", "standard": "none" }] } diff --git a/_data/chains/eip155-199.json b/_data/chains/eip155-199.json index 0361174c..71140b22 100644 --- a/_data/chains/eip155-199.json +++ b/_data/chains/eip155-199.json @@ -16,7 +16,7 @@ "networkId": 199, "explorers": [{ "name": "bttcscan", - "url": "https://scan.bittorrentchain.io/", + "url": "https://scan.bittorrentchain.io", "standard": "none" }] } diff --git a/_data/chains/eip155-201018.json b/_data/chains/eip155-201018.json index 42570288..560137ef 100644 --- a/_data/chains/eip155-201018.json +++ b/_data/chains/eip155-201018.json @@ -19,8 +19,8 @@ "explorers": [ { "name": "alaya explorer", - "url": "https://scan.alaya.network/", + "url": "https://scan.alaya.network", "standard": "none" } ] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-2100.json b/_data/chains/eip155-2100.json index b9d529c1..afe88ee8 100644 --- a/_data/chains/eip155-2100.json +++ b/_data/chains/eip155-2100.json @@ -16,7 +16,7 @@ "networkId": 2100, "explorers": [{ "name": "Ecoball Explorer", - "url": "https://scan.ecoball.org/", + "url": "https://scan.ecoball.org", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-2101.json b/_data/chains/eip155-2101.json index 7463df69..543ec819 100644 --- a/_data/chains/eip155-2101.json +++ b/_data/chains/eip155-2101.json @@ -16,7 +16,7 @@ "networkId": 2101, "explorers": [{ "name": "Ecoball Testnet Explorer", - "url": "https://espuma-scan.ecoball.org/", + "url": "https://espuma-scan.ecoball.org", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-210309.json b/_data/chains/eip155-210309.json index 9e69304b..a6b23f4c 100644 --- a/_data/chains/eip155-210309.json +++ b/_data/chains/eip155-210309.json @@ -21,8 +21,8 @@ "explorers": [ { "name": "PlatON explorer", - "url": "https://devnetscan.platon.network/", + "url": "https://devnetscan.platon.network", "standard": "none" } ] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-26.json b/_data/chains/eip155-26.json index 17731241..88981cd8 100644 --- a/_data/chains/eip155-26.json +++ b/_data/chains/eip155-26.json @@ -16,7 +16,7 @@ "networkId": 26, "explorers": [{ "name": "Genesis L1 testnet explorer", - "url": "https://testnet.genesisl1.org/", + "url": "https://testnet.genesisl1.org", "standard": "none" }] } diff --git a/_data/chains/eip155-262.json b/_data/chains/eip155-262.json index 44ebefea..58a1a0ab 100644 --- a/_data/chains/eip155-262.json +++ b/_data/chains/eip155-262.json @@ -17,7 +17,7 @@ "icon": "SUR", "explorers": [{ "name": "Surnet Explorer", - "url": "https://explorer.surnet.org/", + "url": "https://explorer.surnet.org", "icon": "SUR", "standard": "EIP3091" }] diff --git a/_data/chains/eip155-269.json b/_data/chains/eip155-269.json index 3f1a3050..0e8faa01 100644 --- a/_data/chains/eip155-269.json +++ b/_data/chains/eip155-269.json @@ -20,7 +20,7 @@ "slip44": 269, "explorers": [{ "name": "hscan", - "url": "https://hscan.org/", + "url": "https://hscan.org", "standard": "EIP3091" }] diff --git a/_data/chains/eip155-27.json b/_data/chains/eip155-27.json index cb034ef6..cc9cdf2f 100644 --- a/_data/chains/eip155-27.json +++ b/_data/chains/eip155-27.json @@ -16,7 +16,7 @@ "networkId": 27, "explorers": [{ "name": "Shiba Explorer", - "url": "https://exp.shibachain.net/", + "url": "https://exp.shibachain.net", "standard": "none" }] } diff --git a/_data/chains/eip155-28.json b/_data/chains/eip155-28.json index 8e04a29e..6bc23e68 100644 --- a/_data/chains/eip155-28.json +++ b/_data/chains/eip155-28.json @@ -15,7 +15,7 @@ "explorers": [{ "name": "Blockscout", - "url": "https://blockexplorer.rinkeby.boba.network/", + "url": "https://blockexplorer.rinkeby.boba.network", "standard": "none" }], "parent": { diff --git a/_data/chains/eip155-288.json b/_data/chains/eip155-288.json index aba9a781..31d1c9e8 100644 --- a/_data/chains/eip155-288.json +++ b/_data/chains/eip155-288.json @@ -15,7 +15,7 @@ "explorers": [{ "name": "Blockscout", - "url": "https://blockexplorer.boba.network/", + "url": "https://blockexplorer.boba.network", "standard": "none" }], "parent": { diff --git a/_data/chains/eip155-29.json b/_data/chains/eip155-29.json index 33579353..5c8dd368 100644 --- a/_data/chains/eip155-29.json +++ b/_data/chains/eip155-29.json @@ -16,7 +16,7 @@ "networkId": 29, "explorers": [{ "name": "Genesis L1 blockchain explorer", - "url": "https://explorer.genesisl1.org/", + "url": "https://explorer.genesisl1.org", "standard": "none" }] } diff --git a/_data/chains/eip155-356256156.json b/_data/chains/eip155-356256156.json index ed02017b..04e99e81 100644 --- a/_data/chains/eip155-356256156.json +++ b/_data/chains/eip155-356256156.json @@ -16,7 +16,7 @@ "networkId": 356256156, "explorers": [{ "name": "Blockscout", - "url": "https://testnet-explorer.gather.network/", + "url": "https://testnet-explorer.gather.network", "standard": "none" }] } diff --git a/_data/chains/eip155-4002.json b/_data/chains/eip155-4002.json index 797f62bc..65269797 100644 --- a/_data/chains/eip155-4002.json +++ b/_data/chains/eip155-4002.json @@ -17,7 +17,7 @@ "explorers": [ { "name": "ftmscan", - "url": "https://testnet.ftmscan.com/", + "url": "https://testnet.ftmscan.com", "icon": "ftmscan", "standard": "EIP3091" } diff --git a/_data/chains/eip155-42261.json b/_data/chains/eip155-42261.json index f208a56f..7ebfaa7f 100644 --- a/_data/chains/eip155-42261.json +++ b/_data/chains/eip155-42261.json @@ -18,7 +18,7 @@ "networkId": 42261, "explorers": [{ "name": "Emerald Paratime Testnet Explorer", - "url": "https://testnet.explorer.emerald.oasis.dev/", + "url": "https://testnet.explorer.emerald.oasis.dev", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-42262.json b/_data/chains/eip155-42262.json index 93f656f8..5bf927bd 100644 --- a/_data/chains/eip155-42262.json +++ b/_data/chains/eip155-42262.json @@ -18,7 +18,7 @@ "networkId": 42262, "explorers": [{ "name": "Emerald Paratime Mainnet Explorer", - "url": "https://explorer.emerald.oasis.dev/", + "url": "https://explorer.emerald.oasis.dev", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-43113.json b/_data/chains/eip155-43113.json index 0d03b633..56eafee8 100644 --- a/_data/chains/eip155-43113.json +++ b/_data/chains/eip155-43113.json @@ -19,7 +19,7 @@ "explorers": [ { "name": "snowtrace", - "url": "https://testnet.snowtrace.io/", + "url": "https://testnet.snowtrace.io", "standard": "EIP3091" } ] diff --git a/_data/chains/eip155-43114.json b/_data/chains/eip155-43114.json index c31c0221..e4037701 100644 --- a/_data/chains/eip155-43114.json +++ b/_data/chains/eip155-43114.json @@ -18,7 +18,7 @@ "explorers": [ { "name": "snowtrace", - "url": "https://snowtrace.io/", + "url": "https://snowtrace.io", "standard": "EIP3091" } ] diff --git a/_data/chains/eip155-47805.json b/_data/chains/eip155-47805.json index 5171a65a..c0f706ed 100644 --- a/_data/chains/eip155-47805.json +++ b/_data/chains/eip155-47805.json @@ -17,7 +17,7 @@ "networkId": 47805, "explorers": [{ "name": "rei-scan", - "url": "https://scan.rei.network/", + "url": "https://scan.rei.network", "standard": "none" }] } diff --git a/_data/chains/eip155-486217935.json b/_data/chains/eip155-486217935.json index 83b8aca5..19b4050e 100644 --- a/_data/chains/eip155-486217935.json +++ b/_data/chains/eip155-486217935.json @@ -16,7 +16,7 @@ "networkId": 486217935, "explorers": [{ "name": "Blockscout", - "url": "https://devnet-explorer.gather.network/", + "url": "https://devnet-explorer.gather.network", "standard": "none" }] } diff --git a/_data/chains/eip155-52.json b/_data/chains/eip155-52.json index 236a8b61..d57083ea 100644 --- a/_data/chains/eip155-52.json +++ b/_data/chains/eip155-52.json @@ -16,7 +16,7 @@ "networkId": 52, "explorers": [{ "name": "coinexscan", - "url": "https://www.coinex.net/", + "url": "https://www.coinex.net", "standard": "none" }] } diff --git a/_data/chains/eip155-53.json b/_data/chains/eip155-53.json index 06ce0ac9..b13957b6 100644 --- a/_data/chains/eip155-53.json +++ b/_data/chains/eip155-53.json @@ -16,7 +16,7 @@ "networkId": 53, "explorers": [{ "name": "coinexscan", - "url": "https://testnet.coinex.net/", + "url": "https://testnet.coinex.net", "standard": "none" }] } diff --git a/_data/chains/eip155-55.json b/_data/chains/eip155-55.json index 0f729823..38b4fde7 100644 --- a/_data/chains/eip155-55.json +++ b/_data/chains/eip155-55.json @@ -21,7 +21,7 @@ "networkId": 55, "explorers": [{ "name": "zyxscan", - "url": "https://zyxscan.com/", + "url": "https://zyxscan.com", "standard": "none" }] } diff --git a/_data/chains/eip155-58.json b/_data/chains/eip155-58.json index d39a149f..abfaabef 100644 --- a/_data/chains/eip155-58.json +++ b/_data/chains/eip155-58.json @@ -20,7 +20,7 @@ "networkId": 58, "explorers": [{ "name": "explorer", - "url": "https://explorer.ont.io/", + "url": "https://explorer.ont.io", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-588.json b/_data/chains/eip155-588.json index 7c84e0ce..3548d440 100644 --- a/_data/chains/eip155-588.json +++ b/_data/chains/eip155-588.json @@ -15,7 +15,7 @@ "explorers": [ { "name": "blockscout", - "url": "https://stardust-explorer.metis.io/", + "url": "https://stardust-explorer.metis.io", "standard": "EIP3091" } ], diff --git a/_data/chains/eip155-60000.json b/_data/chains/eip155-60000.json index d325d232..bf9c3bde 100644 --- a/_data/chains/eip155-60000.json +++ b/_data/chains/eip155-60000.json @@ -18,7 +18,7 @@ "networkId": 60000, "explorers": [{ "name": "thinkiumscan", - "url": "https://test0.thinkiumscan.net/", + "url": "https://test0.thinkiumscan.net", "standard": "EIP3091" }] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-60001.json b/_data/chains/eip155-60001.json index 9becdf10..cece7c86 100644 --- a/_data/chains/eip155-60001.json +++ b/_data/chains/eip155-60001.json @@ -18,7 +18,7 @@ "networkId": 60001, "explorers": [{ "name": "thinkiumscan", - "url": "https://test1.thinkiumscan.net/", + "url": "https://test1.thinkiumscan.net", "standard": "EIP3091" }] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-60002.json b/_data/chains/eip155-60002.json index 541bce10..e8affefc 100644 --- a/_data/chains/eip155-60002.json +++ b/_data/chains/eip155-60002.json @@ -18,7 +18,7 @@ "networkId": 60002, "explorers": [{ "name": "thinkiumscan", - "url": "https://test2.thinkiumscan.net/", + "url": "https://test2.thinkiumscan.net", "standard": "EIP3091" }] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-70000.json b/_data/chains/eip155-70000.json index 42d58d88..98095c0e 100644 --- a/_data/chains/eip155-70000.json +++ b/_data/chains/eip155-70000.json @@ -16,7 +16,7 @@ "networkId": 70000, "explorers": [{ "name": "thinkiumscan", - "url": "https://chain0.thinkiumscan.net/", + "url": "https://chain0.thinkiumscan.net", "standard": "EIP3091" }] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-70001.json b/_data/chains/eip155-70001.json index a9129b49..c11dfac4 100644 --- a/_data/chains/eip155-70001.json +++ b/_data/chains/eip155-70001.json @@ -16,7 +16,7 @@ "networkId": 70001, "explorers": [{ "name": "thinkiumscan", - "url": "https://chain1.thinkiumscan.net/", + "url": "https://chain1.thinkiumscan.net", "standard": "EIP3091" }] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-70002.json b/_data/chains/eip155-70002.json index d26770a5..50c62539 100644 --- a/_data/chains/eip155-70002.json +++ b/_data/chains/eip155-70002.json @@ -16,7 +16,7 @@ "networkId": 70002, "explorers": [{ "name": "thinkiumscan", - "url": "https://chain2.thinkiumscan.net/", + "url": "https://chain2.thinkiumscan.net", "standard": "EIP3091" }] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-70103.json b/_data/chains/eip155-70103.json index a40d2d1d..e823540d 100644 --- a/_data/chains/eip155-70103.json +++ b/_data/chains/eip155-70103.json @@ -16,7 +16,7 @@ "networkId": 70103, "explorers": [{ "name": "thinkiumscan", - "url": "https://chain103.thinkiumscan.net/", + "url": "https://chain103.thinkiumscan.net", "standard": "EIP3091" }] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-80001.json b/_data/chains/eip155-80001.json index 8ae2d1c2..49db4bb8 100644 --- a/_data/chains/eip155-80001.json +++ b/_data/chains/eip155-80001.json @@ -20,7 +20,7 @@ "networkId": 80001, "explorers": [{ "name": "polygonscan", - "url": "https://mumbai.polygonscan.com/", + "url": "https://mumbai.polygonscan.com", "standard": "EIP3091" }] } diff --git a/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt b/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt index ee2f58d8..05c30ca2 100644 --- a/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt +++ b/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt @@ -189,7 +189,11 @@ fun checkChain(chainFile: File, connectRPC: Boolean) { val url = explorer["url"] if (url == null || url !is String || !url.startsWith("https://")) { - throw(ExplorerInvalidUrl()) + throw(ExplorerMustWithHttps()) + } + + if (url.endsWith("/")) { + throw(ExplorerCannotEndInSlash()) } if (explorer["standard"] != "EIP3091" && explorer["standard"] != "none") { diff --git a/processor/src/main/kotlin/org/ethereum/lists/chains/model/Exceptions.kt b/processor/src/main/kotlin/org/ethereum/lists/chains/model/Exceptions.kt index 9be8edbb..1f0830e1 100644 --- a/processor/src/main/kotlin/org/ethereum/lists/chains/model/Exceptions.kt +++ b/processor/src/main/kotlin/org/ethereum/lists/chains/model/Exceptions.kt @@ -15,7 +15,8 @@ class ShortNameMustNotBeStar: Exception("short name must not be '*'") class UnsupportedNamespace: Exception("So far only the EIP155 namespace is supported") class ExplorersMustBeArray: Exception("explorers must be an array") class ExplorerMustHaveName: Exception("Explorer must have name") -class ExplorerInvalidUrl: Exception("Explorer have url starting with https://") +class ExplorerMustWithHttps: Exception("Explorer have url starting with https://") +class ExplorerCannotEndInSlash: Exception("Explorer cannot have a slash on the end") class ExplorerStandardMustBeEIP3091OrNone: Exception("explorer standard must be 'none' or 'EIP3091'") class ParentHasInvalidType(type: String?): Exception("Parent has invalid type $type - only L2 or shard allowed") class ParentMustBeObject: Exception("parent must be an object") diff --git a/processor/src/test/kotlin/org/ethereum/lists/chains/TheChainChecker.kt b/processor/src/test/kotlin/org/ethereum/lists/chains/TheChainChecker.kt index a4c23394..327d8eb4 100644 --- a/processor/src/test/kotlin/org/ethereum/lists/chains/TheChainChecker.kt +++ b/processor/src/test/kotlin/org/ethereum/lists/chains/TheChainChecker.kt @@ -211,12 +211,12 @@ class TheChainChecker { checkChain(getFile("invalid/explorernoname/eip155-1.json"), false) } - @Test(expected = ExplorerInvalidUrl::class) + @Test(expected = ExplorerMustWithHttps::class) fun shouldFailOnInvalidUrl() { checkChain(getFile("invalid/explorerinvalidurl/eip155-1.json"), false) } - @Test(expected = ExplorerInvalidUrl::class) + @Test(expected = ExplorerMustWithHttps::class) fun shouldFailOnMissingURL() { checkChain(getFile("invalid/explorermissingurl/eip155-1.json"), false) } @@ -227,6 +227,6 @@ class TheChainChecker { checkChain(getFile("valid/eip155-5.json"), false) } - private fun getFile(s: String) = File(javaClass.classLoader.getResource("test_chains/$s").file) + private fun getFile(s: String) = File(javaClass.classLoader.getResource("test_chains/$s")!!.file) } \ No newline at end of file