This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c06dfa
commit 3e684d1
Showing
149 changed files
with
25,260 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint', | ||
}, | ||
extends: [ | ||
'@nuxtjs', | ||
'prettier', | ||
'prettier/vue', | ||
'plugin:prettier/recommended', | ||
'plugin:nuxt/recommended', | ||
], | ||
plugins: ['prettier'], | ||
// add your custom rules here | ||
rules: { | ||
'no-console': 0, | ||
'vue/comment-directive': 0, | ||
'vue/no-mutating-props': 0, | ||
'vue/custom-event-name-casing': 0, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
updates: | ||
# Fetch and update latest `npm` packages | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
time: '00:00' | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- lukitsbrian | ||
assignees: | ||
- lukitsbrian | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope | ||
# Fetch and update latest `github-actions` pkgs | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
schedule: | ||
interval: daily | ||
time: '00:00' | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- lukitsbrian | ||
assignees: | ||
- lukitsbrian | ||
commit-message: | ||
prefix: fix | ||
prefix-development: chore | ||
include: scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [14] | ||
|
||
steps: | ||
- name: Checkout π | ||
uses: actions/checkout@master | ||
|
||
- name: Setup node env π | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Get yarn cache directory path π | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache node_modules π¦ | ||
uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies π¨π»βπ» | ||
run: yarn | ||
|
||
- name: Run linter π | ||
run: yarn lint | ||
|
||
# - name: Run tests π§ͺ | ||
# run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,67 @@ | ||
# lunie-ng | ||
Lunie Next Generation | ||
# Lunie Light (Beta) | ||
|
||
Hello! π Welcome to the Lunie Light Beta repo. | ||
|
||
Lunie Light is a staking interface for proof-of-stake blockchains in the Cosmos ecosystem β built for speed, simplicity, and ease-of-use. | ||
|
||
Lunie Light uses [Nuxt.js](https://nuxtjs.org), and relies on the [REST API](https://cosmos.network/rpc) of a [Cosmos node](https://docs.cosmos.network/master/interfaces/rest.html) for data. | ||
|
||
Lunie Light will work with the Keplr Browser Extension and the Ledger Nano. Local key management should only be used for testing and development purposes. | ||
|
||
Features: | ||
|
||
- β Super simple β one config file | ||
- π Fast, modern web technologies | ||
- π± Fully responsive | ||
- β Real-time on-chain data | ||
- π Explore mode | ||
- πΈ Multi-denom balances support | ||
- π₯© Staking and unstaking management | ||
- π― Complete validator list with instant search | ||
- π€ Validator profiles for every validator | ||
- π§Ύ Transaction history | ||
|
||
## Getting started | ||
|
||
1. Edit the `networks.js` config file with the relevant details for your project | ||
2. Run `yarn install` to install the app dependencies | ||
3. Run `yarn dev` to serve the app at `localhost:3000` | ||
|
||
### CORS | ||
|
||
If the node you want to connect to doesn't have CORS enabled, you can't use it with the application. In this case use a CORS proxy (only in development) i.e. https://cors-anywhere.herokuapp.com/. | ||
|
||
## How on-chain data works | ||
|
||
On-chain data is managed using the [Vuex store](https://nuxtjs.org/docs/2.x/directory-structure/store/). Understanding how [Vuex](https://vuex.vuejs.org/) works will be helpful for manipulating data in Lunie Light. | ||
|
||
### How data flows through Lunie Light | ||
|
||
1. Middleware in the [`default.vue`](https://github.com/luniehq/lunie-light/blob/master/layouts/default.vue) file will call [`data/init`](https://github.com/luniehq/lunie-light/blob/master/layouts/default.vue#L24) to initialize the connection the Cosmos REST API before any pages are rendered. If the API is not initialized, requests will fail and data will not flow πββοΈ | ||
2. [Mutations](https://vuex.vuejs.org/guide/mutations.html) and [Actions](https://vuex.vuejs.org/guide/actions.html) are stored in the [`data.js`](https://github.com/luniehq/lunie-light/blob/master/store/data.js) file which manages the Vuex store and API requests | ||
3. Actions in [`data.js`](https://github.com/luniehq/lunie-light/blob/master/store/data.js) will call query functions in the [`cosmos-source.js`](https://github.com/luniehq/lunie-light/blob/master/common/cosmosV3-source.js) file. | ||
4. Reducers in [`cosmos-reducers.js`](https://github.com/luniehq/lunie-light/blob/master/common/cosmosV3-reducers.js) parse the responses from the API into a format that is easy for frontend Vue components to understand and work with | ||
|
||
### Customizing for your chain | ||
|
||
Lunie Light will work out of the box with Cosmos-SDK v0.40 assuming there are no missing modules or modifications. | ||
|
||
Check the [`/apis`](https://github.com/luniehq/lunie-light/tree/master/apis) folder for the files responsible for mapping chain data to the Lunie frontend. There are deprecated Cosmos-SDK v0.39 files there for your convenience. | ||
|
||
It is recommended that you manually go through the UI and check which requests are throwing errors. You should also manually test all functions and actions to make sure everything works as expected on your chain. | ||
|
||
_If your chain is missing modules or you have changed the Cosmos data model you will have to update the source and reducer files to accomodate these changes._ | ||
|
||
## How to deploy | ||
|
||
On Netlify: | ||
|
||
1. Add your forked π΄ repo | ||
2. Go to "Site Settings" > "Build & Deploy" > "Edit Settings" | ||
3. Set the build command to `yarn generate` | ||
4. Set the publish directory to `dist` | ||
|
||
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start) | ||
|
||
|
||
## Thank you kindly! |
Oops, something went wrong.