Skip to content

Commit 8b53c98

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main' into stability
# Conflicts: # projects/stability/index.js
2 parents ce73da8 + b666eca commit 8b53c98

File tree

4,124 files changed

+70940
-41742
lines changed

Some content is hidden

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

4,124 files changed

+70940
-41742
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,6 @@ jobs:
5656
done
5757
5858
- name: Run ESLint
59-
uses: eslint/github-action@v0
59+
run: |
60+
npm ci
61+
npm run lint

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore all files
2+
*

README.md

Lines changed: 4 additions & 2 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 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 a 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
@@ -25,8 +25,10 @@ This is a work in progress. The goal is to eventually handle historical data. De
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
3032
```
3133

3234
## Changing RPC providers

bun.lockb

145 KB
Binary file not shown.

liquidations/aave-v2/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as sdk from "@defillama/sdk";
12
import { gql, request } from "graphql-request";
23
import { Liq } from "../utils/types";
34
import { getPagedGql } from "../utils/gql";
@@ -75,14 +76,14 @@ const rc: { [chain in Chains]: AaveAdapterResource } = {
7576
name: "aave",
7677
chain: Chains.ethereum,
7778
usdcAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
78-
subgraphUrl: "https://api.thegraph.com/subgraphs/name/aave/protocol-v2",
79+
subgraphUrl: sdk.graph.modifyEndpoint('8wR23o1zkS4gpLqLNU4kG3JHYVucqGyopL5utGxP2q1N'),
7980
explorerBaseUrl: "https://etherscan.io/address/",
8081
},
8182
// [Chains.polygon]: {
8283
// name: "aave",
8384
// chain: Chains.polygon,
8485
// usdcAddress: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
85-
// subgraphUrl: "https://api.thegraph.com/subgraphs/name/aave/aave-v2-matic",
86+
// subgraphUrl: sdk.graph.modifyEndpoint('H1Et77RZh3XEf27vkAmJyzgCME2RSFLtDS2f4PPW6CGp'),
8687
// explorerBaseUrl: "https://polygonscan.com/address/",
8788
// },
8889
};

liquidations/benqi/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as sdk from "@defillama/sdk";
12
import { gql } from "graphql-request";
23
import { getPagedGql } from "../utils/gql";
34
import BigNumber from "bignumber.js";
@@ -12,7 +13,7 @@ import {
1213
totalCollateralValueInUsd,
1314
} from "../utils/compound-helpers";
1415

15-
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/yhayun/benqi";
16+
const subgraphUrl = sdk.graph.modifyEndpoint('HcTvZi3fwucvRJvVmtFzNDTnomvMBk64xCLNQQg6GPAV');
1617

1718
const accountsQuery = gql`
1819
query accounts($lastId: ID, $pageSize: Int) {

liquidations/compound/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as sdk from "@defillama/sdk";
12
import { gql } from "graphql-request";
23
import { getPagedGql } from "../utils/gql";
34
import BigNumber from "bignumber.js";
@@ -12,7 +13,7 @@ import {
1213
totalCollateralValueInUsd,
1314
} from "../utils/compound-helpers";
1415

15-
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/graphprotocol/compound-v2";
16+
const subgraphUrl = sdk.graph.modifyEndpoint('AAva7YSZBLar4MaxQ3MqdJDFXkkHEaCDeibKTnraex1x');
1617

1718
const accountsQuery = gql`
1819
query accounts($lastId: ID, $pageSize: Int) {

liquidations/euler/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import * as sdk from "@defillama/sdk";
12
import { gql } from "graphql-request";
23
import { getPagedGql } from "../utils/gql";
34
import BigNumber from "bignumber.js";
45
import { Liq } from "../utils/types";
56

6-
const subgraphUrl = "https://api.thegraph.com/subgraphs/name/euler-xyz/euler-mainnet";
7+
const subgraphUrl = sdk.graph.modifyEndpoint('EQBXhrF4ppZy9cBYnhPdrMCRaVas6seNpqviih5VRGmU');
78

89
const accountsQuery = gql`
910
query accounts($lastId: ID, $pageSize: Int) {

0 commit comments

Comments
 (0)