Added Flama Token (#2308)

* Added Flama Token

Flama is one of the first deflationary tokens in the market with enhanced futures like staking

* Update info.json

Added final newline

* Add test

Co-authored-by: Mykola <kolya182@gmail.com>
This commit is contained in:
ScorpioTM 2020-06-10 08:22:54 +02:00 committed by GitHub
parent d311f62a1a
commit c37e74b3b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,14 @@
{
"name": "Flama",
"website": "https://flamanet.io/",
"short_description": "Flama is one of the first deflationary tokens in the market with enhanced futures like staking.",
"description": "Flama is one of the first deflationary tokens in the market with enhanced futures like staking.",
"socials": [
{
"name": "Twitter",
"url": "https://twitter.com/FlamaToken",
"handle": "Flama"
}
],
"explorer": "https://etherscan.io/token/0x2afd9ce07d4186e8f3671d52200850760a8e1f70"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -52,6 +52,7 @@ export const getChainLogoPath = (chain: string): string => `${chainsFolderPath}/
export const getChainInfoPath = (chain: string): string => `${chainsFolderPath}/${chain}/info/${info}`
export const getChainAssetInfoPath = (chain: string, address: string): string => `${chainsFolderPath}/${chain}/assets/${address}/${info}`
export const getChainAssetsPath = (chain: string): string => `${chainsFolderPath}/${chain}/assets`
export const getChainPath = (chain: string): string => `${chainsFolderPath}/${chain}`
export const minLogoWidth = 64
export const minLogoHeight = 64
@ -64,6 +65,7 @@ export const getChainAssetPath = (chain: string, address: string) => `${getChain
export const getAllChainsList = (): string[] => readDirSync(chainsFolderPath)
export const getChainAssetLogoPath = (chain: string, address: string) => `${getChainAssetsPath(chain)}/${address}/${logo}`
export const getChainAssetFilesList = (chain: string, address: string) => readDirSync(getChainAssetPath(chain, address))
export const getChainFolderFilesList = (chain: string) => readDirSync(getChainPath(chain))
export const getChainAssetsList = (chain: string): string[] => readDirSync(getChainAssetsPath(chain))
export const getChainValidatorsPath = (chain: string): string => `${chainsFolderPath}/${chain}/validators`
export const getChainValidatorsAssets = (chain: string): string[] => readDirSync(getChainValidatorsAssetsPath(chain))
@ -316,3 +318,11 @@ export const assetFolderAllowedFiles = [
logo,
info
]
export const chainFolderAllowedFiles = [
"assets",
"whitelist.json",
"blacklist.json",
"validators",
infoName
]

View File

@ -3,6 +3,7 @@ const eztz = require('eztz-lib')
import {
Binance, Cosmos, Tezos, Tron, IoTeX, Waves, Kava, Terra,
assetFolderAllowedFiles,
chainFolderAllowedFiles,
chainsFolderPath,
ethSidechains,
findFiles,
@ -10,6 +11,7 @@ import {
getChainAssetLogoPath,
getChainAssetPath,
getChainAssetsPath,
getChainFolderFilesList,
getChainBlacklistPath,
getChainLogoPath,
getChainValidatorAssetLogoPath,
@ -82,6 +84,14 @@ describe(`Test "blockchains" folder`, () => {
})
})
describe(`Chain folder should contain only predefined list of files`, () => {
readDirSync(chainsFolderPath).forEach(chain => {
getChainFolderFilesList(chain).forEach(file => {
expect(chainFolderAllowedFiles.indexOf(file),`File "${typeof file}" ${file} not allowed in chain folder: ${chain}`).not.toBe(-1)
})
})
})
describe("Check Ethereum side-chain folders", () => {
ethSidechains.forEach(chain => {
test(`Test chain ${chain} folder`, () => {