From 5f6fb5ed947ae0eefe06acac4ae3dcb0bb382505 Mon Sep 17 00:00:00 2001 From: Viktor Radchenko <1641795+vikmeup@users.noreply.github.com> Date: Thu, 18 Mar 2021 13:42:03 -0700 Subject: [PATCH] [Internal] Add tagging support (#5911) * Add tagging support * Add example dao support for TWT * Update info.json * Rename daos => dao * Update tags.json * Update tag in TWT, governance/dao * Update test * Add staking-native tag Co-authored-by: Catenocrypt --- blockchains/algorand/info/info.json | 5 ++++- blockchains/binance/info/info.json | 5 ++++- blockchains/cosmos/info/info.json | 5 ++++- blockchains/kava/info/info.json | 5 ++++- .../info.json | 2 +- blockchains/tezos/info/info.json | 5 ++++- blockchains/tron/info/info.json | 5 ++++- script/tags.json | 22 +++++++++++-------- test/index.test.ts | 8 +++---- 9 files changed, 42 insertions(+), 20 deletions(-) diff --git a/blockchains/algorand/info/info.json b/blockchains/algorand/info/info.json index 2fea3d924..1bd9d1d2b 100644 --- a/blockchains/algorand/info/info.json +++ b/blockchains/algorand/info/info.json @@ -21,5 +21,8 @@ "symbol": "ALGO", "type": "COIN", "decimals": 6, - "status": "active" + "status": "active", + "tags": [ + "staking-native" + ] } \ No newline at end of file diff --git a/blockchains/binance/info/info.json b/blockchains/binance/info/info.json index 406d23d8b..534fe0a8c 100644 --- a/blockchains/binance/info/info.json +++ b/blockchains/binance/info/info.json @@ -21,5 +21,8 @@ "symbol": "BNB", "type": "COIN", "decimals": 8, - "status": "active" + "status": "active", + "tags": [ + "staking-native" + ] } \ No newline at end of file diff --git a/blockchains/cosmos/info/info.json b/blockchains/cosmos/info/info.json index 7c5fdadee..2860ee3dc 100644 --- a/blockchains/cosmos/info/info.json +++ b/blockchains/cosmos/info/info.json @@ -21,5 +21,8 @@ "symbol": "ATOM", "type": "COIN", "decimals": 6, - "status": "active" + "status": "active", + "tags": [ + "staking-native" + ] } \ No newline at end of file diff --git a/blockchains/kava/info/info.json b/blockchains/kava/info/info.json index a21f1c97e..cc1ff4b17 100644 --- a/blockchains/kava/info/info.json +++ b/blockchains/kava/info/info.json @@ -21,5 +21,8 @@ "symbol": "KAVA", "type": "COIN", "decimals": 6, - "status": "active" + "status": "active", + "tags": [ + "staking-native" + ] } \ No newline at end of file diff --git a/blockchains/smartchain/assets/0x4B0F1812e5Df2A09796481Ff14017e6005508003/info.json b/blockchains/smartchain/assets/0x4B0F1812e5Df2A09796481Ff14017e6005508003/info.json index b4ee4c566..959aca947 100644 --- a/blockchains/smartchain/assets/0x4B0F1812e5Df2A09796481Ff14017e6005508003/info.json +++ b/blockchains/smartchain/assets/0x4B0F1812e5Df2A09796481Ff14017e6005508003/info.json @@ -12,6 +12,6 @@ "status": "active", "id": "0x4B0F1812e5Df2A09796481Ff14017e6005508003", "tags": [ - "dao" + "governance" ] } \ No newline at end of file diff --git a/blockchains/tezos/info/info.json b/blockchains/tezos/info/info.json index 07659c8b8..a8bf40bd2 100644 --- a/blockchains/tezos/info/info.json +++ b/blockchains/tezos/info/info.json @@ -21,5 +21,8 @@ "symbol": "XTZ", "type": "COIN", "decimals": 6, - "status": "active" + "status": "active", + "tags": [ + "staking-native" + ] } \ No newline at end of file diff --git a/blockchains/tron/info/info.json b/blockchains/tron/info/info.json index 5a3a6bc04..fa3d8f1a0 100644 --- a/blockchains/tron/info/info.json +++ b/blockchains/tron/info/info.json @@ -21,5 +21,8 @@ "symbol": "TRX", "type": "COIN", "decimals": 6, - "status": "active" + "status": "active", + "tags": [ + "staking-native" + ] } \ No newline at end of file diff --git a/script/tags.json b/script/tags.json index 36000fc0b..fb8e8ec86 100644 --- a/script/tags.json +++ b/script/tags.json @@ -15,20 +15,24 @@ "name": "NFT", "description": "Non-fungible tokens or tokens associated with the NFT ecosystem." }, - "dao": { - "name": "DAO", - "description": "Tokens that govern decentralized autonomous organizations (DAOs)." + "governance": { + "name": "Governance", + "description": "Tokens that used to participate in the governance process of the project." }, "defi": { "name": "DeFi", - "description": null - }, - "creator": { - "name": "Creator", - "description": "Tokens by creators." + "description": "Tokens that are used for variety of decentralized financial applications." }, "staking": { "name": "Staking", "description": "Tokens that are used for staking to receive rewards." + }, + "staking-native": { + "name": "Staking Native", + "description": "Coins/Blockchains that are used for staking to secure the network to receive rewards." + }, + "privacy": { + "name": "Privacy", + "description": "Privacy tokens." } -} \ No newline at end of file +} diff --git a/test/index.test.ts b/test/index.test.ts index c8a242c2e..56de18034 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -147,14 +147,14 @@ describe("Test status, tag values", () => { }); test(`Test tag-values`, () => { expect(isValidTagValue("defi")).toEqual(true); - expect(isValidTagValue("dao")).toEqual(true); + expect(isValidTagValue("staking")).toEqual(true); expect(isValidStatusValue("invalidvalue")).toEqual(false); - expect(isValidStatusValue("DAO")).toEqual(false); + expect(isValidStatusValue("STAKING")).toEqual(false); expect(isValidStatusValue("")).toEqual(false); expect(isValidTagValues(["defi"])).toEqual(true); - expect(isValidTagValues(["dao"])).toEqual(true); - expect(isValidTagValues(["defi", "dao"])).toEqual(true); + expect(isValidTagValues(["staking"])).toEqual(true); + expect(isValidTagValues(["defi", "staking"])).toEqual(true); expect(isValidTagValues(["invalid"])).toEqual(false); expect(isValidTagValues(["defi", "invalid"])).toEqual(false); });