Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
60c2f2ceaa
|
@ -1,2 +1,5 @@
|
||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
|
.env
|
||||||
|
.DS_Store
|
||||||
|
|
21
README.md
21
README.md
|
@ -11,14 +11,19 @@ To run the liquidator you will need:
|
||||||
### Setup
|
### Setup
|
||||||
Make sure to edit the .env file to look something like this:
|
Make sure to edit the .env file to look something like this:
|
||||||
```
|
```
|
||||||
export CLUSTER="mainnet-beta"
|
CLUSTER="mainnet-beta"
|
||||||
export CLUSTER_URL="https://solana-api.projectserum.com"
|
CLUSTER_URL="https://solana-api.projectserum.com"
|
||||||
export KEYPAIR=~/.config/solana/id.json
|
KEYPAIR=${HOME}/.config/solana/id.json
|
||||||
export NODE_ENV=production
|
NODE_ENV=production
|
||||||
export TARGETS="0.1 2.0 100.0 500.0"
|
TARGETS="0.1 2.0 100.0 500.0"
|
||||||
export GROUP_NAME="BTC_ETH_SOL_SRM_USDT"
|
GROUP_NAME="BTC_ETH_SOL_SRM_USDC"
|
||||||
export CHECK_INTERVAL="1000.0"
|
CHECK_INTERVAL="1000.0"
|
||||||
export FILTER_ACCOUNTS=true
|
FILTER_ACCOUNTS=true
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace `${HOME}` with your actual path to home. For example,
|
||||||
|
```
|
||||||
|
KEYPAIR=/Users/john/.config/solana/id.json
|
||||||
```
|
```
|
||||||
|
|
||||||
TARGETS represents the amounts of each token the partial liquidator should try to maintain
|
TARGETS represents the amounts of each token the partial liquidator should try to maintain
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
"@typescript-eslint/parser": "^4.6.0",
|
"@typescript-eslint/parser": "^4.6.0",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-eslint": "^10.0.3",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
|
"dotenv": "^10.0.0",
|
||||||
"eslint": "^7.6.0",
|
"eslint": "^7.6.0",
|
||||||
"eslint-config-prettier": "^6.11.0",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"jest": "^26.4.0",
|
"jest": "^26.4.0",
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import * as Env from 'dotenv';
|
||||||
|
Env.config();
|
||||||
import { IDS, MangoClient, MarginAccount, NUM_MARKETS } from '@blockworks-foundation/mango-client';
|
import { IDS, MangoClient, MarginAccount, NUM_MARKETS } from '@blockworks-foundation/mango-client';
|
||||||
|
|
||||||
import { Account, Connection, PublicKey } from '@solana/web3.js';
|
import { Account, Connection, PublicKey } from '@solana/web3.js';
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import * as Env from 'dotenv';
|
||||||
|
Env.config();
|
||||||
import {
|
import {
|
||||||
findLargestTokenAccountForOwner,
|
findLargestTokenAccountForOwner,
|
||||||
getMultipleAccounts,
|
getMultipleAccounts,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import * as Env from 'dotenv';
|
||||||
|
Env.config();
|
||||||
import {
|
import {
|
||||||
findLargestTokenAccountForOwner,
|
findLargestTokenAccountForOwner,
|
||||||
getMultipleAccounts,
|
getMultipleAccounts,
|
||||||
|
|
|
@ -1246,9 +1246,9 @@ boolbase@~1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
||||||
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
||||||
|
|
||||||
"borsh@git+https://github.com/defactojob/borsh-js.git#field-mapper":
|
"borsh@https://github.com/defactojob/borsh-js#field-mapper":
|
||||||
version "0.3.1"
|
version "0.3.1"
|
||||||
resolved "git+https://github.com/defactojob/borsh-js.git#33a0d24af281112c0a48efb3fa503f3212443de9"
|
resolved "https://github.com/defactojob/borsh-js#33a0d24af281112c0a48efb3fa503f3212443de9"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/bn.js" "^4.11.5"
|
"@types/bn.js" "^4.11.5"
|
||||||
bn.js "^5.0.0"
|
bn.js "^5.0.0"
|
||||||
|
@ -1853,6 +1853,11 @@ dotenv@8.2.0:
|
||||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
|
||||||
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
|
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
|
||||||
|
|
||||||
|
dotenv@^10.0.0:
|
||||||
|
version "10.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
|
||||||
|
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
|
||||||
|
|
||||||
ecc-jsbn@~0.1.1:
|
ecc-jsbn@~0.1.1:
|
||||||
version "0.1.2"
|
version "0.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
|
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
|
||||||
|
|
Loading…
Reference in New Issue