@defillama/sdk 5.0.80 → 5.0.83
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/util/blocks.js
CHANGED
|
@@ -118,8 +118,8 @@ async function fetchBlockFromProvider(height, chain) {
|
|
|
118
118
|
}
|
|
119
119
|
return block;
|
|
120
120
|
}
|
|
121
|
-
function getExtraProvider(chain) {
|
|
122
|
-
if (
|
|
121
|
+
function getExtraProvider(chain = "ethereum") {
|
|
122
|
+
if ((0, cosmos_1.isCosmosChain)(chain)) // maybe check if it is also an evm chain?
|
|
123
123
|
return (0, cosmos_1.getCosmosProvider)(chain);
|
|
124
124
|
if (chain === "algorand")
|
|
125
125
|
return algorandBlockProvider;
|
package/build/util/cosmos.js
CHANGED
|
@@ -36,13 +36,13 @@ const endPoints = {
|
|
|
36
36
|
quasar: "https://quasar-api.polkachu.com",
|
|
37
37
|
gravitybridge: "https://gravitychain.io:1317",
|
|
38
38
|
// sei: "https://sei-api.polkachu.com",
|
|
39
|
-
aura: "https://lcd.aura.network",
|
|
39
|
+
// aura: "https://lcd.aura.network", // is evm now
|
|
40
40
|
archway: "https://api.mainnet.archway.io",
|
|
41
41
|
sifchain: "https://sifchain-api.polkachu.com",
|
|
42
42
|
nolus: "https://pirin-cl.nolus.network:1317",
|
|
43
43
|
bostrom: "https://lcd.bostrom.cybernode.ai"
|
|
44
44
|
};
|
|
45
|
-
const ibcChains = ['terra', 'terra2', 'crescent', 'osmosis', 'kujira', 'stargaze', 'juno', 'injective', 'cosmos', 'comdex', 'umee', 'orai', 'persistence', 'fxcore', 'neutron', 'quasar', 'chihuahua', 'archway', 'migaloo', 'secret', '
|
|
45
|
+
const ibcChains = ['terra', 'terra2', 'crescent', 'osmosis', 'kujira', 'stargaze', 'juno', 'injective', 'cosmos', 'comdex', 'umee', 'orai', 'persistence', 'fxcore', 'neutron', 'quasar', 'chihuahua', 'archway', 'migaloo', 'secret', 'xpla', 'bostrom'];
|
|
46
46
|
const isCosmosChain = (chain) => ibcChains.includes(chain) || !!endPoints[chain];
|
|
47
47
|
exports.isCosmosChain = isCosmosChain;
|
|
48
48
|
async function getCosmosBlock(block = 'latest', chain = 'cosmos') {
|
|
@@ -50,6 +50,11 @@ async function main() {
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
i.rpc = Array.from(new Set(filterRPCs(i.rpc)));
|
|
53
|
+
if (key.endsWith('-mainnet')) {
|
|
54
|
+
const shortName = key.slice(0, -8);
|
|
55
|
+
if (!providerList[shortName])
|
|
56
|
+
providerList[shortName] = i;
|
|
57
|
+
}
|
|
53
58
|
});
|
|
54
59
|
Object.keys(providerList).forEach((i) => {
|
|
55
60
|
if (!providerList[i].rpc.length)
|