mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
Disallow leading zeroes in file names (#1680)
* Disallow leading zeroes in file names * Remove Factory 127 testnet in favor of Lycan chain
This commit is contained in:
parent
30fe54fdf6
commit
313b649b2c
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Lycan Chain",
|
|
||||||
"chain": "LYC",
|
|
||||||
"rpc": ["https://rpc.lycanchain.com/"],
|
|
||||||
"faucets": [],
|
|
||||||
"nativeCurrency": {
|
|
||||||
"name": "Lycan",
|
|
||||||
"symbol": "LYC",
|
|
||||||
"decimals": 18
|
|
||||||
},
|
|
||||||
"infoURL": "https://lycanchain.com",
|
|
||||||
"shortName": "LYC",
|
|
||||||
"chainId": 721,
|
|
||||||
"networkId": 721,
|
|
||||||
"icon": "lycanchain",
|
|
||||||
"explorers": [
|
|
||||||
{
|
|
||||||
"name": "blockscout",
|
|
||||||
"url": "https://explorer.lycanchain.com",
|
|
||||||
"standard": "EIP3091"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,16 +1,23 @@
|
||||||
{
|
{
|
||||||
"name": "Factory 127 Testnet",
|
"name": "Lycan Chain",
|
||||||
"chain": "FETH",
|
"chain": "LYC",
|
||||||
"rpc": [],
|
"rpc": ["https://rpc.lycanchain.com/"],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Factory 127 Token",
|
"name": "Lycan",
|
||||||
"symbol": "FETH",
|
"symbol": "LYC",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://www.factory127.com",
|
"infoURL": "https://lycanchain.com",
|
||||||
"shortName": "tfeth",
|
"shortName": "LYC",
|
||||||
"chainId": 721,
|
"chainId": 721,
|
||||||
"networkId": 721,
|
"networkId": 721,
|
||||||
"slip44": 721
|
"icon": "lycanchain",
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "blockscout",
|
||||||
|
"url": "https://explorer.lycanchain.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,11 @@ for(const chainFile of chainFiles){
|
||||||
const fileData = fs.readFileSync(fileLocation,'utf8')
|
const fileData = fs.readFileSync(fileLocation,'utf8')
|
||||||
const fileDataJson = JSON.parse(fileData)
|
const fileDataJson = JSON.parse(fileData)
|
||||||
const chainIdFromFileName = chainFile.match(/eip155-(\d+)\.json/)[1]
|
const chainIdFromFileName = chainFile.match(/eip155-(\d+)\.json/)[1]
|
||||||
if(chainIdFromFileName != fileDataJson.chainId){
|
const parsedChainId = parseInt(chainIdFromFileName, 10);
|
||||||
|
if(chainIdFromFileName != parsedChainId.toString()){
|
||||||
|
throw new Error(`File name does not match parsed ChainID ${parsedChainId} in ${chainFile}`)
|
||||||
|
}
|
||||||
|
if(parsedChainId !== fileDataJson.chainId){
|
||||||
throw new Error(`File Name does not match with ChainID in ${chainFile}`)
|
throw new Error(`File Name does not match with ChainID in ${chainFile}`)
|
||||||
}
|
}
|
||||||
const valid = ajv.validate(schema, fileDataJson)
|
const valid = ajv.validate(schema, fileDataJson)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user