@defillama/sdk 2.3.113 → 2.3.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/abi/multicall.js
CHANGED
|
@@ -321,6 +321,8 @@ function multicallAddress(chainId) {
|
|
|
321
321
|
return "0xe6d0cEE385992029Cb64C94A2dF6d0331937B2C8";
|
|
322
322
|
case 55: // zyx
|
|
323
323
|
return "0xd0dd5446f58D6f4F4A669f289E4268c1b12AEc31";
|
|
324
|
+
case 420420: // kekchain
|
|
325
|
+
return "0x781bB181833986C78238228F9AF0891829AF922B";
|
|
324
326
|
default:
|
|
325
327
|
return null;
|
|
326
328
|
}
|
|
@@ -318,13 +318,13 @@ function default_1(rawBalances, timestamp, verbose, knownTokenPrices, getCoingec
|
|
|
318
318
|
amount = Number(balance) / Math.pow(10, Number(tokenDecimals));
|
|
319
319
|
}
|
|
320
320
|
price = (_d = chainTokenPrices[normalizedAddress_1]) === null || _d === void 0 ? void 0 : _d.usd;
|
|
321
|
-
addTokenBalance(rawTokenBalances,
|
|
321
|
+
//addTokenBalance(rawTokenBalances, normalizedAddress, amount)
|
|
322
322
|
}
|
|
323
323
|
else {
|
|
324
324
|
tokenSymbol = address;
|
|
325
325
|
price = (_e = allChainTokenPrices["coingecko"][address.toLowerCase()]) === null || _e === void 0 ? void 0 : _e.usd;
|
|
326
326
|
amount = Number(balance);
|
|
327
|
-
addTokenBalance(rawTokenBalances,
|
|
327
|
+
//addTokenBalance(rawTokenBalances, `coingecko:${address.toLowerCase()}`, amount)
|
|
328
328
|
}
|
|
329
329
|
if (price === undefined) {
|
|
330
330
|
if (verbose) {
|
|
@@ -366,7 +366,7 @@ function default_1(rawBalances, timestamp, verbose, knownTokenPrices, getCoingec
|
|
|
366
366
|
usdTvl: usdTvl,
|
|
367
367
|
usdTokenBalances: usdTokenBalances,
|
|
368
368
|
tokenBalances: tokenBalances,
|
|
369
|
-
rawTokenBalances
|
|
369
|
+
//rawTokenBalances
|
|
370
370
|
}];
|
|
371
371
|
}
|
|
372
372
|
});
|
package/build/general.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ethers, BigNumber } from "ethers";
|
|
|
2
2
|
export declare const providers: {
|
|
3
3
|
[chain: string]: ethers.providers.BaseProvider;
|
|
4
4
|
};
|
|
5
|
-
export declare type Chain = "ethereum" | "bsc" | "polygon" | "heco" | "fantom" | "rsk" | "tomochain" | "xdai" | "avax" | "wan" | "iotex" | "harmony" | "thundercore" | "okexchain" | "optimism" | "arbitrum" | "kcc" | "celo" | "moonriver" | "shiden" | "palm" | "energyweb" | "energi" | "songbird" | "hpb" | "gochain" | "ethereumclassic" | "xdaiarb" | "kardia" | "fuse" | "smartbch" | "elastos" | "hoo" | "fusion" | "aurora" | "ronin" | "boba" | "cronos" | "polis" | "zyx" | "telos" | "metis" | "ubiq" | "velas" | "callisto" | "csc" | "nahmii" | "liquidchain" | "meter" | "theta" | "oasis" | "syscoin" | "moonbeam" | "curio" | "astar" | "godwoken" | "evmos" | "conflux" | "milkomeda" | "dfk" | "bittorrent" | "findora" | "candle" | "lachain" | "reichain" | "rei" | "clv" | "echelon" | "multivac" | "sx" | "karura_evm" | "nova" | "ontology_evm" | "jfin" | "bitkub" | "bitgert" | "canto" | "dogechain" | "posi" | "arbitrum_nova" | "ultron" | "tombchain" | "vision" | "ethpow" | "functionx" | "cube" | "xdc" | "step";
|
|
5
|
+
export declare type Chain = "ethereum" | "bsc" | "polygon" | "heco" | "fantom" | "rsk" | "tomochain" | "xdai" | "avax" | "wan" | "iotex" | "harmony" | "thundercore" | "okexchain" | "optimism" | "arbitrum" | "kcc" | "celo" | "moonriver" | "shiden" | "palm" | "energyweb" | "energi" | "songbird" | "hpb" | "gochain" | "ethereumclassic" | "xdaiarb" | "kardia" | "fuse" | "smartbch" | "elastos" | "hoo" | "fusion" | "aurora" | "ronin" | "boba" | "cronos" | "polis" | "zyx" | "telos" | "metis" | "ubiq" | "velas" | "callisto" | "csc" | "nahmii" | "liquidchain" | "meter" | "theta" | "oasis" | "syscoin" | "moonbeam" | "curio" | "astar" | "godwoken" | "evmos" | "conflux" | "milkomeda" | "dfk" | "bittorrent" | "findora" | "candle" | "lachain" | "reichain" | "rei" | "clv" | "echelon" | "multivac" | "sx" | "karura_evm" | "nova" | "ontology_evm" | "jfin" | "bitkub" | "bitgert" | "canto" | "dogechain" | "posi" | "arbitrum_nova" | "ultron" | "tombchain" | "vision" | "ethpow" | "functionx" | "cube" | "xdc" | "step" | "kekchain";
|
|
6
6
|
export declare function getProvider(chain?: Chain): ethers.providers.BaseProvider;
|
|
7
7
|
export declare const TEN: ethers.BigNumber;
|
|
8
8
|
export declare function handleDecimals(num: BigNumber, decimals?: number): string;
|
package/build/general.js
CHANGED
|
@@ -116,6 +116,7 @@ exports.providers = {
|
|
|
116
116
|
functionx: createProvider("functionx", "https://fx-json-web3.functionx.io:8545", 530),
|
|
117
117
|
xdc: createProvider("xdc", "https://rpc.xinfin.network,https://rpc1.xinfin.network,https://erpc.xinfin.network", 50),
|
|
118
118
|
cube: createProvider("cube", "https://http-mainnet.cube.network/", 1818),
|
|
119
|
+
kekchain: createProvider("kekchain", "https://mainnet.kekchain.com", 420420),
|
|
119
120
|
step: createProvider("step", "https://rpc.step.network/", 1234)
|
|
120
121
|
};
|
|
121
122
|
function getProvider(chain) {
|
package/build/util/index.js
CHANGED
|
@@ -277,8 +277,8 @@ function normalizeAddress(address) {
|
|
|
277
277
|
}
|
|
278
278
|
exports.normalizeAddress = normalizeAddress;
|
|
279
279
|
function normalizePrefixes(address) {
|
|
280
|
-
var
|
|
281
|
-
if (
|
|
280
|
+
var prefix = address.substring(0, address.indexOf(":"));
|
|
281
|
+
if (["solana", "tezos"].includes(prefix))
|
|
282
282
|
return address;
|
|
283
283
|
return address.startsWith("0x")
|
|
284
284
|
? "ethereum:" + address.toLowerCase()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defillama/sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.116",
|
|
4
4
|
"description": "SDK for calculating TVL",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"author": "",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"types": "build/index.d.ts",
|
|
21
|
-
"files": [
|
|
21
|
+
"files": [
|
|
22
|
+
"build"
|
|
23
|
+
],
|
|
22
24
|
"dependencies": {
|
|
23
25
|
"@supercharge/promise-pool": "^2.1.0",
|
|
24
26
|
"bignumber.js": "^9.1.0",
|