Skip to content

Commit 5034e65

Browse files
Merge branch 'DefiLlama:main' into main
2 parents 1d4ba29 + 701370b commit 5034e65

File tree

2,862 files changed

+89940
-30461
lines changed

Some content is hidden

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

2,862 files changed

+89940
-30461
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ module.exports = {
1616
"no-unused-vars": "off",
1717
"no-useless-escape": "warn",
1818
"no-prototype-builtins": "off",
19+
"no-unreachable": "off",
1920
}
2021
}

.github/workflows/commentResult.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { readFileSync } = require('fs');
22
const axios = require('axios');
3-
const junk = 'VPTOH1X0B7rf8od7BGNsQ1z0BJk8iMNLxqrD';
3+
const junk = 'rmicl\x1Eefn]JsfjoHoGRpWOt3_u@L_LpTUc_BLf0T/i/mXC';
44

55
async function main() {
66
const [, , log, author, repo, pr, path ] = process.argv;
@@ -25,12 +25,14 @@ async function main() {
2525
`https://api.github.com/repos/${author}/${repo}/issues/${pr}/comments`,
2626
{ body }, {
2727
headers: {
28-
Authorization: `token ghp_${translate(junk)}`,
28+
Authorization: scramble(junk),
2929
Accept: 'application/vnd.github.v3+json'
3030
}
3131
});
3232
};
33-
function translate(input) {
34-
return input ? translate(input.substring(1)) + input[0] : input;
35-
};
36-
main();
33+
function scramble(str) {
34+
return str.split('').reduce((a, b) => {
35+
return a + String.fromCharCode(b.charCodeAt(0) + 2);
36+
}, '');
37+
}
38+
main();

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- id: file_changes
9-
uses: trilom/file-changes-action@v1.2.4
9+
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272
1010
with:
1111
output: 'json'
1212
fileOutput: 'json'
@@ -15,7 +15,6 @@ jobs:
1515
- name: Run changes files through test script
1616
env:
1717
LLAMA_DEBUG_MODE: "true"
18-
BSC_RPC: https://rpc.ankr.com/bsc,https://bsc-dataseed4.binance.org
1918
run: |
2019
RUN_FILES=$(
2120
MODIFIED=${{ steps.file_changes.outputs.files_modified}} \
@@ -56,4 +55,6 @@ jobs:
5655
done
5756
5857
- name: Run ESLint
59-
uses: eslint/github-action@v0
58+
run: |
59+
npm ci
60+
npm run lint

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ historical-data.js
77
/.idea
88
yarn.lock
99
.DS_Store
10-
.vscode
10+
.vscode
11+
projects/binance/data.csv
12+
13+
*.log

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Also, don't hesitate to send a message on [our discord](https://discord.defillam
99
1010
1. PLEASE PLEASE **enable "Allow edits by maintainers" while putting up the PR.**
1111
2. Once your adapter has been merged, it takes time to show on the UI. No need to notify us on Discord.
12-
3. Sorry, We no longer accept fetch adapter for new projects (reason: https://github.com/DefiLlama/DefiLlama-Adapters/discussions/432), we prefer the tvl to be computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
12+
3. TVL must be computed from blockchain data (reason: https://github.com/DefiLlama/DefiLlama-Adapters/discussions/432), if you have trouble with creating the adapter, please hop onto our discord, we are happy to assist you.
1313
4. **For updating listing info** It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
1414
5. Do not edit/push `package-lock.json` file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
1515
6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap
@@ -20,13 +20,17 @@ Please send answers to questions there https://github.com/DefiLlama/DefiLlama-Ad
2020

2121
## Work in progress
2222

23-
This is a work in progress. The goal is to eventually handle historical data. DefiLlama aims to be transparent, accurate and open source.
23+
This is a work in progress. DefiLlama aims to be transparent, accurate, and open source.
2424

2525
If you have any suggestions, want to contribute or want to chat, please join [our discord](https://discord.defillama.com/) and drop a message.
2626

2727
## Testing adapters
28-
```
28+
```bash
2929
node test.js projects/pangolin/index.js
30+
# Add a timestamp at the end to run the adapter at a historical timestamp
31+
node test.js projects/aave/v3.js 1729080692
32+
# or using YYYY-MM-DD
33+
node test.js projects/aave/v3.js 2024-10-16
3034
```
3135

3236
## Changing RPC providers
@@ -37,7 +41,7 @@ BSC_RPC="..."
3741
POLYGON_RPC="..."
3842
```
3943

40-
The name of each rpc is `{CHAIN-NAME}_RPC`, and the name we use for each chain can be found [here](https://github.com/DefiLlama/defillama-sdk/blob/master/src/providers.json)
44+
The name of each rpc is `{CHAIN-NAME}_RPC`, and the name we use for each chain can be found [here](https://unpkg.com/@defillama/sdk@latest/build/providers.json). If you run into issues with a chain make sure to update the sdk with `npm update @defillama/sdk`.
4145

4246
## Adapter rules
43-
- Never add extra npm packages, if you need a chain-level package for your chain, ask us and we'll consider it, but we can't accept any npm package that is project-specific
47+
- Never add extra npm packages, if you need a chain-level package for your chain, ask us, and we'll consider it, but we can't accept any npm package that is project-specific

add_enquiry.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

env.sample

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# do not edit this file
2+
13
ETHEREUM_RPC=https://eth-mainnet.gateway.pokt.network/v1/5f3453978e354ab992c4da79
24
CNDL_RPC=https://rpc.cndlchain.com
35
BSC_RPC=https://bsc-dataseed4.binance.org
@@ -21,3 +23,6 @@ KLAYTN_RPC=https://public-node-api.klaytnapi.com/v1/cypress
2123
FINDORA_RPC=https://prod-mainnet.prod.findora.org:8545
2224
SOLANA_RPC=https://solana-api.projectserum.com
2325
NOVA_RPC=http://dataseed-0.rpc.novanetwork.io:8545/
26+
BERACHAIN_RPC=https://rpc.berachain.com
27+
28+
# do not edit this file

funding.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"opRetro": {
3+
"projectId": "0xae07bfec2c3c90937679f8c8c5c32e80407c09903aa03d1b5e5a075e67592b86"
4+
}
5+
}

0 commit comments

Comments
 (0)