|
1 | 1 | import {strategies, StrategyShortId, StrategyState} from "./strategies";
|
2 |
| -import {NetworkId, networks} from "./networks"; |
3 |
| -import {deployments} from "./deployments"; |
| 2 | +import {getSupportedNetworkIds, NetworkId} from "./networks"; |
4 | 3 |
|
5 | 4 | export type DeFiOrganization = {
|
6 | 5 | name: string
|
@@ -170,7 +169,7 @@ export const integrations: { [org: string]: DeFiOrganization } = {
|
170 | 169 | NetworkId.BLAST,
|
171 | 170 | ],
|
172 | 171 | adapters: ['UniswapV3Adapter'],
|
173 |
| - strategies: [StrategyShortId.CUMF,StrategyShortId.GUMF,] |
| 172 | + strategies: [StrategyShortId.CUMF, StrategyShortId.GUMF,] |
174 | 173 | },
|
175 | 174 | },
|
176 | 175 | defiLlama: 'uniswap',
|
@@ -281,6 +280,20 @@ export const integrations: { [org: string]: DeFiOrganization } = {
|
281 | 280 | },
|
282 | 281 | defiLlama: 'baseswap',
|
283 | 282 | },
|
| 283 | + agni: { |
| 284 | + name: 'Agni', |
| 285 | + website: 'https://agni.finance/', |
| 286 | + protocols: { |
| 287 | + agni: { |
| 288 | + name: 'Agni', |
| 289 | + category: DefiCategory.AMM, |
| 290 | + networks: [NetworkId.MANTLE,], |
| 291 | + adapters: ['UniswapV3Adapter',], |
| 292 | + }, |
| 293 | + }, |
| 294 | + defiLlama: 'agni-finance', |
| 295 | + github: 'agni-protocol', |
| 296 | + }, |
284 | 297 | // ALM
|
285 | 298 | gamma: {
|
286 | 299 | name: 'Gamma',
|
@@ -443,6 +456,32 @@ export const integrations: { [org: string]: DeFiOrganization } = {
|
443 | 456 | defiLlama: 'a51-finance',
|
444 | 457 | github: 'a51finance',
|
445 | 458 | },
|
| 459 | + skatefi: { |
| 460 | + name: 'SkateFi', |
| 461 | + website: 'https://www.rangeprotocol.com', |
| 462 | + protocols: { |
| 463 | + range: { |
| 464 | + name: 'Range', |
| 465 | + category: DefiCategory.ALM, |
| 466 | + networks: [ |
| 467 | + NetworkId.ETHEREUM, |
| 468 | + NetworkId.BSC, |
| 469 | + NetworkId.ARBITRUM, |
| 470 | + NetworkId.POLYGON, |
| 471 | + NetworkId.MANTLE, |
| 472 | + NetworkId.BASE, |
| 473 | + NetworkId.MANTA, |
| 474 | + NetworkId.SCROLL, |
| 475 | + NetworkId.BLAST, |
| 476 | + NetworkId.ZETA, |
| 477 | + NetworkId.ZKFAIR, |
| 478 | + NetworkId.MERLIN, |
| 479 | + ], |
| 480 | + }, |
| 481 | + }, |
| 482 | + defiLlama: 'skate-fi', |
| 483 | + github: 'Range-Protocol', |
| 484 | + }, |
446 | 485 | // Lending
|
447 | 486 | compound: {
|
448 | 487 | name: 'Compound',
|
@@ -609,11 +648,13 @@ export const integrations: { [org: string]: DeFiOrganization } = {
|
609 | 648 | };
|
610 | 649 |
|
611 | 650 | export const getIntegrationStatus = (p: DeFiProtocol): IntegrationStatus => {
|
| 651 | + const supportedNetWorkIds = getSupportedNetworkIds() |
| 652 | + const isSupportedNetwork = p.networks.some(r => supportedNetWorkIds.includes(r)) |
612 | 653 | if (p.coreContracts && p.coreContracts.length > 0) {
|
613 |
| - return IntegrationStatus.LIVE |
| 654 | + return isSupportedNetwork ? IntegrationStatus.LIVE : IntegrationStatus.PROPOSED |
614 | 655 | }
|
615 | 656 | if (p.adapters && p.adapters.length > 0) {
|
616 |
| - return IntegrationStatus.LIVE |
| 657 | + return isSupportedNetwork ? IntegrationStatus.LIVE : IntegrationStatus.PROPOSED |
617 | 658 | }
|
618 | 659 | if (p.strategies) {
|
619 | 660 | for (const strategy of p.strategies) {
|
@@ -647,11 +688,6 @@ export const getIntegrationStatus = (p: DeFiProtocol): IntegrationStatus => {
|
647 | 688 | }
|
648 | 689 | }
|
649 | 690 | }
|
650 |
| - const supportedNetWorkIds = Object.keys(deployments).map(chainIdString => networks[chainIdString].id) |
651 |
| - for (const protocolNetworkId of p.networks) { |
652 |
| - if (supportedNetWorkIds.includes(protocolNetworkId as NetworkId)) { |
653 |
| - return IntegrationStatus.POSSIBLE |
654 |
| - } |
655 |
| - } |
656 |
| - return IntegrationStatus.PROPOSED |
| 691 | + |
| 692 | + return isSupportedNetwork ? IntegrationStatus.POSSIBLE : IntegrationStatus.PROPOSED |
657 | 693 | }
|
0 commit comments