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",
|
||||
"chain": "FETH",
|
||||
"rpc": [],
|
||||
"name": "Lycan Chain",
|
||||
"chain": "LYC",
|
||||
"rpc": ["https://rpc.lycanchain.com/"],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Factory 127 Token",
|
||||
"symbol": "FETH",
|
||||
"name": "Lycan",
|
||||
"symbol": "LYC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.factory127.com",
|
||||
"shortName": "tfeth",
|
||||
"infoURL": "https://lycanchain.com",
|
||||
"shortName": "LYC",
|
||||
"chainId": 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 fileDataJson = JSON.parse(fileData)
|
||||
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}`)
|
||||
}
|
||||
const valid = ajv.validate(schema, fileDataJson)
|
||||
|
|
Loading…
Reference in New Issue
Block a user