Skip to content

Commit

Permalink
Merge branch 'dev' into feat/generateChangelog
Browse files Browse the repository at this point in the history
  • Loading branch information
akiraonstarknet authored Apr 22, 2024
2 parents 47bd6bb + fdfd9d0 commit 7d103b6
Show file tree
Hide file tree
Showing 46 changed files with 1,173 additions and 1,459 deletions.
120 changes: 0 additions & 120 deletions .eslintrc

This file was deleted.

145 changes: 144 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,146 @@
{
"extends": "next/core-web-vitals"
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true,
"mocha": true
},
"plugins": ["@typescript-eslint", "unused-imports"],
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"strict": 0,
"no-underscore-dangle": 0,
"no-mixed-requires": 0,
"no-process-exit": 0,
"no-warning-comments": 0,
"no-use-before-define": 0,
"curly": 0,
"no-multi-spaces": 0,
"no-alert": 0,
"consistent-return": 0,
"consistent-this": [0, "self"],
"func-style": 0,
"max-nested-callbacks": 0,
"camelcase": 0,
"no-dupe-class-members": 0,

// Warnings
"no-debugger": 1,
"no-empty": 1,
"no-invalid-regexp": 1,
"no-unused-expressions": 1,
"no-native-reassign": 1,
"no-fallthrough": 1,

// Errors
"eqeqeq": 2,
"no-undef": 2,
"no-dupe-keys": 2,
"no-empty-character-class": 2,
"no-self-compare": 2,
"valid-typeof": 2,
"handle-callback-err": 2,
"no-shadow-restricted-names": 2,
"no-new-require": 2,
"no-mixed-spaces-and-tabs": 2,
"block-scoped-var": 2,
"no-else-return": 2,
"no-throw-literal": 2,
"no-void": 2,
"radix": 2,
"wrap-iife": [2, "outside"],
"no-shadow": 0,
"no-path-concat": 2,
"valid-jsdoc": [
0,
{
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false
}
],

// stylistic errors
"no-spaced-func": 2,
"semi-spacing": 2,
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
"no-lonely-if": 2,
"no-floating-decimal": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
// "comma": [2, "last"],
"no-multiple-empty-lines": [2, { "max": 1 }],
// "no-nested-ternary": 2,
"operator-assignment": [2, "always"],
"padded-blocks": [2, "never"],
"quote-props": [2, "as-needed"],
"keyword-spacing": [2, { "before": true, "after": true, "overrides": {} }],
"space-before-blocks": [2, "always"],
"array-bracket-spacing": [2, "never"],
"computed-property-spacing": [2, "never"],
"space-in-parens": [2, "never"],
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"wrap-regex": 2,
"linebreak-style": 0,
"semi": [2, "always"],
"arrow-spacing": [2, { "before": true, "after": true }],
"no-class-assign": 2,
"no-const-assign": 2,
"no-this-before-super": 2,
"no-var": 2,
"object-shorthand": [2, "always"],
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-spread": 2,
"prefer-template": 2,

// typescript
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-use-before-define": ["off"],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unnecessary-type-constraint": "off",
"@typescript-eslint/ban-types": "off"
},
"overrides": [
{
"files": [
"test/**",
"*.spec.ts",
"*.test.ts",
"*.jsx",
"*.tsx",
"*.ts",
"*.js"
],
"rules": {
"prefer-arrow-callback": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": 0
}
}
]
}
51 changes: 26 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<div align="center" style="margin-top:50px">
<img src="https://avatars.githubusercontent.com/u/165751591?s=200&v=4" height="300">
<img src="https://avatars.githubusercontent.com/u/165751591?s=200&v=4" height="150">
</div>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->


# STRKFarm

STRKFarm is a tool that allows users to find best yield generating pools on Starknet.

[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/strkfarm/starkfarm-client/issues)

## About

STRKFarm is a tool that allows users to find best yield generating pools on Starknet.

### Terms to help you get familiar with codebase -

*

#### Achievements

* We have integrated 10+ DeFi protocols so far and we aim to add more features to allow users to design strategies, compute estimated yields, etc. to allow them to generate returns that match their interest while educating them of the risks.


STRKFarm is a platform that allows users to better navigate DeFi on Starknet. It has the following features:
1. Show top yield generating pools sorted by Protocols and various Categories. 10+ Protocols are integrated. ✅
2. Customized strategies, providing one-click investment with automated risk-management ✅ (Adding more)
3. Concentrated Liquidity Impermanent calculator 🚧
4. One click $STRK claim for DeFi spring users 🚧

## Project structure
The project is build using NextJS and Typescript. Below is the broad project structure:
1. Re-usable project wide components go into `src/components`. Page specific components go into their respective folder. (e.g. `src/app/claims/components`)
2. We use [Jotai](https://jotai.org/) for state management. Atoms are written in `src/store`. E.g. `src/store/strategies.atoms.ts`.
Most re-usable data is written into atoms, outside components so that data is eaily accessible across components without dumping custom logic into components.
Its suggested to keep view components low on business logic code.
3. All protocols have a class object (e.g. `src/store/ekubo.store.ts`). Where protocol specific custom logic is written, so that its get written to respective Atoms.
4. You can use `src/store/IDapp.store.ts` to define abstract class or type definitions that can be used within protocol class objects.
5. Custom re-usable hooks are written to `src/hooks`.

## How to get started

[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/strkfarm/starkfarm-client/issues)
Requirements:
1. Node 20+

Clone the repository
```bash
git clone https://github.com/strkfarm/starkfarm-client.git
```


Install dependencies and run the development build

```bash
Expand All @@ -58,21 +58,21 @@ You should see something like this:

## 🤝 Contribute

We're always looking for for stallions with great NextJS & Typescript skills to further this tool, to join our community and contribute to STRKFarm. Check out our [contributing guide](./docs/CONTRIBUTING.md)

We're always looking for for stallions with great NextJS & Typescript skills to further this tool, to join our community and contribute to STRKFarm. Check out our [contributing guide](./CONTRIBUTING.md)
for more information on how to get started.

To connect with us regarding any queries about contributing to the repo, feel free to join our telegram group [here](https://t.me/+HQ_eHaXmF-1lZDc1)
To connect with us regarding any queries about contributing to the repo, feel free to join our telegram group [here](https://t.me/+HQ_eHaXmF-1lZDc1). Head to `dev` topic.


## References

- [Telegram](https://t.me/+HQ_eHaXmF-1lZDc1)
- [OnlyDust](https://app.onlydust.com/p/strkfarm)
- [Website](https://www.strkfarm.xyz/)


## Contributors ✨

Thanks goes to these wonderful people. Follow the [contributors guide]() if you'd like to take part.
Thanks goes to these wonderful people.

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
Expand All @@ -99,5 +99,6 @@ Thanks goes to these wonderful people. Follow the [contributors guide]() if you'
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!


## Current Version
CURRENT_VERSION_PLACEHOLDER
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"start": "next start",
"lint": "next lint",
"build": "next build && node generate-changelog.js && node update-readme.js"
"lint:check": "eslint --max-warnings 0 --config .eslintrc .",
"lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix",
"lint:check": "eslint --config .eslintrc.json .",
"lint:fix": "eslint --config .eslintrc.json . --fix",
"format:check": "prettier --check \"**/*.{ts,tsx,json}\"",
"format:fix": "prettier --write \"**/*.{ts,tsx,json}\""
},
Expand Down Expand Up @@ -63,6 +63,7 @@
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"eslint-plugin-unused-imports": "^3.1.0",
"postcss": "^8",
"prettier": "^3.2.5",
"tailwindcss": "^3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/claims/components/ClaimInfoCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card } from "@chakra-ui/react";
import { Card } from '@chakra-ui/react';

export interface ClaimInfoCardProps {}

Expand Down
Loading

0 comments on commit 7d103b6

Please sign in to comment.