Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msol tvl calculator #46

Open
wants to merge 425 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
425 commits
Select commit Hold shift + click to select a range
7b0c49d
working marinade lever
0xripleys Aug 23, 2022
8359319
fixing delever
0xripleys Aug 23, 2022
0b9922b
working strategy class
0xripleys Aug 24, 2022
171e594
use deterministic extra wsol account
0xripleys Aug 24, 2022
820ac59
support re-levering
0xripleys Aug 24, 2022
fb61563
rename
0xripleys Aug 24, 2022
ff7464c
update sdk to use v1/markets/config and add break flash loans script
0xripleys Aug 29, 2022
b25641f
Add protocol take rate
0xodia Sep 12, 2022
e75db00
Merge pull request #28 from solendprotocol/add-protocol-take-rate
0xodia Sep 12, 2022
4f360ec
v0.6.3
0xodia Sep 12, 2022
572a78e
various fixes
0xripleys Sep 19, 2022
6d4d827
remove strategy code
0xripleys Sep 19, 2022
5aa2de4
remove bnumber reference
0xripleys Sep 19, 2022
157d5d8
Merge pull request #30 from solendprotocol/try_flash_beta_marinade
0xodia Sep 19, 2022
63a61c1
v0.6.5
0xodia Sep 19, 2022
35f8551
add nazare unwrap
Haoqian-Zheng Sep 20, 2022
a31d902
Revert "add nazare unwrap"
Haoqian-Zheng Sep 20, 2022
0777f96
add nazare unwrap
Haoqian-Zheng Sep 20, 2022
9845918
upgrade web3.js
Haoqian-Zheng Sep 20, 2022
2334075
Merge pull request #42 from Hedge-Finance/main
0xCactus Sep 21, 2022
6de4eef
fix layout buffer error
0xCactus Sep 21, 2022
d001270
Merge pull request #43 from solendprotocol/fix-layout-buffer-error
0xCactus Sep 21, 2022
69c56f2
refactor unstaking logic and add rBasis unstaking
0xCactus Sep 26, 2022
db1c923
Merge pull request #44 from solendprotocol/refactor-unstaking
0xCactus Sep 26, 2022
b57b8a5
deprecate old endpoints + make type names consistent
0xodia Sep 30, 2022
320484e
Merge pull request #31 from solendprotocol/remove-old-endpoints
0xodia Sep 30, 2022
f97785a
Add kamino unwrap
peroxy Oct 12, 2022
437557c
Merge pull request #45 from hubbleprotocol/main
0xCactus Oct 12, 2022
03cb46a
add solana token v2 dep for nazare
0xCactus Oct 12, 2022
94e6aa8
move sdk to diff folder
0xripleys Oct 13, 2022
5c13525
move to diff folder
0xripleys Oct 13, 2022
a8c1f1b
move hidden files
0xripleys Oct 13, 2022
a875082
Merge branch 'liquidator'
0xripleys Oct 13, 2022
478ccb0
cleanup
0xripleys Oct 13, 2022
67885cd
move vscode files to liquidator
0xripleys Oct 13, 2022
6885824
ci: liquidator
tahsintunan Oct 18, 2022
33cedc0
ci: solend-sdk
tahsintunan Oct 18, 2022
e4b681f
added some functionality to grab flashloan fee percentage alongside o…
Oct 20, 2022
0b1a0c3
Merge pull request #3 from staccDOTsol/features/add-flashloan-fee-per…
0xodia Oct 20, 2022
ce9b199
Update break_flash_loans.ts
0xripleys Oct 31, 2022
8af7247
Merge pull request #1 from janvinsha/ui
janvinsha Nov 3, 2022
d885dd1
ci: actions work on all branches
tahsintunan Nov 6, 2022
b926b32
ci: actions work on all branches
tahsintunan Nov 6, 2022
54235db
ci: actions moved to root directory
tahsintunan Nov 6, 2022
c6ca046
ci: actions moved to root directory
tahsintunan Nov 6, 2022
6c6ab81
ci: set default working directory
tahsintunan Nov 6, 2022
b9c0ab5
migrate from babel to swc
tahsintunan Nov 6, 2022
1e728b5
Merge pull request #2 from tahsintunan/ci
0xripleys Nov 6, 2022
b68ba41
Merge pull request #2 from janvinsha/swc
janvinsha Nov 6, 2022
8c0f841
usePoolsList hook implemented to fetch pool vm
tahsintunan Nov 6, 2022
08c0f87
Merge pull request #3 from janvinsha/ui
janvinsha Nov 7, 2022
2812fe8
made selectedPool a global state atom
tahsintunan Nov 7, 2022
1d05c09
add functions for fetching reserves list
tahsintunan Nov 10, 2022
5aa3974
implement Reserve list viewmodels
tahsintunan Nov 10, 2022
0a0b624
useReservesList hook implemented
tahsintunan Nov 10, 2022
146e7c7
useReservesList hook integrated with the UI
tahsintunan Nov 11, 2022
9cccabc
poolvm moved to models
tahsintunan Nov 11, 2022
e167e9d
restructure models and util functions
tahsintunan Nov 11, 2022
34beea3
token data fetching implemented
tahsintunan Nov 11, 2022
8d1adfa
Merge branch 'master' into pools
tahsintunan Nov 11, 2022
7d262d0
Merge pull request #4 from janvinsha/pools
janvinsha Nov 11, 2022
1f0e559
return hashmap instead of array for getting token data
tahsintunan Nov 11, 2022
70af22a
fix: calculate total supply
tahsintunan Nov 12, 2022
ba69193
calculateBorrowAPR implemented
tahsintunan Nov 14, 2022
e67f0b8
calculateSupplyAPR implemented
tahsintunan Nov 14, 2022
b3b2ad6
calculateSupplyAPY implemented
tahsintunan Nov 14, 2022
146545b
calculateBorrowAPY implemented
tahsintunan Nov 14, 2022
b6507c1
number formatting implemented
tahsintunan Nov 14, 2022
d00a597
use Map instead of objects for tokenInfo to improve performance
tahsintunan Nov 15, 2022
6962783
interfaces moved to global.d.ts
tahsintunan Nov 15, 2022
ce8ad42
hardcode the main pool's reserves' order
tahsintunan Nov 15, 2022
77af33d
Merge pull request #5 from janvinsha/reserve
janvinsha Nov 18, 2022
8c4b5c3
Add SolendRPCConnection and MultiConnection:
DaSichuan Nov 21, 2022
64795a7
Add SolendRPCConnection and MultiConnection
DaSichuan Nov 21, 2022
aec7d5d
Bump web3js version, add rpcEndpoint property
DaSichuan Nov 21, 2022
68acaee
add GetTransaction overloads
DaSichuan Nov 21, 2022
4651bd7
update Version to VersionedTransaction
DaSichuan Nov 21, 2022
b27dfdb
Add getAddressLookupTable
DaSichuan Nov 21, 2022
10cdfed
update statsd format
DaSichuan Nov 22, 2022
005ad69
Add delayed backup connection behavior
DaSichuan Nov 22, 2022
ea296a6
Add test for interface fulfillment
DaSichuan Nov 22, 2022
5f657f3
Fix sdk parseReserve
0xodia Nov 22, 2022
110b4e9
v0.6.6
0xodia Nov 22, 2022
3382e6f
Add cached connection
DaSichuan Nov 22, 2022
5354aed
Merge pull request #6 from solendprotocol/cached_connection
DaSichuan Nov 22, 2022
c535103
Fix cached connection
DaSichuan Nov 22, 2022
e41dc5a
Merge pull request #7 from solendprotocol/fix_cached_connection
DaSichuan Nov 22, 2022
9279161
Prevent caches from getting infinitely big
DaSichuan Nov 23, 2022
e8a35bf
Merge pull request #8 from solendprotocol/no_infinite_cache
DaSichuan Nov 23, 2022
051fb2b
Delete oldest object in cache instead of deleting everything
DaSichuan Nov 23, 2022
384c7b5
handle null checks, work around undefined tokenInfo
tahsintunan Nov 24, 2022
7a07fb5
get asset price from pyth
tahsintunan Nov 26, 2022
1d0bd51
update deprecated api endpoint to get pools
tahsintunan Nov 26, 2022
83b5347
fetch price from switchboard
tahsintunan Nov 27, 2022
7a4e2e0
calculate total supply/borrow/ltv of a pool
tahsintunan Nov 27, 2022
210db04
break down reserves utils into small modules
tahsintunan Nov 27, 2022
e449116
Merge pull request #6 from janvinsha/oracle
janvinsha Nov 27, 2022
7589174
fix: lendingMarket interface definition
tahsintunan Nov 27, 2022
d9200a8
Merge pull request #9 from tahsintunan/fix-lendingMarket
0xripleys Nov 27, 2022
974f754
feat: add loader and error component
Nov 28, 2022
b9d536e
feat:add pool position modal
Nov 28, 2022
2d7e5a2
feat: add APR switch
Nov 28, 2022
dfe1105
fix: mobile drawer on desktop bug
Nov 28, 2022
a6b6a2c
feat: add closing drawer on click of pools
Nov 28, 2022
d7a0583
Merge pull request #7 from janvinsha/uiv2
janvinsha Nov 28, 2022
4f9b496
feat: add endpoints to common config
Nov 28, 2022
e849fe3
feat: add rpc atom
Nov 28, 2022
b78e07b
feat: create rpcswitcher component
Nov 28, 2022
afd50c6
feat: add rpcswitcher component to desktop version
Nov 28, 2022
2f6df3a
feat: add rpcswitcher component to mobile
Nov 28, 2022
e619a15
Merge pull request #8 from janvinsha/rpc
janvinsha Nov 28, 2022
4d329aa
fix: mobile pool dashboard alignment
Nov 28, 2022
59b0067
trigger loading state every time a new pool is selected
tahsintunan Nov 28, 2022
fc668d1
fix: close all modals when clicked outside the modal box
Nov 28, 2022
c7ff52c
fix: hambuger revert when clicked on pools
Nov 28, 2022
4836d05
fix: walletbutton width
janvinsha Nov 30, 2022
af01e1a
Merge pull request #9 from janvinsha/sbwr
janvinsha Nov 30, 2022
5853d7d
load sbv2 only once on mount
tahsintunan Dec 1, 2022
49b6c6f
v0.6.7
0xodia Dec 1, 2022
4774d54
bumb sdk version to 0.6.7
tahsintunan Dec 1, 2022
b14e327
feat:create assetinput and sbwr components
janvinsha Dec 2, 2022
3426bd9
Merge pull request #10 from janvinsha/sbwr
janvinsha Dec 2, 2022
130b4f5
asset orices
tahsintunan Dec 3, 2022
0cc8641
rpc
tahsintunan Dec 5, 2022
73ddede
use require for buffer-layout
0xCactus Dec 6, 2022
4771ba1
Merge pull request #10 from solendprotocol/fix-bufferlayout-compilation
0xCactus Dec 6, 2022
b53d97f
Custom RPC implemented
tahsintunan Dec 6, 2022
6446ce9
show pool creator
tahsintunan Dec 6, 2022
a45d485
Merge branch 'master' into obligation
tahsintunan Dec 6, 2022
3059096
fix reserve size
0xCactus Dec 6, 2022
9671b36
Merge pull request #11 from janvinsha/obligation
janvinsha Dec 6, 2022
7fdd14b
Merge pull request #11 from solendprotocol/fix-reserve-size
0xCactus Dec 6, 2022
c7ab2f9
fix: merge conflicts
janvinsha Dec 7, 2022
cccc8fd
Merge pull request #12 from janvinsha/uiv3
janvinsha Dec 7, 2022
e9ab451
fix reserve
DaSichuan Dec 7, 2022
7895c4a
Merge pull request #12 from solendprotocol/fix_reserve
DaSichuan Dec 7, 2022
8a9656f
fix: remove styles folder
janvinsha Dec 7, 2022
a9bf42c
Revert "fix reserve"
DaSichuan Dec 7, 2022
5d33fea
add accumulatedProtocolFeesWads
DaSichuan Dec 7, 2022
ef1754a
Merge pull request #13 from janvinsha/uiv3
janvinsha Dec 7, 2022
92287ff
fix: Pool name
tahsintunan Dec 7, 2022
8fc4ea4
fix: placeholder domain error
janvinsha Dec 7, 2022
4889e85
fix: placeholder domain error
janvinsha Dec 7, 2022
324f761
Merge pull request #14 from janvinsha/uiv3
janvinsha Dec 7, 2022
242d079
bump to 0.6.8
0xCactus Dec 7, 2022
e098a18
Merge pull request #13 from solendprotocol/bump-sdk
0xCactus Dec 7, 2022
eb9f343
add publishing instructions to README
0xCactus Dec 7, 2022
add4519
Pool address format changed
tahsintunan Dec 7, 2022
a28f14b
remove hardcoded connection
tahsintunan Dec 7, 2022
5031134
Fix accumulatedProtoclFees
DaSichuan Dec 8, 2022
7b2b1f6
feat: breakdown views/home/index into smaller components
janvinsha Dec 8, 2022
fea0484
Merge pull request #15 from janvinsha/uiv3
janvinsha Dec 8, 2022
18bbda0
Merge pull request #5 from janvinsha/master
0xodia Dec 9, 2022
be5e949
v0.6.9
0xCactus Dec 11, 2022
ac36902
Merge pull request #15 from solendprotocol/bump-sdk-0.6.9
0xCactus Dec 11, 2022
303c29c
use solend-sdk
0xCactus Dec 7, 2022
29acf96
fix lint
0xCactus Dec 11, 2022
f8ea70e
Merge pull request #14 from solendprotocol/use-sdk
0xCactus Dec 11, 2022
051db1e
add solend lite
0xodia Dec 15, 2022
12866c8
Merge pull request #17 from solendprotocol/add-solend-lite
0xodia Dec 15, 2022
c794200
fallback to previous pyth price
0xCactus Jan 10, 2023
19e506a
Merge pull request #18 from solendprotocol/fallback-to-last-price
0xCactus Jan 10, 2023
edcf4a5
add confirmTransaction to rpc wrapper
0xCactus Jan 12, 2023
2841ffe
Merge pull request #19 from solendprotocol/add-confirmTransaction-Sol…
0xCactus Jan 12, 2023
d843c04
add .gitmodules
0xCactus Jan 12, 2023
97b2808
actions bugfix
0xripleys Feb 2, 2023
4650b7b
removed solend-lite submodule
0xripleys Feb 10, 2023
736b440
move lite to subdirectory
0xodia Feb 10, 2023
9d54e5a
Merge pull request #6 from solendprotocol/lite-in-folder
0xodia Feb 10, 2023
53447ec
Merge branch 'lite5' into remove-lite-submodule
0xripleys Feb 10, 2023
37be4d1
Merge pull request #22 from solendprotocol/remove-lite-submodule
0xodia Feb 10, 2023
a077ce0
solend lite refactor
0xodia Feb 11, 2023
a269c52
regenerate yarn.lock
0xodia Feb 11, 2023
692d201
update sdk lock
0xodia Feb 11, 2023
a40e316
resolve different spl-token versions between lite and sdk
0xodia Feb 11, 2023
ba4172b
declare public as workspace
0xodia Feb 11, 2023
a6191cf
add bn.js to package.json
0xodia Feb 12, 2023
e8232c1
setup workspace
0xodia Feb 13, 2023
c267146
add workspace package.json
0xodia Feb 13, 2023
d704404
Merge pull request #21 from solendprotocol/add-solend-lite
0xodia Feb 13, 2023
a2451c3
rename liquidator package
0xodia Feb 13, 2023
5599bb7
Merge pull request #23 from solendprotocol/rename-liquidator-package
0xodia Feb 13, 2023
acc4b68
use alchemy as default node
0xodia Feb 13, 2023
330c3a2
lite mode mobile view
0xodia Feb 14, 2023
c837b68
Merge pull request #24 from solendprotocol/lite-mobile
0xodia Feb 14, 2023
d42602f
bugs
0xodia Feb 16, 2023
b70a756
bug bash 1
0xodia Feb 24, 2023
38f4bba
fix strict tsc changes
0xodia Feb 24, 2023
fa2683e
remove console.logs
0xodia Feb 24, 2023
31aabd9
move dashboard files
0xodia Feb 24, 2023
519647a
Merge pull request #25 from solendprotocol/bugbash1
0xodia Feb 24, 2023
1edfddd
sortable tables and other improvements
0xodia Feb 24, 2023
eb323c6
remove comments
0xodia Feb 24, 2023
f6930cb
ignore vscode settings
0xodia Feb 24, 2023
b9c11be
Merge pull request #26 from solendprotocol/sortable-tables
0xodia Feb 24, 2023
0e7deda
fix big input
0xodia Feb 26, 2023
913a924
Merge pull request #27 from solendprotocol/fix-big-input
0xodia Feb 26, 2023
5e79aab
release script
0xodia Feb 27, 2023
5bfef84
Merge pull request #28 from solendprotocol/release-script
0xodia Feb 27, 2023
1b2d321
move utils to sdk core
0xodia Feb 27, 2023
4391f31
remove action
0xodia Feb 27, 2023
9267806
Merge pull request #29 from solendprotocol/move-utils-to-sdk
0xodia Feb 27, 2023
486661a
Add SolendActionCore
0xodia Feb 28, 2023
1184937
lints
0xodia Feb 28, 2023
4d2171b
Merge pull request #30 from solendprotocol/actions-to-sdk
0xodia Feb 28, 2023
66203d9
contextual modal open
0xodia Feb 28, 2023
2bcb442
Merge pull request #31 from solendprotocol/tab-open
0xodia Feb 28, 2023
b28809e
Update README.md
0xodia Feb 28, 2023
2c945e8
Create README.md
0xodia Feb 28, 2023
2df52c6
Update README.md
0xodia Feb 28, 2023
5cac5b7
remove simulateTransaction
0xodia Feb 28, 2023
f3eed24
Merge pull request #32 from solendprotocol/delete-simulate
0xodia Feb 28, 2023
eee76ea
Fix api link
0xodia Feb 28, 2023
4844e54
Update README.md
0xodia Feb 28, 2023
1f259c9
Update README.md
0xodia Feb 28, 2023
faed25a
add example image to readme
0xodia Mar 1, 2023
1639882
Reference solend lite
0xodia Mar 1, 2023
6d00de0
propagate authority address from backend
0xodia Mar 1, 2023
039a6c5
Merge pull request #33 from solendprotocol/propagrate-authority
0xodia Mar 1, 2023
7bcee4b
small changes
0xodia Mar 2, 2023
152421f
Merge pull request #34 from solendprotocol/small-changes
0xodia Mar 2, 2023
8378b69
feedback
0xodia Mar 2, 2023
8c5327f
Merge pull request #35 from solendprotocol/lite-feedback
0xodia Mar 2, 2023
0268f04
ctoken fees bug
0xodia Mar 3, 2023
39553f8
Merge pull request #36 from solendprotocol/ctoken-bug
0xodia Mar 3, 2023
846248f
decode reserve properly
0xodia Mar 3, 2023
b84e793
Merge pull request #37 from solendprotocol/reserve-decoder
0xodia Mar 3, 2023
2f41345
order nav better
0xodia Mar 3, 2023
18795e5
Merge pull request #38 from solendprotocol/order-nav
0xodia Mar 3, 2023
d82fd98
ui nits
0xodia Mar 6, 2023
859cc0d
Merge pull request #39 from solendprotocol/ui-nits
0xodia Mar 6, 2023
e5cafe6
Add parser for v2 reserves
DaSichuan Mar 23, 2023
e46ed3f
Merge pull request #40 from solendprotocol/reserve_v2
DaSichuan Mar 23, 2023
19a4063
bump @types/node
0xCactus Mar 23, 2023
3a92675
fix u64
0xCactus Mar 24, 2023
18f3c44
Merge pull request #41 from solendprotocol/fix-u64
0xCactus Mar 24, 2023
c12304f
bump sdk version
0xCactus Mar 24, 2023
7d5792c
fix reserve decoding
0xCactus Mar 25, 2023
59a647f
bump sdk version
0xCactus Mar 25, 2023
f4ec3fd
Merge pull request #42 from solendprotocol/fix-reserve-decoding
0xCactus Mar 25, 2023
486b35e
update addedBorrowWeightBPS to BN
0xCactus Mar 25, 2023
45001f5
bump sdk version
0xCactus Mar 25, 2023
8a89770
Merge pull request #43 from solendprotocol/update-added_borrow_weight…
0xCactus Mar 25, 2023
993da89
fix borrowWeight
0xCactus Mar 28, 2023
97f606c
Merge pull request #44 from solendprotocol/fix-reserve-borrowWeight
0xCactus Mar 28, 2023
a3de7e5
add support for zstd compressed decodes
nope-finance Jan 28, 2023
c8d8068
added basic test
nope-finance Jan 28, 2023
74fddff
lint
nope-finance Mar 28, 2023
c67cd04
Merge pull request #20 from solendprotocol/zsdt_decode
nope-finance Mar 28, 2023
0e3e393
msol tvl calculator
nope-finance Mar 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/liquidator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Liquidator CI

on:
push:
paths:
- "liquidator/**"
- ".github/workflows/liquidator.yml"
pull_request:
paths:
- "liquidator/**"
- ".github/workflows/liquidator.yml"

jobs:
lint_and_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./liquidator
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Lint
run: yarn lint
- name: Build
run: yarn build
30 changes: 30 additions & 0 deletions .github/workflows/solend-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Solend SDK CI

on:
push:
paths:
- "solend-sdk/**"
- ".github/workflows/solend-sdk.yml"
pull_request:
paths:
- "solend-sdk/**"
- ".github/workflows/solend-sdk.yml"

jobs:
lint_and_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./solend-sdk
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Lint
run: yarn lint
- name: Build
run: yarn build
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
dist/
node_modules/
.vscode
.DS_Store
yarn.lock
node_modules
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Solend Public
Solend public is a monorepo of public reposititories meant to benefit from a yarn workspace setup. This includes:
- Solend SDK, a Typescript SDK for interacting with the Solend program
- Solend LITE, a lightweight open-source Solend client, powered by and developed alongside the Solend SDK
- Solend Liquidator, a starting point for the Solend community to build their liquidator bots
75 changes: 0 additions & 75 deletions __tests__/examples.test.ts

This file was deleted.

7 changes: 0 additions & 7 deletions jest.config.js

This file was deleted.

1 change: 1 addition & 0 deletions liquidator/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
76 changes: 76 additions & 0 deletions liquidator/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'airbnb-typescript',
'plugin:@typescript-eslint/eslint-recommended',
],
env: {
node: true,
jest: true,
es6: true,
},
parserOptions: {
project: ['./tsconfig.eslint.json', './tsconfig.json'],
ecmaVersion: 2015,
sourceType: 'module',
tsconfigRootDir: __dirname,
},
rules: {
'no-shadow': 'off',
'jest/no-focused-tests': 0,
'class-methods-use-this': 0,
'no-use-before-define': 0,
'no-await-in-loop': 0,
'no-underscore-dangle': 0,
'no-trailing-spaces': ['error', { ignoreComments: true }],
'import/prefer-default-export': 0,
'global-require': 'warn',
'no-restricted-imports': [
'error',
{
patterns: ['..*'],
},
],
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variableLike',
custom: {
regex: '^([Aa]ny|[Nn]umber|[Ss]tring|[Bb]oolean|[Uu]ndefined)$',
match: false,
},
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'typeLike',
custom: {
regex: '^([Aa]ny|[Nn]umber|[Ss]tring|[Bb]oolean|[Uu]ndefined)$',
match: false,
},
format: ['PascalCase'],
},
],
'max-len': 'off',
'no-console': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.d.ts', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src'],
paths: 'src',
},
},
// silence dumb react warning
react: { version: '999.999.999' },
},
};
9 changes: 9 additions & 0 deletions liquidator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# generated
**/node_modules

# production
build/
.env

# misc
id.json
30 changes: 30 additions & 0 deletions liquidator/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "liquidate",
"type": "node",
"request": "launch",
"args": [
"${workspaceRoot}/src/liquidate.ts",
],
"runtimeArgs": [
"-r",
"ts-node/register",
"-r",
"tsconfig-paths/register"
],
"cwd": "${workspaceRoot}",
"internalConsoleOptions": "openOnSessionStart",
"runtimeExecutable": "/usr/local/bin/node",
"outputCapture": "std",
"env": {
"APP": "production",
"THROTTLE": "1000"
}
},
]
}
22 changes: 22 additions & 0 deletions liquidator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:16-alpine3.11


# Create Directory for the Container
RUN mkdir -p /home/solend/app
WORKDIR /home/solend/app

# Increase heap size
ENV NODE_OPTIONS=--max_old_space_size=4096

# Only copy the package.json file to work directory
COPY package.json package-lock.json ./
# Install all Packages
RUN npm install

# Copy all other source code to work directory
COPY src /home/solend/app/src
COPY tsconfig.json /home/solend/app
RUN npm run build

# Start
CMD ["npm", "start"]
21 changes: 21 additions & 0 deletions liquidator/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Solend

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.
Loading