From 5d11c6fcfb58dd356b1ac53f1ab96dc970cdc1fa Mon Sep 17 00:00:00 2001 From: Klein Petr Date: Thu, 12 Sep 2024 17:36:51 +0200 Subject: [PATCH] feat(data): add ranks with conditions --- schema/rank.yaml | 37 ++++++++++++++++++++ src/ranks.yaml | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 schema/rank.yaml create mode 100644 src/ranks.yaml diff --git a/schema/rank.yaml b/schema/rank.yaml new file mode 100644 index 00000000..a1d60dc6 --- /dev/null +++ b/schema/rank.yaml @@ -0,0 +1,37 @@ +type: object +properties: + id: + type: string + name: + type: string + references: + type: array + items: + type: object + properties: + field: + type: string + conditions: + type: object + properties: + exists: + type: boolean + minLength: + type: integer + regex: + type: string + equals: + oneOf: + - type: boolean + - type: string + points: + type: integer + required: + - field + - conditions + - points +required: + - id + - name + - references +additionalProperties: false \ No newline at end of file diff --git a/src/ranks.yaml b/src/ranks.yaml new file mode 100644 index 00000000..15e8b353 --- /dev/null +++ b/src/ranks.yaml @@ -0,0 +1,89 @@ +- id: openess + name: Openess + references: + - field: team.teammembers + conditions: + minLength: 1 + points: 10 + - field: links.docs + conditions: + exists: true + points: 10 + - field: links.github + conditions: + exists: true + points: 10 + - field: links.twitter + conditions: + exists: true + points: 1 + - field: links.telegram + conditions: + exists: true + points: 1 + - field: links.discord + conditions: + exists: true + points: 1 + - field: links.lens + conditions: + exists: true + points: 1 + - field: links.farcaster + conditions: + exists: true + points: 1 + - field: links.whitepaper + conditions: + exists: true + points: 10 + - field: team.funding + conditions: + minLength: 1 + points: 10 + +- id: technology + name: Technology + references: + - field: project_status.mainnet + conditions: + exists: true + points: 10 + - field: blockchain_features.opensource + conditions: + equals: true + points: 20 + - field: blockchain_features.asset_custody_type + conditions: + equals: non-custody + points: 10 + - field: blockchain_features.upgradability.enabled + conditions: + equals: false + points: 10 + - field: audits + conditions: + minLength: 1 + points: 10 + +- id: privacy + name: Privacy + references: + - field: privacy_policy.link + conditions: + exists: true + points: 10 + - field: traceability.kyc + conditions: + equals: false + points: 10 + - field: compliance + conditions: + equals: true + points: 5 + - field: default_privacy + conditions: + equals: true + points: 10 + + \ No newline at end of file