diff --git a/README.md b/README.md index 117d5038..6588439c 100644 --- a/README.md +++ b/README.md @@ -101,4 +101,5 @@ There are also aggregated json files with all chains automatically assembled: * [chainmap.io](https://chainmap.io) * [chainlist.in](https://www.chainlist.in) * [chainz.me](https://chainz.me) + * [Otterscan](https://otterscan.io) * Your project - contact us to add it here! diff --git a/_data/chains/eip155-100.json b/_data/chains/eip155-100.json index 1ba46ec4..97d374eb 100644 --- a/_data/chains/eip155-100.json +++ b/_data/chains/eip155-100.json @@ -1,6 +1,7 @@ { "name": "Gnosis Chain (formerly xDai)", "chain": "Gnosis", + "icon": "gnosis", "rpc": [ "https://rpc.gnosischain.com", "https://xdai.poanetwork.dev", @@ -21,10 +22,10 @@ "chainId": 100, "networkId": 100, "slip44": 700, - "explorers": [{ "name": "blockscout", "url": "https://blockscout.com/xdai/mainnet", + "icon": "blockscout", "standard": "EIP3091" }] } diff --git a/_data/chains/eip155-1008.json b/_data/chains/eip155-1008.json new file mode 100644 index 00000000..9931f8c5 --- /dev/null +++ b/_data/chains/eip155-1008.json @@ -0,0 +1,28 @@ +{ + "name":"Eurus Mainnet", + "chain":"EUN", + "network":"eurus", + "rpc":[ + "https://mainnet.eurus.network/" + ], + "faucets":[ + ], + "nativeCurrency":{ + "name":"Eurus", + "symbol":"EUN", + "decimals":18 + }, + "infoURL":"https://eurus.network", + "shortName":"eun", + "chainId":1008, + "networkId":1008, + "icon":"eurus", + "explorers":[ + { + "name":"eurusexplorer", + "url":"https://explorer.eurus.network", + "icon":"eurus", + "standard":"none" + } + ] + } \ No newline at end of file diff --git a/_data/chains/eip155-107.json b/_data/chains/eip155-107.json index f41e8b7c..27c18f63 100644 --- a/_data/chains/eip155-107.json +++ b/_data/chains/eip155-107.json @@ -3,8 +3,7 @@ "chain": "NTN", "icon": "nebulatestnet", "rpc": [ - "https://testnet.rpc.novanetwork.io:9070", - "http://testnet.rpc.novanetwork.io:8545" + "https://testnet.rpc.novanetwork.io:9070" ], "faucets": [], "nativeCurrency": { diff --git a/_data/chains/eip155-11111.json b/_data/chains/eip155-11111.json index 6123e340..276dbdec 100644 --- a/_data/chains/eip155-11111.json +++ b/_data/chains/eip155-11111.json @@ -3,9 +3,11 @@ "chain": "WAGMI", "icon": "wagmi", "rpc": [ - "https://api.trywagmi.xyz/rpc" + "https://subnets.avax.network/wagmi/wagmi-chain-testnet/rpc" + ], + "faucets": [ + "https://faucet.trywagmi.xyz" ], - "faucets": [], "nativeCurrency": { "name": "WAGMI", "symbol": "WGM", @@ -18,8 +20,8 @@ "explorers": [ { "name": "WAGMI Explorer", - "url": "https://trywagmi.xyz", - "standard": "none" + "url": "https://subnets.avax.network/wagmi/wagmi-chain-testnet/explorer", + "standard": "EIP3091" } ] -} \ No newline at end of file +} diff --git a/_data/chains/eip155-11155111.json b/_data/chains/eip155-11155111.json index 2db2d033..35e6e361 100644 --- a/_data/chains/eip155-11155111.json +++ b/_data/chains/eip155-11155111.json @@ -2,9 +2,11 @@ "name": "Sepolia", "title": "Ethereum Testnet Sepolia", "chain": "ETH", + "network": "testnet", "rpc": [ ], "faucets": [ + "http://fauceth.komputing.org?chain=11155111&address=${ADDRESS}" ], "nativeCurrency": { "name": "Sepolia Ether", diff --git a/_data/chains/deprecated/eip155-1286.json b/_data/chains/eip155-1286.json similarity index 63% rename from _data/chains/deprecated/eip155-1286.json rename to _data/chains/eip155-1286.json index 3cc60c66..87c2353c 100644 --- a/_data/chains/deprecated/eip155-1286.json +++ b/_data/chains/eip155-1286.json @@ -1,5 +1,5 @@ { - "name": "Moonrock", + "name": "Moonrock old", "chain": "MOON", "rpc": [], "faucets": [], @@ -9,7 +9,8 @@ "decimals": 18 }, "infoURL": "", - "shortName": "mrock", + "shortName": "mrock-old", "chainId": 1286, - "networkId": 1286 -} \ No newline at end of file + "networkId": 1286, + "deprecated": true +} diff --git a/_data/chains/eip155-1337.json b/_data/chains/eip155-1337.json new file mode 100644 index 00000000..b30f09d2 --- /dev/null +++ b/_data/chains/eip155-1337.json @@ -0,0 +1,16 @@ +{ + "name": "CENNZnet old", + "chain": "CENNZnet", + "rpc": [], + "faucets": [], + "nativeCurrency": { + "name": "CPAY", + "symbol": "CPAY", + "decimals": 18 + }, + "infoURL": "https://cennz.net", + "shortName": "cennz-old", + "chainId": 1337, + "networkId": 1337, + "deprecated": true +} \ No newline at end of file diff --git a/_data/chains/eip155-141.json b/_data/chains/eip155-141.json new file mode 100644 index 00000000..8767132a --- /dev/null +++ b/_data/chains/eip155-141.json @@ -0,0 +1,26 @@ +{ + "name": "Openpiece Testnet", + "chain": "OPENPIECE", + "icon": "openpiece", + "network": "testnet", + "rpc": [ + "https://testnet.openpiece.io" + ], + "faucets": [], + "nativeCurrency": { + "name": "Belly", + "symbol": "BELLY", + "decimals": 18 + }, + "infoURL": "https://cryptopiece.online", + "shortName": "OPtest", + "chainId": 141, + "networkId": 141, + "explorers": [ + { + "name": "Belly Scan", + "url": "https://testnet.bellyscan.com", + "standard": "none" + } + ] +} diff --git a/_data/chains/eip155-16001.json b/_data/chains/eip155-16001.json index 9727cebc..64d0a66a 100644 --- a/_data/chains/eip155-16001.json +++ b/_data/chains/eip155-16001.json @@ -9,7 +9,7 @@ ], "nativeCurrency": { "name": "MetaDot Token TestNet", - "symbol": "MTT-test", + "symbol": "MTTest", "decimals": 18 }, "infoURL": "https://metadot.network", diff --git a/_data/chains/eip155-1666600000.json b/_data/chains/eip155-1666600000.json index 0a19b696..0052bd66 100644 --- a/_data/chains/eip155-1666600000.json +++ b/_data/chains/eip155-1666600000.json @@ -2,7 +2,8 @@ "name": "Harmony Mainnet Shard 0", "chain": "Harmony", "rpc": [ - "https://api.harmony.one" + "https://api.harmony.one", + "https://api.s0.t.hmny.io" ], "faucets": ["https://free-online-app.com/faucet-for-eth-evm-chains/"], "nativeCurrency": { diff --git a/_data/chains/eip155-1666600001.json b/_data/chains/eip155-1666600001.json index 4c7330bc..8f6613ff 100644 --- a/_data/chains/eip155-1666600001.json +++ b/_data/chains/eip155-1666600001.json @@ -2,7 +2,7 @@ "name": "Harmony Mainnet Shard 1", "chain": "Harmony", "rpc": [ - "https://s1.api.harmony.one" + "https://api.s1.t.hmny.io" ], "faucets": [ ], diff --git a/_data/chains/eip155-1666600002.json b/_data/chains/eip155-1666600002.json index 5b0b933d..be5f1223 100644 --- a/_data/chains/eip155-1666600002.json +++ b/_data/chains/eip155-1666600002.json @@ -2,7 +2,7 @@ "name": "Harmony Mainnet Shard 2", "chain": "Harmony", "rpc": [ - "https://s2.api.harmony.one" + "https://api.s2.t.hmny.io" ], "faucets": [ ], diff --git a/_data/chains/eip155-1666600003.json b/_data/chains/eip155-1666600003.json index 3bf7e72c..50bf2f62 100644 --- a/_data/chains/eip155-1666600003.json +++ b/_data/chains/eip155-1666600003.json @@ -2,7 +2,7 @@ "name": "Harmony Mainnet Shard 3", "chain": "Harmony", "rpc": [ - "https://s3.api.harmony.one" + "https://api.s3.t.hmny.io" ], "faucets": [ ], diff --git a/_data/chains/eip155-168.json b/_data/chains/eip155-168.json new file mode 100644 index 00000000..7727c34b --- /dev/null +++ b/_data/chains/eip155-168.json @@ -0,0 +1,25 @@ +{ + "name": "AIOZ Network", + "chain": "AIOZ", + "network": "mainnet", + "icon": "aioz", + "rpc": [ + "https://eth-dataseed.aioz.network" + ], + "faucets": [], + "nativeCurrency": { + "name": "AIOZ", + "symbol": "AIOZ", + "decimals": 18 + }, + "infoURL": "https://aioz.network", + "shortName": "aioz", + "chainId": 168, + "networkId": 168, + "slip44": 60, + "explorers": [{ + "name": "AIOZ Network Explorer", + "url": "https://explorer.aioz.network", + "standard": "EIP3091" + }] +} diff --git a/_data/chains/eip155-1688.json b/_data/chains/eip155-1688.json new file mode 100644 index 00000000..a70f580a --- /dev/null +++ b/_data/chains/eip155-1688.json @@ -0,0 +1,18 @@ +{ + "name": "LUDAN Mainnet", + "chain": "LUDAN", + "rpc": [ + "https://rpc.ludan.org/" + ], + "faucets": [], + "nativeCurrency": { + "name": "LUDAN", + "symbol": "LUDAN", + "decimals": 18 + }, + "infoURL": "https://www.ludan.org/", + "shortName": "LUDAN", + "icon": "ludan", + "chainId": 1688, + "networkId": 1688 +} diff --git a/_data/chains/eip155-1984.json b/_data/chains/eip155-1984.json new file mode 100644 index 00000000..f0a94680 --- /dev/null +++ b/_data/chains/eip155-1984.json @@ -0,0 +1,28 @@ +{ + "name":"Eurus Testnet", + "chain":"EUN", + "network":"eurus-testnet", + "rpc":[ + "https://testnet.eurus.network" + ], + "faucets":[ + ], + "nativeCurrency":{ + "name":"Eurus", + "symbol":"EUN", + "decimals":18 + }, + "infoURL":"https://eurus.network", + "shortName":"euntest", + "chainId":1984, + "networkId":1984, + "icon":"eurus", + "explorers":[ + { + "name":"testnetexplorer", + "url":"https://testnetexplorer.eurus.network", + "icon":"eurus", + "standard":"none" + } + ] + } \ No newline at end of file diff --git a/_data/chains/eip155-2001.json b/_data/chains/eip155-2001.json new file mode 100644 index 00000000..65a69bda --- /dev/null +++ b/_data/chains/eip155-2001.json @@ -0,0 +1,27 @@ +{ + "name": "Milkomeda C1 Mainnet", + "chain": "milkAda", + "icon": "milkomeda", + "network": "mainnet", + "rpc": [ + "https://rpc-mainnet-cardano-evm.c1.milkomeda.com", + "wss://rpc-mainnet-cardano-evm.c1.milkomeda.com" + ], + "faucets": [], + "nativeCurrency": { + "name": "milkAda", + "symbol": "mADA", + "decimals": 18 + }, + "infoURL": "https://milkomeda.com", + "shortName": "milkAda", + "chainId": 2001, + "networkId": 2001, + "explorers": [ + { + "name": "Blockscout", + "url": "https://explorer-mainnet-cardano-evm.c1.milkomeda.com", + "standard": "none" + } + ] +} diff --git a/_data/chains/eip155-200101.json b/_data/chains/eip155-200101.json new file mode 100644 index 00000000..00395c65 --- /dev/null +++ b/_data/chains/eip155-200101.json @@ -0,0 +1,27 @@ +{ + "name": "Milkomeda C1 Testnet", + "chain": "milkTAda", + "icon": "milkomeda", + "network": "testnet", + "rpc": [ + "https://rpc-devnet-cardano-evm.c1.milkomeda.com", + "wss://rpc-devnet-cardano-evm.c1.milkomeda.com" + ], + "faucets": [], + "nativeCurrency": { + "name": "milkTAda", + "symbol": "mTAda", + "decimals": 18 + }, + "infoURL": "https://milkomeda.com", + "shortName": "milkTAda", + "chainId": 200101, + "networkId": 200101, + "explorers": [ + { + "name": "Blockscout", + "url": "https://explorer-devnet-cardano-evm.c1.milkomeda.com", + "standard": "none" + } + ] +} diff --git a/_data/chains/eip155-201018.json b/_data/chains/eip155-201018.json index 560137ef..6bc3aa07 100644 --- a/_data/chains/eip155-201018.json +++ b/_data/chains/eip155-201018.json @@ -3,7 +3,7 @@ "chain": "Alaya", "rpc": [ "https://openapi.alaya.network/rpc", - "wss://openapi.alaya.network/ws" + "wss://openapi.alaya.network/ws" ], "faucets": [], "nativeCurrency": { diff --git a/_data/chains/eip155-210425.json b/_data/chains/eip155-210425.json index 21b73ff8..64be201c 100644 --- a/_data/chains/eip155-210425.json +++ b/_data/chains/eip155-210425.json @@ -4,7 +4,7 @@ "network": "mainnet", "rpc": [ "https://openapi.platon.network/rpc", - "wss://openapi.platon.network/ws" + "wss://openapi.platon.network/ws" ], "faucets": [], "nativeCurrency": { diff --git a/_data/chains/eip155-21337.json b/_data/chains/eip155-21337.json new file mode 100644 index 00000000..cb352546 --- /dev/null +++ b/_data/chains/eip155-21337.json @@ -0,0 +1,24 @@ +{ + "name": "CENNZnet Azalea", + "chain": "CENNZnet", + "network": "azalea", + "rpc": [ + "https://cennznet.unfrastructure.io/public" + ], + "faucets": [], + "nativeCurrency": { + "name": "CPAY", + "symbol": "CPAY", + "decimals": 18 + }, + "infoURL": "https://cennz.net", + "shortName": "cennz-a", + "chainId": 21337, + "networkId": 21337, + "icon": "cennz", + "explorers": [{ + "name": "UNcover", + "url": "https://uncoverexplorer.com", + "standard": "none" + }] + } \ No newline at end of file diff --git a/_data/chains/eip155-2152.json b/_data/chains/eip155-2152.json new file mode 100644 index 00000000..affa07c3 --- /dev/null +++ b/_data/chains/eip155-2152.json @@ -0,0 +1,23 @@ +{ + "name": "Findora Mainnet", + "chain": "Findora", + "network": "mainnet", + "rpc": ["https://prod-mainnet.prod.findora.org:8545"], + "faucets": [], + "nativeCurrency": { + "name": "FRA", + "symbol": "FRA", + "decimals": 18 + }, + "infoURL": "https://findora.org/", + "shortName": "fra", + "chainId": 2152, + "networkId": 2152, + "explorers": [ + { + "name": "findorascan", + "url": "https://evm.findorascan.io", + "standard": "EIP3091" + } + ] +} diff --git a/_data/chains/eip155-2153.json b/_data/chains/eip155-2153.json new file mode 100644 index 00000000..b8e3bed9 --- /dev/null +++ b/_data/chains/eip155-2153.json @@ -0,0 +1,23 @@ +{ + "name": "Findora Testnet", + "chain": "Testnet-anvil", + "network": "testnet", + "rpc": ["https://prod-testnet.prod.findora.org:8545/"], + "faucets": [], + "nativeCurrency": { + "name": "FRA", + "symbol": "FRA", + "decimals": 18 + }, + "infoURL": "https://findora.org/", + "shortName": "findora-testnet", + "chainId": 2153, + "networkId": 2153, + "explorers": [ + { + "name": "findorascan", + "url": "https://testnet-anvil.evm.findorascan.io", + "standard": "EIP3091" + } + ] +} diff --git a/_data/chains/deprecated/eip155-218.json b/_data/chains/eip155-218.json similarity index 71% rename from _data/chains/deprecated/eip155-218.json rename to _data/chains/eip155-218.json index 9cc2c382..fae3262a 100644 --- a/_data/chains/deprecated/eip155-218.json +++ b/_data/chains/eip155-218.json @@ -1,5 +1,5 @@ { - "name": "SoterOne Mainnet", + "name": "SoterOne Mainnet old", "chain": "SOTER", "rpc": [ "https://rpc.soter.one" @@ -12,7 +12,8 @@ "decimals": 18 }, "infoURL": "https://www.soterone.com", - "shortName": "SO1", + "shortName": "SO1-old", "chainId": 218, - "networkId": 218 + "networkId": 218, + "deprecated": true } diff --git a/_data/chains/eip155-210309.json b/_data/chains/eip155-2203181.json similarity index 81% rename from _data/chains/eip155-210309.json rename to _data/chains/eip155-2203181.json index aed0e533..1b349ce3 100644 --- a/_data/chains/eip155-210309.json +++ b/_data/chains/eip155-2203181.json @@ -2,8 +2,8 @@ "name": "PlatON Dev Testnet", "chain": "PlatON", "rpc": [ - "https://devnetopenapi.platon.network/rpc", - "wss://devnetopenapi.platon.network/ws" + "https://devnetopenapi2.platon.network/rpc", + "wss://devnetopenapi2.platon.network/ws" ], "faucets": [ "https://faucet.platon.network/faucet/?id=e5d32df10aee11ec911142010a667c03" @@ -15,7 +15,7 @@ }, "infoURL": "https://www.platon.network", "shortName": "platondev", - "chainId": 210309, + "chainId": 2203181, "networkId": 1, "icon": "platon", "explorers": [ diff --git a/_data/chains/eip155-2221.json b/_data/chains/eip155-2221.json new file mode 100644 index 00000000..d9a33a82 --- /dev/null +++ b/_data/chains/eip155-2221.json @@ -0,0 +1,25 @@ +{ + "name": "Kava EVM Testnet", + "chain": "KAVA", + "network": "testnet", + "rpc": ["https://evm.evm-alpha.kava.io", "wss://evm-ws.evm-alpha.kava.io"], + "faucets": ["https://faucet.kava.io"], + "nativeCurrency": { + "name": "Kava", + "symbol": "KAVA", + "decimals": 18 + }, + "infoURL": "https://www.kava.io", + "shortName": "kava", + "chainId": 2221, + "networkId": 2221, + "icon": "kava", + "explorers": [ + { + "name": "Kava Testnet Explorer", + "url": "https://explorer.evm-alpha.kava.io", + "standard": "EIP3091", + "icon": "kava" + } + ] +} diff --git a/_data/chains/eip155-225.json b/_data/chains/eip155-225.json new file mode 100644 index 00000000..ca9055df --- /dev/null +++ b/_data/chains/eip155-225.json @@ -0,0 +1,23 @@ +{ + "name": "LACHAIN Mainnet", + "chain": "LA", + "icon": "lachain", + "rpc": [ + "https://rpc-mainnet.lachain.io" + ], + "faucets": [], + "nativeCurrency": { + "name": "LA", + "symbol": "LA", + "decimals": 18 + }, + "infoURL": "https://lachain.io", + "shortName": "LA", + "chainId": 225, + "networkId": 225, + "explorers": [{ + "name": "blockscout", + "url": "https://scan.lachain.io", + "standard": "EIP3091" + }] +} diff --git a/_data/chains/eip155-226.json b/_data/chains/eip155-226.json new file mode 100644 index 00000000..215729d4 --- /dev/null +++ b/_data/chains/eip155-226.json @@ -0,0 +1,23 @@ +{ + "name": "LACHAIN Testnet", + "chain": "TLA", + "icon": "lachain", + "rpc": [ + "https://rpc-testnet.lachain.io" + ], + "faucets": [], + "nativeCurrency": { + "name": "TLA", + "symbol": "TLA", + "decimals": 18 + }, + "infoURL": "https://lachain.io", + "shortName": "TLA", + "chainId": 226, + "networkId": 226, + "explorers": [{ + "name": "blockscout", + "url": "https://scan-test.lachain.io", + "standard": "EIP3091" + }] +} diff --git a/_data/chains/eip155-3.json b/_data/chains/eip155-3.json index 1857ee89..cd487bb1 100644 --- a/_data/chains/eip155-3.json +++ b/_data/chains/eip155-3.json @@ -2,6 +2,7 @@ "name": "Ropsten", "title": "Ethereum Testnet Ropsten", "chain": "ETH", + "network": "testnet", "rpc": [ "https://ropsten.infura.io/v3/${INFURA_API_KEY}", "wss://ropsten.infura.io/ws/v3/${INFURA_API_KEY}" diff --git a/_data/chains/eip155-300.json b/_data/chains/eip155-300.json new file mode 100644 index 00000000..fb5b4f86 --- /dev/null +++ b/_data/chains/eip155-300.json @@ -0,0 +1,24 @@ +{ + "name": "Optimism on Gnosis Chain", + "chain": "OGC", + "rpc": [ + "https://optimism.gnosischain.com", + "wss://optimism.gnosischain.com/wss" + ], + "faucets": ["https://faucet.gimlu.com/gnosis"], + "nativeCurrency": { + "name": "xDAI", + "symbol": "xDAI", + "decimals": 18 + }, + "infoURL": "https://www.xdaichain.com/for-developers/optimism-optimistic-rollups-on-gc", + "shortName": "ogc", + "chainId": 300, + "networkId": 300, + "explorers": [{ + "name": "blockscout", + "url": "https://blockscout.com/xdai/optimism", + "icon": "blockscout", + "standard": "EIP3091" + }] +} diff --git a/_data/chains/eip155-3000.json b/_data/chains/eip155-3000.json new file mode 100644 index 00000000..87b75f7b --- /dev/null +++ b/_data/chains/eip155-3000.json @@ -0,0 +1,21 @@ +{ + "name": "CENNZnet Rata", + "chain": "CENNZnet", + "network": "rata", + "rpc": [ + "https://rata.centrality.me/public" + ], + "faucets": [ + "https://app-faucet.centrality.me" + ], + "nativeCurrency": { + "name": "CPAY", + "symbol": "CPAY", + "decimals": 18 + }, + "infoURL": "https://cennz.net", + "shortName": "cennz-r", + "chainId": 3000, + "networkId": 3000, + "icon": "cennz" + } \ No newline at end of file diff --git a/_data/chains/eip155-3001.json b/_data/chains/eip155-3001.json new file mode 100644 index 00000000..486e98d6 --- /dev/null +++ b/_data/chains/eip155-3001.json @@ -0,0 +1,26 @@ +{ + "name": "CENNZnet Nikau", + "chain": "CENNZnet", + "network": "nikau", + "rpc": [ + "https://nikau.centrality.me/public" + ], + "faucets": [ + "https://app-faucet.centrality.me" + ], + "nativeCurrency": { + "name": "CPAY", + "symbol": "CPAY", + "decimals": 18 + }, + "infoURL": "https://cennz.net", + "shortName": "cennz-n", + "chainId": 3001, + "networkId": 3001, + "icon": "cennz", + "explorers": [{ + "name": "UNcover", + "url": "https://www.uncoverexplorer.com/?network=Nikau", + "standard": "none" + }] + } \ No newline at end of file diff --git a/_data/chains/eip155-335.json b/_data/chains/eip155-335.json new file mode 100644 index 00000000..aea5f4b4 --- /dev/null +++ b/_data/chains/eip155-335.json @@ -0,0 +1,27 @@ +{ + "name": "DFK Chain Test", + "chain": "DFK", + "icon": "dfk", + "network": "testnet", + "rpc": [ + "https://subnets.avax.network/defi-kingdoms/dfk-chain-testnet/rpc" + ], + "faucets": [], + "nativeCurrency": { + "name": "Jewel", + "symbol": "JEWEL", + "decimals": 18 + }, + "infoURL": "https://defikingdoms.com", + "shortName": "DFKTEST", + "chainId": 335, + "networkId": 335, + "explorers": [ + { + "name": "ethernal", + "url": "https://explorer-test.dfkchain.com", + "icon": "ethereum", + "standard": "none" + } + ] +} \ No newline at end of file diff --git a/_data/chains/eip155-356256156.json b/_data/chains/eip155-356256156.json index 04e99e81..eec8b1a6 100644 --- a/_data/chains/eip155-356256156.json +++ b/_data/chains/eip155-356256156.json @@ -1,5 +1,5 @@ { - "name": "Gather Tesnet Network", + "name": "Gather Testnet Network", "chain": "GTH", "rpc": [ "https://testnet.gather.network" diff --git a/_data/chains/eip155-385.json b/_data/chains/eip155-385.json index afb79bac..30c74158 100644 --- a/_data/chains/eip155-385.json +++ b/_data/chains/eip155-385.json @@ -9,11 +9,11 @@ ], "nativeCurrency": { "name": "Lisinski Ether", - "symbol": "LISINSKI", + "symbol": "LISINS", "decimals": 18 }, "infoURL": "https://lisinski.online", "shortName": "lisinski", "chainId": 385, "networkId": 385 -} \ No newline at end of file +} diff --git a/_data/chains/eip155-4.json b/_data/chains/eip155-4.json index 341b245e..84c77276 100644 --- a/_data/chains/eip155-4.json +++ b/_data/chains/eip155-4.json @@ -2,6 +2,7 @@ "name": "Rinkeby", "title": "Ethereum Testnet Rinkeby", "chain": "ETH", + "network": "testnet", "rpc": [ "https://rinkeby.infura.io/v3/${INFURA_API_KEY}", "wss://rinkeby.infura.io/ws/v3/${INFURA_API_KEY}" diff --git a/_data/chains/eip155-4102.json b/_data/chains/eip155-4102.json new file mode 100644 index 00000000..8593a577 --- /dev/null +++ b/_data/chains/eip155-4102.json @@ -0,0 +1,25 @@ +{ + "name": "AIOZ Network Testnet", + "chain": "AIOZ", + "network": "testnet", + "icon": "aioz", + "rpc": [ + "https://eth-ds.testnet.aioz.network" + ], + "faucets": [], + "nativeCurrency": { + "name": "testAIOZ", + "symbol": "AIOZ", + "decimals": 18 + }, + "infoURL": "https://aioz.network", + "shortName": "aioz-testnet", + "chainId": 4102, + "networkId": 4102, + "slip44": 60, + "explorers": [{ + "name": "AIOZ Network Testnet Explorer", + "url": "https://testnet.explorer.aioz.network", + "standard": "EIP3091" + }] +} diff --git a/_data/chains/eip155-42.json b/_data/chains/eip155-42.json index 4f2fef1b..cb231a53 100644 --- a/_data/chains/eip155-42.json +++ b/_data/chains/eip155-42.json @@ -2,6 +2,7 @@ "name": "Kovan", "title": "Ethereum Testnet Kovan", "chain": "ETH", + "network": "testnet", "rpc": [ "https://kovan.poa.network", "http://kovan.poa.network:8545", diff --git a/_data/chains/eip155-45000.json b/_data/chains/eip155-45000.json new file mode 100644 index 00000000..5163f518 --- /dev/null +++ b/_data/chains/eip155-45000.json @@ -0,0 +1,25 @@ +{ + "name": "Autobahn Network", + "chain": "BNB", + "network": "mainnet", + "rpc": [ + "https://rpc.autobahn.network" + ], + "faucets": [], + "nativeCurrency": { + "name": "BNB", + "symbol": "BNB", + "decimals": 18 + }, + "infoURL": "https://autobahn.network", + "shortName": "autobahn", + "chainId": 45000, + "networkId": 45000, + "icon": "autobahn", + "explorers": [{ + "name": "autobahn explorer", + "url": "https://explorer.autobahn.network", + "icon": "autobahn", + "standard": "EIP3091" + }] +} diff --git a/_data/chains/eip155-5.json b/_data/chains/eip155-5.json index 70c1cec9..51269407 100644 --- a/_data/chains/eip155-5.json +++ b/_data/chains/eip155-5.json @@ -2,6 +2,7 @@ "name": "Görli", "title": "Ethereum Testnet Görli", "chain": "ETH", + "network": "testnet", "rpc": [ "https://goerli.infura.io/v3/${INFURA_API_KEY}", "wss://goerli.infura.io/v3/${INFURA_API_KEY}", diff --git a/_data/chains/eip155-53935.json b/_data/chains/eip155-53935.json new file mode 100644 index 00000000..5b36e61e --- /dev/null +++ b/_data/chains/eip155-53935.json @@ -0,0 +1,27 @@ +{ + "name": "DFK Chain", + "chain": "DFK", + "icon": "dfk", + "network": "mainnet", + "rpc": [ + "https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc" + ], + "faucets": [], + "nativeCurrency": { + "name": "Jewel", + "symbol": "JEWEL", + "decimals": 18 + }, + "infoURL": "https://defikingdoms.com", + "shortName": "DFK", + "chainId": 53935, + "networkId": 53935, + "explorers": [ + { + "name": "ethernal", + "url": "https://explorer.dfkchain.com", + "icon": "ethereum", + "standard": "none" + } + ] +} \ No newline at end of file diff --git a/_data/chains/eip155-54.json b/_data/chains/eip155-54.json new file mode 100644 index 00000000..3ae973d4 --- /dev/null +++ b/_data/chains/eip155-54.json @@ -0,0 +1,26 @@ +{ + "name": "Openpiece Mainnet", + "chain": "OPENPIECE", + "icon": "openpiece", + "network": "mainnet", + "rpc": [ + "https://mainnet.openpiece.io" + ], + "faucets": [], + "nativeCurrency": { + "name": "Belly", + "symbol": "BELLY", + "decimals": 18 + }, + "infoURL": "https://cryptopiece.online", + "shortName": "OP", + "chainId": 54, + "networkId": 54, + "explorers": [ + { + "name": "Belly Scan", + "url": "https://bellyscan.com", + "standard": "none" + } + ] +} diff --git a/_data/chains/eip155-5777.json b/_data/chains/eip155-5777.json new file mode 100644 index 00000000..d37a28c4 --- /dev/null +++ b/_data/chains/eip155-5777.json @@ -0,0 +1,26 @@ +{ + "name": "Digest Swarm Chain", + "chain": "DSC", + "icon": "swarmchain", + "rpc": [ + "https://rpc.digestgroup.ltd" + ], + "faucets": [], + "nativeCurrency": { + "name": "DigestCoin", + "symbol": "DGCC", + "decimals": 18 + }, + "infoURL": "https://digestgroup.ltd", + "shortName": "dgcc", + "chainId": 5777, + "networkId": 5777, + "explorers": [ + { + "name": "swarmexplorer", + "url": "https://explorer.digestgroup.ltd", + "standard": "EIP3091" + } + ] +} + \ No newline at end of file diff --git a/_data/chains/eip155-58.json b/_data/chains/eip155-58.json index abfaabef..fc081b15 100644 --- a/_data/chains/eip155-58.json +++ b/_data/chains/eip155-58.json @@ -2,25 +2,31 @@ "name": "Ontology Mainnet", "chain": "Ontology", "rpc": [ - "https://dappnode1.ont.io:20339", - "https://dappnode2.ont.io:20339", - "https://dappnode3.ont.io:20339", - "https://dappnode4.ont.io:20339" + "http://dappnode1.ont.io:20339", + "http://dappnode2.ont.io:20339", + "http://dappnode3.ont.io:20339", + "http://dappnode4.ont.io:20339", + "https://dappnode1.ont.io:10339", + "https://dappnode2.ont.io:10339", + "https://dappnode3.ont.io:10339", + "https://dappnode4.ont.io:10339" ], "faucets": [ ], "nativeCurrency": { "name": "ONG", "symbol": "ONG", - "decimals": 9 + "decimals": 18 }, "infoURL": "https://ont.io/", "shortName": "Ontology Mainnet", "chainId": 58, "networkId": 58, - "explorers": [{ - "name": "explorer", - "url": "https://explorer.ont.io", - "standard": "EIP3091" - }] + "explorers": [ + { + "name": "explorer", + "url": "https://explorer.ont.io", + "standard": "EIP3091" + } + ] } diff --git a/_data/chains/eip155-5851.json b/_data/chains/eip155-5851.json index 5ebaa18c..a5611eba 100644 --- a/_data/chains/eip155-5851.json +++ b/_data/chains/eip155-5851.json @@ -2,10 +2,14 @@ "name": "Ontology Testnet", "chain": "Ontology", "rpc": [ - "https://polaris1.ont.io:20339", - "https://polaris2.ont.io:20339", - "https://polaris3.ont.io:20339", - "https://polaris4.ont.io:20339" + "http://polaris1.ont.io:20339", + "http://polaris2.ont.io:20339", + "http://polaris3.ont.io:20339", + "http://polaris4.ont.io:20339", + "https://polaris1.ont.io:10339", + "https://polaris2.ont.io:10339", + "https://polaris3.ont.io:10339", + "https://polaris4.ont.io:10339" ], "faucets": [ "https://developer.ont.io/" @@ -13,7 +17,7 @@ "nativeCurrency": { "name": "ONG", "symbol": "ONG", - "decimals": 9 + "decimals": 18 }, "infoURL": "https://ont.io/", "shortName": "Ontology Testnet", diff --git a/_data/chains/eip155-700.json b/_data/chains/eip155-700.json new file mode 100644 index 00000000..bddac1cc --- /dev/null +++ b/_data/chains/eip155-700.json @@ -0,0 +1,23 @@ +{ + "name": "Star Social Testnet", + "chain": "SNS", + "rpc": [ + "https://avastar.cc/ext/bc/C/rpc" + ], + "faucets": [ + ], + "nativeCurrency": { + "name": "Social", + "symbol": "SNS", + "decimals": 18 + }, + "infoURL": "https://info.avastar.cc", + "shortName": "SNS", + "chainId": 700, + "networkId": 700, + "explorers": [{ + "name": "starscan", + "url": "https://avastar.info", + "standard": "EIP3091" + }] + } \ No newline at end of file diff --git a/_data/chains/eip155-788.json b/_data/chains/eip155-788.json new file mode 100644 index 00000000..47f125d1 --- /dev/null +++ b/_data/chains/eip155-788.json @@ -0,0 +1,26 @@ +{ + "name": "Aerochain Testnet", + "chain": "Aerochain", + "network": "testnet", + "rpc": [ + "https://testnet-rpc.aerochain.id/" + ], + "faucets": [ + "https://faucet.aerochain.id/" + ], + "nativeCurrency": { + "name": "Aerochain Testnet", + "symbol": "TAero", + "decimals": 18 + }, + "infoURL": "https://aerochaincoin.org/", + "shortName": "taero", + "chainId": 788, + "networkId": 788, + "explorers": [{ + "name": "aeroscan", + "url": "https://testnet.aeroscan.id", + "standard": "EIP3091" + }] +} + diff --git a/_data/chains/eip155-79.json b/_data/chains/eip155-79.json new file mode 100644 index 00000000..d2e5f343 --- /dev/null +++ b/_data/chains/eip155-79.json @@ -0,0 +1,24 @@ +{ + "name": "Zenith Mainnet", + "chain": "Zenith", + "rpc": [ + "https://dataserver-1.zenithchain.co/", + "https://dataserver-us-1.zenithchain.co/" + ], + "faucets": [], + "nativeCurrency": { + "name": "ZENITH", + "symbol": "ZENITH", + "decimals": 18 + }, + "infoURL": "https://www.zenithchain.co/", + "chainId": 79, + "networkId": 79, + "shortName": "zenith", + "explorers": [{ + "name": "zenith scan", + "url": "https://scan.zenithchain.co", + "standard": "EIP3091" + }] + } + \ No newline at end of file diff --git a/_data/chains/eip155-81.json b/_data/chains/eip155-81.json new file mode 100644 index 00000000..ad8537fb --- /dev/null +++ b/_data/chains/eip155-81.json @@ -0,0 +1,23 @@ +{ + "name": "Villinius", + "chain": "Zenith", + "rpc": [ + "https://vilinius.zenithchain.co/http" + ], + "faucets": ["https://faucet.zenithchain.co/"], + "nativeCurrency": { + "name": "Villinius", + "symbol": "VIL", + "decimals": 18 + }, + "infoURL": "https://www.zenithchain.co/", + "chainId": 81, + "networkId": 81, + "shortName": "VIL", + "explorers": [{ + "name": "villinius zenith scan", + "url": "https://vilinius.scan.zenithchain.co", + "standard": "EIP3091" + }] + } + \ No newline at end of file diff --git a/_data/chains/eip155-868455272153094.json b/_data/chains/eip155-868455272153094.json new file mode 100644 index 00000000..abf593e3 --- /dev/null +++ b/_data/chains/eip155-868455272153094.json @@ -0,0 +1,26 @@ +{ + "name": "Godwoken Testnet (V1)", + "chain": "GWT", + "rpc": [ + "https://godwoken-testnet-web3-v1-rpc.ckbapp.dev" + ], + "faucets": [ + "https://homura.github.io/light-godwoken" + ], + "nativeCurrency": { + "name": "CKB", + "symbol": "CKB", + "decimals": 8 + }, + "infoURL": "https://www.nervos.org", + "shortName": "gw-testnet-v1", + "chainId": 868455272153094, + "networkId": 868455272153094, + "explorers": [ + { + "name": "GWScan Block Explorer", + "url": "https://v1.aggron.gwscan.com", + "standard": "none" + } + ] +} \ No newline at end of file diff --git a/_data/chains/eip155-87.json b/_data/chains/eip155-87.json index 43790650..1d749258 100644 --- a/_data/chains/eip155-87.json +++ b/_data/chains/eip155-87.json @@ -3,8 +3,9 @@ "chain": "NNW", "icon": "novanetwork", "rpc": [ - "https://rpc.novanetwork.io:9070", - "http://nova.genyrpc.info:8545" + "https://connect.novanetwork.io", + "https://0x57.redjackstudio.com", + "https://rpc.novanetwork.io:9070" ], "faucets": [], "nativeCurrency": { diff --git a/_data/chains/eip155-9000.json b/_data/chains/eip155-9000.json index dfc5cb85..4e9e3cca 100644 --- a/_data/chains/eip155-9000.json +++ b/_data/chains/eip155-9000.json @@ -1,7 +1,7 @@ { "name": "Evmos Testnet", "chain": "Evmos", - "rpc": ["https://evmos-archive-testnet.api.bdnodes.net:8545"], + "rpc": ["https://eth.bd.evmos.dev:8545"], "faucets": ["https://faucet.evmos.dev"], "nativeCurrency": { "name": "test-Evmos", @@ -15,9 +15,9 @@ "icon": "evmos", "explorers": [ { - "name": "Evmos EVM Explorer (Blockscout)", + "name": "Evmos EVM Explorer", "url": "https://evm.evmos.dev", - "standard": "none", + "standard": "EIP3091", "icon": "evmos" }, { diff --git a/_data/icons/aioz.json b/_data/icons/aioz.json new file mode 100644 index 00000000..ae8acacd --- /dev/null +++ b/_data/icons/aioz.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://QmRAGPFhvQiXgoJkui7WHajpKctGFrJNhHqzYdwcWt5V3Z", + "width": 1024, + "height": 1024, + "format": "png" + } +] \ No newline at end of file diff --git a/_data/icons/autobahn.json b/_data/icons/autobahn.json new file mode 100644 index 00000000..4c75e138 --- /dev/null +++ b/_data/icons/autobahn.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://QmZP19pbqTco4vaP9siduLWP8pdYArFK3onfR55tvjr12s", + "width": 489, + "height": 489, + "format": "png" + } +] diff --git a/_data/icons/blockscout.json b/_data/icons/blockscout.json new file mode 100644 index 00000000..30e326a2 --- /dev/null +++ b/_data/icons/blockscout.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq", + "width": 512, + "height": 512, + "format": "png" + } +] diff --git a/_data/icons/cennz.json b/_data/icons/cennz.json new file mode 100644 index 00000000..a76e74ff --- /dev/null +++ b/_data/icons/cennz.json @@ -0,0 +1,6 @@ +[ + { + "url": "ipfs://QmWhNm7tTi6SYbiumULDRk956hxgqaZSX77vcxBNn8fvnw", + "format": "svg" + } +] \ No newline at end of file diff --git a/_data/icons/dfk.json b/_data/icons/dfk.json new file mode 100644 index 00000000..4b4646ed --- /dev/null +++ b/_data/icons/dfk.json @@ -0,0 +1,10 @@ + +[ + { + "url": "ipfs://QmQB48m15TzhUFrmu56QCRQjkrkgUaKfgCmKE8o3RzmuPJ", + "width": 500, + "height": 500, + "format": "png" + } +] + \ No newline at end of file diff --git a/_data/icons/eurus.json b/_data/icons/eurus.json new file mode 100644 index 00000000..e45a43bc --- /dev/null +++ b/_data/icons/eurus.json @@ -0,0 +1,8 @@ +[ + { + "url":"ipfs://QmaGd5L9jGPbfyGXBFhu9gjinWJ66YtNrXq8x6Q98Eep9e", + "width":471, + "height":471, + "format":"svg" + } +] \ No newline at end of file diff --git a/_data/icons/eurusexplorer.json b/_data/icons/eurusexplorer.json new file mode 100644 index 00000000..e45a43bc --- /dev/null +++ b/_data/icons/eurusexplorer.json @@ -0,0 +1,8 @@ +[ + { + "url":"ipfs://QmaGd5L9jGPbfyGXBFhu9gjinWJ66YtNrXq8x6Q98Eep9e", + "width":471, + "height":471, + "format":"svg" + } +] \ No newline at end of file diff --git a/_data/icons/evmos.json b/_data/icons/evmos.json index 88a52748..f33dbfef 100644 --- a/_data/icons/evmos.json +++ b/_data/icons/evmos.json @@ -1,8 +1,8 @@ [ { - "url": "ipfs://Qmc4nHKSTgRwhpc5gpUnd7cQb7ooUgkcMxSbJcDAjJqx6T", - "width": 1000, - "height": 620, - "format": "svg" + "url": "ipfs://QmeZW6VKUFTbz7PPW8PmDR3ZHa6osYPLBFPnW8T5LSU49c", + "width": 400, + "height": 400, + "format": "png" } -] \ No newline at end of file +] diff --git a/_data/icons/gnosis.json b/_data/icons/gnosis.json new file mode 100644 index 00000000..7c91dfb9 --- /dev/null +++ b/_data/icons/gnosis.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://bafybeidk4swpgdyqmpz6shd5onvpaujvwiwthrhypufnwr6xh3dausz2dm", + "width": 1800, + "height": 1800, + "format": "png" + } +] diff --git a/_data/icons/kava.json b/_data/icons/kava.json new file mode 100644 index 00000000..da3221f4 --- /dev/null +++ b/_data/icons/kava.json @@ -0,0 +1,6 @@ +[ + { + "url": "ipfs://QmdpRTk6oL1HRW9xC6cAc4Rnf9gs6zgdAcr4Z3HcLztusm", + "format": "svg" + } +] diff --git a/_data/icons/lachain.json b/_data/icons/lachain.json new file mode 100644 index 00000000..68db3d41 --- /dev/null +++ b/_data/icons/lachain.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://QmQxGA6rhuCQDXUueVcNvFRhMEWisyTmnF57TqL7h6k6cZ", + "width": 1280, + "height": 1280, + "format": "png" + } +] diff --git a/_data/icons/ludan.json b/_data/icons/ludan.json new file mode 100644 index 00000000..673497de --- /dev/null +++ b/_data/icons/ludan.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://bafkreigzeanzqgxrzzep45t776ovbwi242poqxbryuu2go5eedeuwwcsay", + "width": 512, + "height": 512, + "format": "png" + } +] diff --git a/_data/icons/milkomeda.json b/_data/icons/milkomeda.json new file mode 100644 index 00000000..d1ecea13 --- /dev/null +++ b/_data/icons/milkomeda.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://QmdoUtvHDybu5ppYBZT8BMRp6AqByVSoQs8nFwKbaS55jd", + "width": 367, + "height": 367, + "format": "svg" + } +] \ No newline at end of file diff --git a/_data/icons/openpiece.json b/_data/icons/openpiece.json new file mode 100644 index 00000000..0db62b46 --- /dev/null +++ b/_data/icons/openpiece.json @@ -0,0 +1,8 @@ +[ + { + "url": "ipfs://QmVTahJkdSH3HPYsJMK2GmqfWZjLyxE7cXy1aHEnHU3vp2", + "width": 250, + "height": 250, + "format": "png" + } +] diff --git a/_data/icons/swarmchain.json b/_data/icons/swarmchain.json new file mode 100644 index 00000000..44528a16 --- /dev/null +++ b/_data/icons/swarmchain.json @@ -0,0 +1,8 @@ +[ + { + "url":"ipfs://QmRu7KmQoC2vSVeD7Y6bxRYikQHYs86H9fRAdb1ytPkK9r", + "width":500, + "height":500, + "format":"png" + } +] diff --git a/_data/icons/swarmexplorer.json b/_data/icons/swarmexplorer.json new file mode 100644 index 00000000..c909e961 --- /dev/null +++ b/_data/icons/swarmexplorer.json @@ -0,0 +1,8 @@ +[ + { + "url":"ipfs://Qmbzy8c54EHh7yzMHZir98BrcV6sazr77QLoi63HAoayuo", + "width":289, + "height":288, + "format":"png" + } +] diff --git a/build.gradle b/build.gradle index 733d6a10..9328f8a0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { ext { - KOTLIN_VERSION = "1.6.10" + KOTLIN_VERSION = "1.6.20" KETHEREUM_VERSION = "0.85.7" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b1159fc5..92f06b50 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/model/build.gradle.kts b/model/build.gradle.kts index e6b83b76..23f0e50a 100644 --- a/model/build.gradle.kts +++ b/model/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.google.devtools.ksp").version("1.6.10-1.0.2") + id("com.google.devtools.ksp").version("1.6.20-1.0.5") id("maven-publish") } diff --git a/processor/src/main/kotlin/org/ethereum/lists/chains/Env.kt b/processor/src/main/kotlin/org/ethereum/lists/chains/Env.kt index fbb13991..20ec2842 100644 --- a/processor/src/main/kotlin/org/ethereum/lists/chains/Env.kt +++ b/processor/src/main/kotlin/org/ethereum/lists/chains/Env.kt @@ -22,7 +22,8 @@ val optionalFields = listOf( "explorers", "title", "network", - "parent" + "parent", + "deprecated" ) val moshi: Moshi = Moshi.Builder().build() 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 05c30ca2..786f9352 100644 --- a/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt +++ b/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt @@ -93,10 +93,8 @@ private fun doChecks(doRPCConnect: Boolean) { checkIcon(it) } - allFiles.filter { it.isDirectory }.forEach { - if (it.name != "deprecated") { - error("the only directory allowed is 'deprecated'") - } + allFiles.filter { it.isDirectory }.forEach { _ -> + error("should not contain a directory") } } @@ -173,6 +171,29 @@ fun checkChain(chainFile: File, connectRPC: Boolean) { } } + jsonObject["nativeCurrency"]?.let { + if (it !is JsonObject) { + throw NativeCurrencyMustBeObject() + } + val symbol = it["symbol"] + if (symbol !is String) { + throw NativeCurrencySymbolMustBeString() + } + + if (symbol.length >= 7) { + throw NativeCurrencySymbolMustHaveLessThan7Chars() + } + if (it.keys != setOf("symbol","decimals","name")) { + throw NativeCurrencyCanOnlyHaveSymbolNameAndDecimals() + } + if (it["decimals"] !is Int) { + throw NativeCurrencyDecimalMustBeInt() + } + if (it["name"] !is String) { + throw NativeCurrencyNameMustBeString() + } + } + jsonObject["explorers"]?.let { if (it !is JsonArray<*>) { throw (ExplorersMustBeArray()) @@ -214,7 +235,11 @@ fun checkChain(chainFile: File, connectRPC: Boolean) { throw ENSRegistryAddressMustBeValid() } } - + jsonObject["deprecated"]?.let { + if (it !is Boolean) { + throw DeprecatedMustBeBoolean() + } + } jsonObject["parent"]?.let { if (it !is JsonObject) { throw ParentMustBeObject() 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 1f0830e1..f02e62da 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 @@ -25,4 +25,11 @@ class ParentHasExtraFields(fields: Set): Exception("parent has extra fie 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") \ No newline at end of file +class ParentChainDoesNotExist(chain: String): Exception("Referenced parent chain ($chain) does not exist") +class DeprecatedMustBeBoolean: Exception("deprecated must be boolean") +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") +class NativeCurrencyCanOnlyHaveSymbolNameAndDecimals: Exception("Native currency can only have symbol decimals and name") +class NativeCurrencyDecimalMustBeInt: Exception("Native currency decimals must be int") +class NativeCurrencyNameMustBeString: Exception("Native currency name must be string") \ No newline at end of file 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 327d8eb4..17d213a2 100644 --- a/processor/src/test/kotlin/org/ethereum/lists/chains/TheChainChecker.kt +++ b/processor/src/test/kotlin/org/ethereum/lists/chains/TheChainChecker.kt @@ -221,6 +221,11 @@ 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 fun canParse2chains() { checkChain(getFile("valid/eip155-1.json"), false) diff --git a/processor/src/test/resources/test_chains/invalid/invalid_deprecation/eip155-1.json b/processor/src/test/resources/test_chains/invalid/invalid_deprecation/eip155-1.json new file mode 100644 index 00000000..11a8782e --- /dev/null +++ b/processor/src/test/resources/test_chains/invalid/invalid_deprecation/eip155-1.json @@ -0,0 +1,21 @@ +{ + "name": "Ethereum Mainnet", + "shortName": "eth", + "chain": "ETH", + "network": "mainnet", + "chainId": 1, + "networkId": 1, + "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": [], + "deprecated": "yolo" +} \ No newline at end of file diff --git a/processor/src/test/resources/test_chains/valid/eip155-1.json b/processor/src/test/resources/test_chains/valid/eip155-1.json index 457f8964..847e295f 100644 --- a/processor/src/test/resources/test_chains/valid/eip155-1.json +++ b/processor/src/test/resources/test_chains/valid/eip155-1.json @@ -15,5 +15,6 @@ "name": "Ether", "symbol": "ETH", "decimals": 18 - } + }, + "deprecated": true }