Skip to content

Commit 18d1d61

Browse files
authored
Merge branch 'DefiLlama:main' into main
2 parents a183be7 + 311ee2f commit 18d1d61

File tree

559 files changed

+18579
-5699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

559 files changed

+18579
-5699
lines changed

.eslintrc.js

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build tvlModules and upload artifact
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build-and-upload:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- uses: pnpm/action-setup@v4
17+
name: Install pnpm
18+
with:
19+
version: 10
20+
run_install: false
21+
22+
- name: Install Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
cache: 'pnpm'
27+
28+
- name: Install dependencies
29+
run: pnpm install
30+
31+
32+
- name: Run buildImports script
33+
run: node scripts/buildImports.js
34+
35+
- name: Publish tvlModules.json as "latest" release
36+
uses: ncipollo/release-action@v1
37+
with:
38+
tag: latest
39+
name: Latest tvlModules
40+
artifacts: scripts/tvlModules.json
41+
allowUpdates: true

.github/workflows/test.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,27 @@ jobs:
1010
with:
1111
output: 'json'
1212
fileOutput: 'json'
13-
- name: Check out repository code
14-
uses: actions/checkout@v2
13+
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: pnpm/action-setup@v4
20+
name: Install pnpm
21+
with:
22+
version: 10
23+
run_install: false
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
1534
- name: Run changes files through test script
1635
env:
1736
LLAMA_DEBUG_MODE: "true"
@@ -27,10 +46,7 @@ jobs:
2746
exit 0
2847
fi
2948
30-
npm remove typescript @types/async-retry @types/bn.js ts-node @solendprotocol/solend-sdk @hover-labs/kolibri-js
31-
# npm ci --omit=dev
32-
npm ci
33-
# npm update @defillama/sdk
49+
# pnpm remove typescript @types/async-retry @types/bn.js ts-node @solendprotocol/solend-sdk @hover-labs/kolibri-js
3450
3551
# fail if package.json or package-lock.json is changed
3652
FILES_MODIFIED=${{ steps.file_changes.outputs.files_modified }}
@@ -56,5 +72,4 @@ jobs:
5672
5773
- name: Run ESLint
5874
run: |
59-
npm ci
6075
npm run lint

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ yarn.lock
1010
.vscode
1111
projects/binance/data.csv
1212

13-
*.log
13+
*.log
14+
15+
scripts/tvlModules.json

eslint.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = [
2+
{
3+
files: ["**/*.js"],
4+
ignores: ["projects/test/*"],
5+
languageOptions: {
6+
ecmaVersion: "latest",
7+
},
8+
rules: {
9+
"no-case-declarations": "off",
10+
"no-unused-vars": "off",
11+
"no-useless-escape": "warn",
12+
"no-prototype-builtins": "off",
13+
"no-unreachable": "off",
14+
}
15+
}
16+
];

liquidations/gravita-protocol/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const positions = async () => {
5757
const prices = {}
5858
for (const c of collAddresses) {
5959
const info = await getTokenInfo(`ethereum:${c}`)
60-
prices[c] = BigNumber(info.price).times(10e18).toFixed()
60+
prices[c] = BigNumber(info.price).times(10e17).toFixed()
6161
}
6262

6363
const vesselCounts = (

package-lock.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"weeklyChanges": "git pull && git diff $(git log -1 --before=@{7.days.ago} --format=%H) --stat | grep -E \"projects/\" | cut -d / -f 2 | cut -d \" \" -f 1 | uniq | wc -l",
99
"dev": "babel-watch curve.js",
10-
"lint": "eslint -c .eslintrc.js .",
11-
"eslint:github-action": "eslint -c .eslintrc.js .",
10+
"build": "node scripts/buildImports.js",
11+
"lint": "eslint -c eslint.config.js .",
12+
"eslint:github-action": "eslint -c eslint.config.js .",
1213
"test-interactive": "node utils/testInteractive",
1314
"tvl": "cd utils;npm i; cd ..; node utils/testInteractive",
1415
"treasury": "cd utils;npm i; cd ..; node utils/testInteractive treasury",
@@ -28,14 +29,15 @@
2829
"@defillama/sdk": "latest",
2930
"@project-serum/anchor": "^0.26.0",
3031
"@solana/web3.js": "^1.87.6",
31-
"@solendprotocol/solend-sdk": "^0.4.3",
3232
"@supercharge/promise-pool": "^2.1.0",
33-
"async-retry": "^1.3.3",
3433
"axios": "^1.6.5",
34+
"base-x": "^5.0.1",
3535
"bignumber.js": "^9.0.1",
3636
"blakejs": "^1.2.1",
3737
"bn.js": "^5.2.1",
3838
"borsh": "^0.7.0",
39+
"bs58": "^6.0.0",
40+
"buffer-layout": "^1.2.2",
3941
"curve25519-js": "^0.0.4",
4042
"dotenv": "^8.6.0",
4143
"ethers": "^6.0.0",
@@ -47,8 +49,7 @@
4749
"miscreant": "^0.3.2",
4850
"p-limit": "^3.1.0",
4951
"starknet": "^5.24.3",
50-
"tron-format-address": "^0.1.8",
51-
"typescript": "^5.0.0"
52+
"ws": "^8.18.3"
5253
},
5354
"overrides": {
5455
"ansi-regex": "5.0.1",
@@ -61,9 +62,6 @@
6162
},
6263
"description": "",
6364
"devDependencies": {
64-
"@types/async-retry": "^1.4.5",
65-
"@types/bn.js": "^5.1.0",
66-
"eslint": "^8.32.0",
67-
"ts-node": "^10.8.1"
65+
"eslint": "^9.38.0"
6866
}
6967
}

0 commit comments

Comments
 (0)