-
Notifications
You must be signed in to change notification settings - Fork 1.1k
V2 Chain Assets #10820
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
base: master
Are you sure you want to change the base?
V2 Chain Assets #10820
Changes from 4 commits
6796de9
c8ad3f7
5a3a6f4
046984c
a0233f8
d6c6577
080fc62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import fetch from "node-fetch"; | ||
| import { cachedFetch } from "@defillama/sdk/build/util/cache"; | ||
|
|
||
| export async function fetchAdaTokens(): Promise<any[]> { | ||
| const res = await fetch(`https://api.muesliswap.com/token-list`).then((r) => r.json()); | ||
| const res = await cachedFetch({key: "muesliswap-token-list", endpoint: "https://api.muesliswap.com/token-list"}) | ||
|
||
| const coins = res | ||
| .filter((c: any) => c.supply.circulating != null) | ||
| .map((c: any) => ({ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { getPrices } from "./utils"; | ||
| import { getPrices } from "@defillama/sdk/build/util/coinsApi"; | ||
|
||
| import { excludedTvlId } from "./constants"; | ||
| import { multiCall } from "@defillama/sdk/build/abi/abi2"; | ||
| import { getBlock } from "@defillama/sdk/build/util/blocks"; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,12 +5,12 @@ import { ChainData, DollarValues, FinalData } from "./types"; | |
| import BigNumber from "bignumber.js"; | ||
| import { allChainKeys, ownTokens, tokenFlowCategories, zero } from "./constants"; | ||
| import { Chain } from "@defillama/sdk/build/general"; | ||
| import { getMcaps } from "./utils"; | ||
| import { getCurrentUnixTimestamp } from "../src/utils/date"; | ||
| import { getChainDisplayName } from "../src/utils/normalizeChain"; | ||
| import { verifyChanges } from "./test"; | ||
| import { verifyChanges } from "./verifyChanges"; | ||
| import { getExcludedTvl } from "./excluded"; | ||
| import { saveRawBridgedTvls } from "./raw"; | ||
| import { getMcaps } from "@defillama/sdk/build/util/coinsApi"; | ||
|
||
|
|
||
| export default async function main(override?: boolean, timestamp?: number) { | ||
| let symbolMap: { [pk: string]: string | null } = {}; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, no. Lets not use this path
@defillama/sdk/build/...in the future, once the sdk is published, you can get it viasdk.cache.cachedFetchThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the runInPromisePool in the next file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks - I'll change these when the SDK is out