From aa35be4e27d5ed4ae7b9a33ef6d4de56aec0bae1 Mon Sep 17 00:00:00 2001 From: Maxime <52084503+Max-3-7@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:46:48 +0200 Subject: [PATCH] setup repo --- .github/workflows/validate-json.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 3 +++ LICENSE | 21 +++++++++++++++++++++ README.md | 3 +++ epochs.json | 7 +++++++ rewards.json | 9 +++++++++ schema_epochs.json | 14 ++++++++++++++ schema_rewards.json | 16 ++++++++++++++++ 8 files changed, 102 insertions(+) create mode 100644 .github/workflows/validate-json.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 epochs.json create mode 100644 rewards.json create mode 100644 schema_epochs.json create mode 100644 schema_rewards.json diff --git a/.github/workflows/validate-json.yml b/.github/workflows/validate-json.yml new file mode 100644 index 0000000..0d7bb0d --- /dev/null +++ b/.github/workflows/validate-json.yml @@ -0,0 +1,29 @@ +name: Validate JSON + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + + - name: Install AJV CLI + run: npm install -g ajv-cli + + - name: Validate rewards.json + run: ajv validate -s schema_rewards.json -d './rewards.json' --strict=false + + - name: Validate epochs.json + run: ajv validate -s schema_epochs.json -d './epochs.json' --strict=false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3bdd52e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +.DS_Store diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5bd5e2b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Merchat Moe XYZ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..314d96e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Epoch Rewards + +Static files with MOE market maker reward schedules. diff --git a/epochs.json b/epochs.json new file mode 100644 index 0000000..55caebf --- /dev/null +++ b/epochs.json @@ -0,0 +1,7 @@ +[ + { + "epoch": 1, + "start": "2023-02-17T00:00:00Z", + "end": "2023-03-04T00:00:01Z" + } +] diff --git a/rewards.json b/rewards.json new file mode 100644 index 0000000..5a257e4 --- /dev/null +++ b/rewards.json @@ -0,0 +1,9 @@ +[ + { + "epoch": 1, + "chain": "Mantle", + "poolId": "0x0000000000000000000000000000000000000000", + "rewardPerDay": 0, + "rewardToken": "" + } +] diff --git a/schema_epochs.json b/schema_epochs.json new file mode 100644 index 0000000..4749d19 --- /dev/null +++ b/schema_epochs.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": { + "type": "object", + "properties": { + "epoch": { "type": "integer", "minimum": 1 }, + "start": { "type": "string", "format": "date-time" }, + "end": { "type": "string", "format": "date-time" } + }, + "required": ["epoch", "start", "end"], + "additionalProperties": false + } +} diff --git a/schema_rewards.json b/schema_rewards.json new file mode 100644 index 0000000..56a5bd2 --- /dev/null +++ b/schema_rewards.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": { + "type": "object", + "properties": { + "epoch": { "type": "number" }, + "chain": { "type": "string", "enum": ["Mantle"] }, + "poolId": { "type": "string", "pattern": "^\\S*$" }, + "rewardPerDay": { "type": "number" }, + "rewardToken": { "type": "string", "pattern": "^\\S*$" } + }, + "required": ["epoch", "chain", "poolId", "rewardPerDay", "rewardToken"], + "additionalProperties": false + } +}