@merkl/api 0.21.47 → 1.0.3
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/dist/src/cache/index.d.ts +1 -1
- package/dist/src/constants.d.ts +8 -8
- package/dist/src/eden/index.d.ts +16782 -8009
- package/dist/src/eden/index.js +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Ajna.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Badger.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Clamm.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Compound.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Dolomite.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.d.ts +2 -2
- package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.d.ts +2 -2
- package/dist/src/engine/deprecated/dynamicData/implementations/EigenLayer.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Encompassing.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.d.ts +105 -3
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20Snapshot.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.d.ts +2 -2
- package/dist/src/engine/deprecated/dynamicData/implementations/Morpho.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Radiant.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Silo.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/UniswapV4.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/Vest.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/implementations/default.d.ts +2 -2
- package/dist/src/engine/deprecated/dynamicData/utils/fetchA51Strategies.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/utils/fetchClamInfo.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/utils/getDolomiteMarkets.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/utils/getEulerV2Vaults.d.ts +1 -1
- package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.d.ts +1 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/GenericProcessor.d.ts +6 -6
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +1 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/hardcoded.d.ts +2 -2
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +1 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/treasuryFinder.d.ts +1 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AssetProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +4 -4
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +4 -4
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +4 -4
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +4 -4
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BeefyProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BunniV2Processor.d.ts +4 -4
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ERC4626Processor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EnzymeProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerLendProcessor.d.ts +2 -2
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FraxProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaALMProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleYTProcessor.d.ts +4 -4
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/Satlayer.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraYTProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/StabilityProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TempestVaultProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/UniswapProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/VicunaProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.d.ts +1 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesPrices.d.ts +3 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.d.ts +1 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound2.d.ts +2 -2
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound3.d.ts +2 -2
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound4.d.ts +2 -2
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeStruct.d.ts +2 -2
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.d.ts +3 -3
- package/dist/src/engine/implementations/Ajna/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Ajna/tvl.d.ts +2 -2
- package/dist/src/engine/implementations/Ambient/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Ambient/tvl.d.ts +2 -2
- package/dist/src/engine/implementations/Badger/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/Clamm/metadata.d.ts +22 -22
- package/dist/src/engine/implementations/Compound/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/CompoundV3/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/Default/metadata.d.ts +3 -3
- package/dist/src/engine/implementations/Dolomite/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/EigenLayer/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/EigenLayer/tvl.d.ts +2 -2
- package/dist/src/engine/implementations/Encompassing/metadata.d.ts +3 -3
- package/dist/src/engine/implementations/Erc20/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/detect.d.ts +2 -2
- package/dist/src/engine/implementations/Erc20/subTypes/factories.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.d.ts +6 -6
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.d.ts +6 -6
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.d.ts +2 -2
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.d.ts +6 -6
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +3 -2
- package/dist/src/engine/implementations/Erc20/tvl.d.ts +4 -4
- package/dist/src/engine/implementations/Erc20Snapshot/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/Erc721/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/ErcMultiToken/metadata.d.ts +6 -6
- package/dist/src/engine/implementations/EventBased/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/FraxLend/metadataBorrow.d.ts +24 -0
- package/dist/src/engine/implementations/FraxLend/metadataCollateral.d.ts +18 -0
- package/dist/src/engine/implementations/FraxLend/tvlBorrow.d.ts +7 -0
- package/dist/src/engine/implementations/FraxLend/tvlCollateral.d.ts +7 -0
- package/dist/src/engine/implementations/Hyperdrive/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Invalid/metadata.d.ts +2 -2
- package/dist/src/engine/implementations/Ion/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +7 -7
- package/dist/src/engine/implementations/Locker/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/Locker/tvl.d.ts +2 -2
- package/dist/src/engine/implementations/Morpho/metadata.d.ts +7 -7
- package/dist/src/engine/implementations/MultiLog/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/MultiLog/tvl.d.ts +3 -3
- package/dist/src/engine/implementations/Radiant/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/Silo/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/UniswapV4/metadata.d.ts +5 -5
- package/dist/src/engine/implementations/UniswapV4/tvl.d.ts +2 -2
- package/dist/src/engine/implementations/Vest/metadata.d.ts +4 -4
- package/dist/src/engine/implementations/morphoBorrow/metadata.d.ts +20 -0
- package/dist/src/engine/implementations/morphoBorrow/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/morphoCollateral/metadata.d.ts +20 -0
- package/dist/src/engine/implementations/morphoCollateral/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/morphoSupply/metadata.d.ts +20 -0
- package/dist/src/engine/implementations/morphoSupply/tvl.d.ts +7 -0
- package/dist/src/engine/metadata/factory.d.ts +1 -1
- package/dist/src/engine/tvl/factory.d.ts +2 -2
- package/dist/src/engine/tvl/logStates.d.ts +1 -1
- package/dist/src/hooks/checkQueryAddressValidity.d.ts +6 -2
- package/dist/src/hooks/checkQueryChainIdValidity.d.ts +6 -2
- package/dist/src/index.d.ts +5533 -2610
- package/dist/src/jobs/{dynamic-data.d.ts → update-v3-caches.d.ts} +4 -1
- package/dist/src/libs/computeFee.d.ts +1 -1
- package/dist/src/libs/deprecated-merklv3/index.d.ts +3 -3
- package/dist/src/libs/merklChainData.d.ts +1 -1
- package/dist/src/libs/parse/marketsWithCache.d.ts +1 -1
- package/dist/src/libs/positions/EigenLayer/index.d.ts +2 -2
- package/dist/src/libs/positions/ajna/index.d.ts +2 -2
- package/dist/src/libs/positions/badger/index.d.ts +2 -2
- package/dist/src/libs/positions/clamm/index.d.ts +1 -1
- package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.d.ts +1 -1
- package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.d.ts +1 -1
- package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.d.ts +1 -1
- package/dist/src/libs/positions/compound/index.d.ts +2 -2
- package/dist/src/libs/positions/dolomite/index.d.ts +2 -2
- package/dist/src/libs/positions/erc20/index.d.ts +2 -2
- package/dist/src/libs/positions/euler/index.d.ts +2 -2
- package/dist/src/libs/positions/index.d.ts +1 -1
- package/dist/src/libs/positions/morpho/index.d.ts +2 -2
- package/dist/src/libs/positions/prepareFetch.d.ts +1 -1
- package/dist/src/libs/positions/silo/index.d.ts +2 -2
- package/dist/src/libs/positions/types.d.ts +1 -1
- package/dist/src/libs/staticCampaigns.d.ts +1 -1
- package/dist/src/libs/tokens/balances.d.ts +1 -1
- package/dist/src/libs/tokens/tokenInfo.d.ts +1 -1
- package/dist/src/modules/v4/accounting/accounting.controller.d.ts +98 -33
- package/dist/src/modules/v4/accounting/accounting.repository.d.ts +41 -41
- package/dist/src/modules/v4/accounting/accounting.service.d.ts +7 -7
- package/dist/src/modules/v4/apr/apr.model.d.ts +8 -8
- package/dist/src/modules/v4/apr/apr.service.d.ts +1 -1
- package/dist/src/modules/v4/authentication/authentication.controller.d.ts +24 -2
- package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +64 -37
- package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +4 -4
- package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +5 -5
- package/dist/src/modules/v4/boost/boost.controller.d.ts +25 -3
- package/dist/src/modules/v4/cache/cache.repository.d.ts +1 -1
- package/dist/src/modules/v4/cache/cache.service.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +665 -504
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +30 -9
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +192 -192
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +415 -319
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +352 -282
- package/dist/src/modules/v4/chain/chain.controller.d.ts +91 -47
- package/dist/src/modules/v4/chain/chain.model.d.ts +11 -3
- package/dist/src/modules/v4/chain/chain.repository.d.ts +10 -10
- package/dist/src/modules/v4/chain/chain.service.d.ts +10 -10
- package/dist/src/modules/v4/chainInteraction/chainInteraction.service.d.ts +1 -1
- package/dist/src/modules/v4/claims/claims.controller.d.ts +15 -2
- package/dist/src/modules/v4/claims/claims.repository.d.ts +1 -1
- package/dist/src/modules/v4/claims/claims.service.d.ts +3 -3
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +47 -7
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +2 -2
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +2 -2
- package/dist/src/modules/v4/creator/creator.controller.d.ts +160 -88
- package/dist/src/modules/v4/creator/creator.model.d.ts +1 -1
- package/dist/src/modules/v4/creator/creator.repository.d.ts +20 -20
- package/dist/src/modules/v4/creator/creator.service.d.ts +47 -47
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +1 -1
- package/dist/src/modules/v4/enso/enso.service.d.ts +17 -17
- package/dist/src/modules/v4/explorer/explorer.controller.d.ts +19 -6
- package/dist/src/modules/v4/explorer/explorer.model.d.ts +2 -2
- package/dist/src/modules/v4/explorer/explorer.repository.d.ts +5 -5
- package/dist/src/modules/v4/explorer/explorer.service.d.ts +7 -7
- package/dist/src/modules/v4/interaction/interaction.controller.d.ts +39 -8
- package/dist/src/modules/v4/interaction/interaction.model.d.ts +1 -1
- package/dist/src/modules/v4/interaction/interaction.service.d.ts +2 -2
- package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +1 -1
- package/dist/src/modules/v4/liquidity/implementations/AjnaPositionFetcher.d.ts +2 -2
- package/dist/src/modules/v4/liquidity/implementations/BadgerPositionFetcher.d.ts +2 -2
- package/dist/src/modules/v4/liquidity/implementations/ClammPositionFetcher.d.ts +2 -2
- package/dist/src/modules/v4/liquidity/implementations/DolomitePositionFetcher.d.ts +2 -2
- package/dist/src/modules/v4/liquidity/implementations/ERC20PositionFetcher.d.ts +3 -3
- package/dist/src/modules/v4/liquidity/implementations/EulerPositionFetcher.d.ts +2 -2
- package/dist/src/modules/v4/liquidity/liquidity.controller.d.ts +24 -13
- package/dist/src/modules/v4/liquidity/liquidity.model.d.ts +2 -2
- package/dist/src/modules/v4/liquidity/liquidity.repository.d.ts +1 -1
- package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +42 -22
- package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +7 -7
- package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +18 -8
- package/dist/src/modules/v4/nodes/node.controller.d.ts +65 -0
- package/dist/src/modules/v4/nodes/node.model.d.ts +21 -0
- package/dist/src/modules/v4/nodes/node.repository.d.ts +21 -0
- package/dist/src/modules/v4/nodes/node.service.d.ts +21 -0
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +741 -642
- package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +111 -5
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +113 -78
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +408 -408
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +489 -459
- package/dist/src/modules/v4/parse/parse.controller.d.ts +64 -0
- package/dist/src/modules/v4/parse/parse.model.d.ts +10 -0
- package/dist/src/modules/v4/payload/payload.controller.d.ts +125 -0
- package/dist/src/modules/v4/payload/payload.model.d.ts +307 -0
- package/dist/src/modules/v4/payload/payload.service.d.ts +27 -0
- package/dist/src/modules/v4/price/price.controller.d.ts +93 -50
- package/dist/src/modules/v4/price/price.model.d.ts +16 -16
- package/dist/src/modules/v4/price/price.repository.d.ts +11 -11
- package/dist/src/modules/v4/price/price.service.d.ts +9 -9
- package/dist/src/modules/v4/prisma/index.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +939 -146
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +12 -14
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +450 -362
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +40 -19
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +117 -67
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +2 -2
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +29 -29
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +9 -6
- package/dist/src/modules/v4/referral/referral.controller.d.ts +29 -7
- package/dist/src/modules/v4/referral/referral.service.d.ts +8 -8
- package/dist/src/modules/v4/reward/reward.controller.d.ts +261 -93
- package/dist/src/modules/v4/reward/reward.converter.d.ts +1 -1
- package/dist/src/modules/v4/reward/reward.model.d.ts +3 -3
- package/dist/src/modules/v4/reward/reward.repository.d.ts +55 -54
- package/dist/src/modules/v4/reward/reward.service.d.ts +260 -260
- package/dist/src/modules/v4/router.d.ts +4712 -2399
- package/dist/src/modules/v4/status/status.controller.d.ts +128 -64
- package/dist/src/modules/v4/status/status.model.d.ts +11 -10
- package/dist/src/modules/v4/status/status.repository.d.ts +35 -35
- package/dist/src/modules/v4/status/status.service.d.ts +23 -23
- package/dist/src/modules/v4/token/token.controller.d.ts +224 -130
- package/dist/src/modules/v4/token/token.model.d.ts +1 -1
- package/dist/src/modules/v4/token/token.repository.d.ts +41 -37
- package/dist/src/modules/v4/token/token.service.d.ts +106 -101
- package/dist/src/modules/v4/turtle/turtle.controller.d.ts +15 -2
- package/dist/src/modules/v4/tvl/tvl.model.d.ts +5 -5
- package/dist/src/modules/v4/tvl/tvl.service.d.ts +1 -1
- package/dist/src/modules/v4/uniswap/uniswap.controller.d.ts +248 -11
- package/dist/src/modules/v4/uniswap/uniswap.model.d.ts +3 -3
- package/dist/src/modules/v4/uniswap/uniswap.repository.d.ts +4 -4
- package/dist/src/modules/v4/uniswap/uniswap.service.d.ts +3 -3
- package/dist/src/modules/v4/user/user.controller.d.ts +175 -164
- package/dist/src/modules/v4/user/user.model.d.ts +10 -1
- package/dist/src/modules/v4/user/user.repository.d.ts +7 -7
- package/dist/src/modules/v4/user/user.service.d.ts +7 -7
- package/dist/src/plugins/error-handling.plugin.d.ts +7 -3
- package/dist/src/routes/v1/allowances.d.ts +18 -5
- package/dist/src/routes/v1/balances.d.ts +16 -3
- package/dist/src/routes/v1/prices.d.ts +15 -2
- package/dist/src/routes/v1/router.d.ts +44 -4
- package/dist/src/routes/v1/tokens.d.ts +15 -2
- package/dist/src/routes/v2/merkl.d.ts +41 -4
- package/dist/src/routes/v2/router.d.ts +41 -4
- package/dist/src/routes/v3/app.d.ts +15 -2
- package/dist/src/routes/v3/blacklist.d.ts +15 -2
- package/dist/src/routes/v3/campaign/delay.d.ts +27 -16
- package/dist/src/routes/v3/campaignClaims.d.ts +15 -2
- package/dist/src/routes/v3/campaignUnclaimed.d.ts +15 -2
- package/dist/src/routes/v3/campaigns.d.ts +17 -4
- package/dist/src/routes/v3/campaignsForMainParameter.d.ts +15 -2
- package/dist/src/routes/v3/campaignsRewardsReport.d.ts +15 -2
- package/dist/src/routes/v3/claims.d.ts +15 -2
- package/dist/src/routes/v3/compoundV2.d.ts +15 -2
- package/dist/src/routes/v3/createCampaign.d.ts +16 -3
- package/dist/src/routes/v3/dolomite.d.ts +15 -2
- package/dist/src/routes/v3/euler.d.ts +43 -14
- package/dist/src/routes/v3/fetch.d.ts +15 -2
- package/dist/src/routes/v3/health.d.ts +15 -2
- package/dist/src/routes/v3/lostyield.d.ts +15 -2
- package/dist/src/routes/v3/merkl.d.ts +34 -6
- package/dist/src/routes/v3/morphoMarkets.d.ts +15 -2
- package/dist/src/routes/v3/morphoVaults.d.ts +15 -2
- package/dist/src/routes/v3/multiChainPositions.d.ts +15 -2
- package/dist/src/routes/v3/opportunity.d.ts +72 -6
- package/dist/src/routes/v3/overview.d.ts +15 -2
- package/dist/src/routes/v3/parse.d.ts +15 -2
- package/dist/src/routes/v3/payload.d.ts +19 -6
- package/dist/src/routes/v3/poolInfo.d.ts +18 -5
- package/dist/src/routes/v3/positions.d.ts +15 -2
- package/dist/src/routes/v3/radiant.d.ts +15 -2
- package/dist/src/routes/v3/recipients.d.ts +15 -2
- package/dist/src/routes/v3/rewards.d.ts +18 -5
- package/dist/src/routes/v3/rewardsReport.d.ts +16 -3
- package/dist/src/routes/v3/router.d.ts +608 -55
- package/dist/src/routes/v3/silo.d.ts +15 -2
- package/dist/src/routes/v3/token.d.ts +16 -3
- package/dist/src/routes/v3/twt/participants.d.ts +24 -13
- package/dist/src/routes/v3/uniswapv4.d.ts +192 -19
- package/dist/src/routes/v3/updates.d.ts +15 -2
- package/dist/src/routes/v3/userRewards.d.ts +18 -5
- package/dist/src/utils/decodeCalls.d.ts +1 -1
- package/dist/src/utils/encodeCalls.d.ts +2 -2
- package/dist/src/utils/error.d.ts +8 -4
- package/dist/src/utils/generateCardName.d.ts +2 -2
- package/dist/src/utils/generic.d.ts +2 -2
- package/dist/src/utils/lastBlockBefore.d.ts +1 -1
- package/dist/src/utils/logger.d.ts +0 -8
- package/dist/src/utils/pricer.d.ts +5 -2
- package/dist/src/utils/prices/chainlinkRead.d.ts +1 -1
- package/dist/src/utils/prices/curveVirtualPrice.d.ts +1 -1
- package/dist/src/utils/prices/getDQUICK.d.ts +1 -1
- package/dist/src/utils/prices/priceFetcherFactory.d.ts +1 -1
- package/dist/src/utils/prices/services/OnChainCallService.d.ts +1 -1
- package/dist/src/utils/prices/services/coinGeckoService.d.ts +1 -1
- package/dist/src/utils/prices/services/defillamaService.d.ts +1 -1
- package/dist/src/utils/prices/services/dexScreenerService.d.ts +1 -1
- package/dist/src/utils/prices/services/erc4626Service.d.ts +1 -1
- package/dist/src/utils/prices/services/getERC4626.d.ts +1 -1
- package/dist/src/utils/prices/services/indexCoopService.d.ts +1 -1
- package/dist/src/utils/prices/services/priceFetcher.d.ts +1 -1
- package/dist/src/utils/prices/uniV2Price.d.ts +1 -1
- package/dist/src/utils/providers.d.ts +113 -2
- package/dist/src/utils/queries/allCampaigns.d.ts +1 -2
- package/dist/src/utils/sanitizeChain.d.ts +2 -2
- package/dist/src/utils/stryke.d.ts +1 -1
- package/dist/src/utils/throw.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +32 -49
- package/dist/database/api/.generated/default.d.ts +0 -1
- package/dist/database/api/.generated/default.js +0 -1
- package/dist/database/api/.generated/drizzle/schema.d.ts +0 -3342
- package/dist/database/api/.generated/drizzle/schema.js +0 -928
- package/dist/database/api/.generated/drizzle/schema.ts +0 -989
- package/dist/database/api/.generated/edge.d.ts +0 -1
- package/dist/database/api/.generated/edge.js +0 -725
- package/dist/database/api/.generated/index-browser.js +0 -696
- package/dist/database/api/.generated/index.d.ts +0 -48645
- package/dist/database/api/.generated/index.js +0 -758
- package/dist/database/api/.generated/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
- package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/api/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/api/.generated/package.json +0 -97
- package/dist/database/api/.generated/runtime/edge-esm.js +0 -31
- package/dist/database/api/.generated/runtime/edge.js +0 -31
- package/dist/database/api/.generated/runtime/index-browser.d.ts +0 -365
- package/dist/database/api/.generated/runtime/index-browser.js +0 -13
- package/dist/database/api/.generated/runtime/library.d.ts +0 -3447
- package/dist/database/api/.generated/runtime/library.js +0 -143
- package/dist/database/api/.generated/runtime/react-native.js +0 -80
- package/dist/database/api/.generated/runtime/wasm.js +0 -32
- package/dist/database/api/.generated/schema.prisma +0 -482
- package/dist/database/api/.generated/wasm.d.ts +0 -1
- package/dist/database/api/.generated/wasm.js +0 -696
- package/dist/database/engine/.generated/default.d.ts +0 -1
- package/dist/database/engine/.generated/default.js +0 -1
- package/dist/database/engine/.generated/edge.d.ts +0 -1
- package/dist/database/engine/.generated/edge.js +0 -485
- package/dist/database/engine/.generated/index-browser.js +0 -456
- package/dist/database/engine/.generated/index.d.ts +0 -22107
- package/dist/database/engine/.generated/index.js +0 -518
- package/dist/database/engine/.generated/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
- package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/engine/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/engine/.generated/package.json +0 -97
- package/dist/database/engine/.generated/runtime/edge-esm.js +0 -31
- package/dist/database/engine/.generated/runtime/edge.js +0 -31
- package/dist/database/engine/.generated/runtime/index-browser.d.ts +0 -365
- package/dist/database/engine/.generated/runtime/index-browser.js +0 -13
- package/dist/database/engine/.generated/runtime/library.d.ts +0 -3447
- package/dist/database/engine/.generated/runtime/library.js +0 -143
- package/dist/database/engine/.generated/runtime/react-native.js +0 -80
- package/dist/database/engine/.generated/runtime/wasm.js +0 -32
- package/dist/database/engine/.generated/schema.prisma +0 -248
- package/dist/database/engine/.generated/wasm.d.ts +0 -1
- package/dist/database/engine/.generated/wasm.js +0 -456
- package/dist/database/index.d.ts +0 -29
- package/dist/database/index.js +0 -17
- package/dist/src/cache/declaration.js +0 -121
- package/dist/src/cache/index.js +0 -161
- package/dist/src/cache/redis.js +0 -57
- package/dist/src/constants.js +0 -93
- package/dist/src/engine/deprecated/dynamicData/implementations/Ajna.js +0 -107
- package/dist/src/engine/deprecated/dynamicData/implementations/Badger.js +0 -90
- package/dist/src/engine/deprecated/dynamicData/implementations/Clamm.js +0 -975
- package/dist/src/engine/deprecated/dynamicData/implementations/Compound.js +0 -139
- package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.js +0 -101
- package/dist/src/engine/deprecated/dynamicData/implementations/Dolomite.js +0 -59
- package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.js +0 -87
- package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.js +0 -161
- package/dist/src/engine/deprecated/dynamicData/implementations/EigenLayer.js +0 -67
- package/dist/src/engine/deprecated/dynamicData/implementations/Encompassing.js +0 -26
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.js +0 -162
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20Snapshot.js +0 -32
- package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.js +0 -129
- package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.js +0 -112
- package/dist/src/engine/deprecated/dynamicData/implementations/Morpho.js +0 -132
- package/dist/src/engine/deprecated/dynamicData/implementations/Radiant.js +0 -123
- package/dist/src/engine/deprecated/dynamicData/implementations/Silo.js +0 -112
- package/dist/src/engine/deprecated/dynamicData/implementations/UniswapV4.js +0 -255
- package/dist/src/engine/deprecated/dynamicData/implementations/Vest.js +0 -61
- package/dist/src/engine/deprecated/dynamicData/implementations/default.js +0 -5
- package/dist/src/engine/deprecated/dynamicData/utils/fetchA51Strategies.js +0 -44
- package/dist/src/engine/deprecated/dynamicData/utils/fetchClamInfo.js +0 -27
- package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.js +0 -149
- package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.js +0 -141
- package/dist/src/engine/deprecated/dynamicData/utils/getContractCreationBlock.js +0 -44
- package/dist/src/engine/deprecated/dynamicData/utils/getDolomiteMarkets.js +0 -53
- package/dist/src/engine/deprecated/dynamicData/utils/getEulerV2Vaults.js +0 -266
- package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.js +0 -27
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/GenericProcessor.js +0 -335
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/eulerVaultNames.js +0 -13
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.js +0 -47
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getBlacklistedSupply.js +0 -22
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getCrossCurveTokenPrice.js +0 -13
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/hardcoded.js +0 -30
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/metamorphoTvl.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/metamorphoTvl.js +0 -35
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.js +0 -16
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/spliceTVL.js +0 -23
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/treasuryFinder.js +0 -10
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AaveProcessor.js +0 -26
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AnglesLiquid.js +0 -51
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AssetProcessor.js +0 -48
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AuraProcessor.js +0 -113
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.js +0 -111
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.js +0 -86
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.js +0 -101
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.js +0 -81
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BeefyProcessor.js +0 -54
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BunniV2Processor.js +0 -91
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/CompoundProcessor.js +0 -37
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ERC4626Processor.js +0 -37
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EnzymeProcessor.js +0 -52
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.js +0 -54
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.js +0 -51
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerLendProcessor.js +0 -58
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FluidProcessor.js +0 -37
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FraxProcessor.js +0 -42
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaALMProcessor.js +0 -52
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaProcessor.js +0 -67
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GearboxProcessor.js +0 -58
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.js +0 -63
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HoldStationProcessor.js +0 -35
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HourglassProcessor.js +0 -35
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MaverickBPProcessor.js +0 -78
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MetamorphoProcessor.js +0 -48
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.js +0 -82
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleProcessor.js +0 -30
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleYTProcessor.js +0 -30
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RadiantProcessor.js +0 -59
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RfxProcessor.js +0 -71
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/Satlayer.js +0 -28
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraProcessor.js +0 -42
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraYTProcessor.js +0 -40
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpliceProcessor.js +0 -37
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/StabilityProcessor.js +0 -30
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SturdySiloProcessor.js +0 -38
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TempestVaultProcessor.js +0 -83
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TemplateProcessor.js +0 -40
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TorosProcessor.js +0 -34
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/UniswapProcessor.js +0 -72
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/VicunaProcessor.js +0 -36
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/WoofiProcessor.js +0 -41
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.js +0 -60
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveNPoolProcessor.js +0 -102
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveProcessor.js +0 -85
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.js +0 -159
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/stakedCurveProcessor.js +0 -88
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/xU308Processor.js +0 -42
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesPrices.js +0 -28
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.js +0 -353
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound2.js +0 -22
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound3.js +0 -22
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound4.js +0 -22
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeStruct.js +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.js +0 -155
- package/dist/src/engine/implementations/Ajna/metadata.js +0 -59
- package/dist/src/engine/implementations/Ajna/tvl.js +0 -91
- package/dist/src/engine/implementations/Ambient/metadata.js +0 -36
- package/dist/src/engine/implementations/Ambient/tvl.js +0 -178
- package/dist/src/engine/implementations/Badger/metadata.js +0 -31
- package/dist/src/engine/implementations/Clamm/metadata.js +0 -176
- package/dist/src/engine/implementations/Compound/metadata.js +0 -23
- package/dist/src/engine/implementations/CompoundV3/metadata.js +0 -23
- package/dist/src/engine/implementations/Default/metadata.js +0 -12
- package/dist/src/engine/implementations/Dolomite/metadata.js +0 -20
- package/dist/src/engine/implementations/EigenLayer/metadata.js +0 -12
- package/dist/src/engine/implementations/EigenLayer/tvl.js +0 -60
- package/dist/src/engine/implementations/Encompassing/metadata.js +0 -43
- package/dist/src/engine/implementations/Erc20/metadata.js +0 -64
- package/dist/src/engine/implementations/Erc20/subTypes/detect.js +0 -170
- package/dist/src/engine/implementations/Erc20/subTypes/factories.js +0 -69
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.js +0 -46
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/tvl.js +0 -51
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.js +0 -35
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.js +0 -59
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.js +0 -21
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.js +0 -46
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.js +0 -40
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/tvl.js +0 -57
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.js +0 -20
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/tvl.js +0 -52
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.js +0 -38
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.js +0 -83
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.js +0 -24
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.js +0 -69
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.js +0 -65
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.js +0 -94
- package/dist/src/engine/implementations/Erc20/subTypes/index.js +0 -119
- package/dist/src/engine/implementations/Erc20/tvl.js +0 -99
- package/dist/src/engine/implementations/Erc20Snapshot/metadata.js +0 -11
- package/dist/src/engine/implementations/Erc721/metadata.js +0 -13
- package/dist/src/engine/implementations/ErcMultiToken/metadata.js +0 -63
- package/dist/src/engine/implementations/EventBased/metadata.js +0 -181
- package/dist/src/engine/implementations/Hyperdrive/metadata.js +0 -29
- package/dist/src/engine/implementations/Invalid/metadata.js +0 -10
- package/dist/src/engine/implementations/Ion/metadata.js +0 -16
- package/dist/src/engine/implementations/JsonAirdrop/metadata.js +0 -43
- package/dist/src/engine/implementations/Locker/metadata.js +0 -36
- package/dist/src/engine/implementations/Locker/tvl.js +0 -26
- package/dist/src/engine/implementations/Morpho/metadata.js +0 -63
- package/dist/src/engine/implementations/MultiLog/metadata.js +0 -36
- package/dist/src/engine/implementations/MultiLog/tvl.js +0 -59
- package/dist/src/engine/implementations/Radiant/metadata.js +0 -33
- package/dist/src/engine/implementations/Silo/metadata.js +0 -20
- package/dist/src/engine/implementations/UniswapV4/metadata.js +0 -36
- package/dist/src/engine/implementations/UniswapV4/tvl.js +0 -158
- package/dist/src/engine/implementations/Vest/metadata.js +0 -13
- package/dist/src/engine/metadata/factory.js +0 -76
- package/dist/src/engine/tvl/factory.js +0 -87
- package/dist/src/engine/tvl/logStates.js +0 -106
- package/dist/src/errors/BadRequest.error.js +0 -7
- package/dist/src/errors/Conflict.error.js +0 -7
- package/dist/src/errors/HttpError.js +0 -17
- package/dist/src/errors/InvalidParameter.error.js +0 -7
- package/dist/src/errors/NotFound.error.js +0 -12
- package/dist/src/errors/Opportunity.error.js +0 -11
- package/dist/src/errors/UnableToFindPrice.error.js +0 -7
- package/dist/src/errors/Unauthorized.error.js +0 -7
- package/dist/src/errors/VoidString.error.js +0 -7
- package/dist/src/errors/index.js +0 -6
- package/dist/src/guards/BackOffice.guard.js +0 -10
- package/dist/src/guards/Engine.guard.js +0 -9
- package/dist/src/guards/TokenAuth.guard.js +0 -10
- package/dist/src/guards/VerifyJwt.guard.js +0 -13
- package/dist/src/hooks/checkQueryAddressValidity.js +0 -7
- package/dist/src/hooks/checkQueryChainIdValidity.js +0 -7
- package/dist/src/index.js +0 -113
- package/dist/src/jobs/dynamic-data.js +0 -159
- package/dist/src/jobs/pendings.js +0 -238
- package/dist/src/jobs/prices.js +0 -10
- package/dist/src/jobs/reward-breakdowns.js +0 -163
- package/dist/src/jobs/rewards.js +0 -112
- package/dist/src/jobs/set-dungeon-keeper.js +0 -90
- package/dist/src/jobs/update-analytics.js +0 -548
- package/dist/src/jobs/update-dynamic-data.js +0 -57
- package/dist/src/jobs/update-euler-vaults.js +0 -18
- package/dist/src/jobs/update-rpc-calls-cache.js +0 -30
- package/dist/src/jobs/update-uniswap-v4-pools.js +0 -15
- package/dist/src/libs/computeFee.js +0 -34
- package/dist/src/libs/deprecated-merklv3/index.js +0 -183
- package/dist/src/libs/getTokensList.js +0 -19
- package/dist/src/libs/merklChainData.js +0 -116
- package/dist/src/libs/parse/marketsWithCache.js +0 -8
- package/dist/src/libs/positions/EigenLayer/index.js +0 -54
- package/dist/src/libs/positions/ajna/index.js +0 -107
- package/dist/src/libs/positions/badger/index.js +0 -80
- package/dist/src/libs/positions/clamm/index.js +0 -412
- package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.js +0 -36
- package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.js +0 -36
- package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.js +0 -42
- package/dist/src/libs/positions/clamm/thegraph/index.js +0 -163
- package/dist/src/libs/positions/compound/index.js +0 -91
- package/dist/src/libs/positions/dolomite/index.js +0 -51
- package/dist/src/libs/positions/erc20/index.js +0 -55
- package/dist/src/libs/positions/euler/index.js +0 -56
- package/dist/src/libs/positions/index.js +0 -56
- package/dist/src/libs/positions/morpho/index.js +0 -177
- package/dist/src/libs/positions/prepareFetch.js +0 -392
- package/dist/src/libs/positions/silo/index.js +0 -68
- package/dist/src/libs/positions/types.js +0 -1
- package/dist/src/libs/staticCampaigns.js +0 -15
- package/dist/src/libs/tokens/allowances.js +0 -18
- package/dist/src/libs/tokens/balances.js +0 -128
- package/dist/src/libs/tokens/tokenInfo.js +0 -22
- package/dist/src/modules/v4/accounting/accounting.controller.js +0 -61
- package/dist/src/modules/v4/accounting/accounting.model.js +0 -32
- package/dist/src/modules/v4/accounting/accounting.repository.js +0 -154
- package/dist/src/modules/v4/accounting/accounting.service.js +0 -107
- package/dist/src/modules/v4/airflow/airflow.service.js +0 -20
- package/dist/src/modules/v4/apr/apr.model.js +0 -13
- package/dist/src/modules/v4/apr/apr.service.js +0 -52
- package/dist/src/modules/v4/authentication/authentication.controller.js +0 -23
- package/dist/src/modules/v4/authentication/authentication.model.js +0 -6
- package/dist/src/modules/v4/authentication/authentication.service.js +0 -31
- package/dist/src/modules/v4/blacklist/blacklist.controller.js +0 -42
- package/dist/src/modules/v4/blacklist/blacklist.model.js +0 -13
- package/dist/src/modules/v4/blacklist/blacklist.repository.js +0 -50
- package/dist/src/modules/v4/blacklist/blacklist.service.js +0 -31
- package/dist/src/modules/v4/boost/boost.controller.js +0 -15
- package/dist/src/modules/v4/boost/boost.model.js +0 -14
- package/dist/src/modules/v4/boost/boost.service.js +0 -20
- package/dist/src/modules/v4/bucket/bucket.model.js +0 -85
- package/dist/src/modules/v4/bucket/bucket.service.js +0 -178
- package/dist/src/modules/v4/cache/cache.model.js +0 -14
- package/dist/src/modules/v4/cache/cache.repository.js +0 -22
- package/dist/src/modules/v4/cache/cache.service.js +0 -59
- package/dist/src/modules/v4/campaign/campaign.controller.js +0 -174
- package/dist/src/modules/v4/campaign/campaign.model.js +0 -140
- package/dist/src/modules/v4/campaign/campaign.repository.js +0 -535
- package/dist/src/modules/v4/campaign/campaign.service.js +0 -455
- package/dist/src/modules/v4/campaign/campaign.test.controller.js +0 -127
- package/dist/src/modules/v4/chain/chain.controller.js +0 -44
- package/dist/src/modules/v4/chain/chain.model.js +0 -36
- package/dist/src/modules/v4/chain/chain.repository.js +0 -79
- package/dist/src/modules/v4/chain/chain.service.js +0 -55
- package/dist/src/modules/v4/chainInteraction/chainInteraction.service.js +0 -4
- package/dist/src/modules/v4/claims/claims.controller.js +0 -19
- package/dist/src/modules/v4/claims/claims.model.js +0 -1
- package/dist/src/modules/v4/claims/claims.repository.js +0 -39
- package/dist/src/modules/v4/claims/claims.service.js +0 -40
- package/dist/src/modules/v4/coingecko/coingecko.model.js +0 -1
- package/dist/src/modules/v4/coingecko/coingecko.repository.js +0 -9
- package/dist/src/modules/v4/coingecko/coingecko.service.js +0 -65
- package/dist/src/modules/v4/computedValue/computedValue.controller.js +0 -46
- package/dist/src/modules/v4/computedValue/computedValue.model.js +0 -30
- package/dist/src/modules/v4/computedValue/computedValue.repository.js +0 -48
- package/dist/src/modules/v4/computedValue/computedValue.service.js +0 -23
- package/dist/src/modules/v4/creator/creator.controller.js +0 -43
- package/dist/src/modules/v4/creator/creator.model.js +0 -42
- package/dist/src/modules/v4/creator/creator.repository.js +0 -69
- package/dist/src/modules/v4/creator/creator.service.js +0 -92
- package/dist/src/modules/v4/dynamicData/dynamicData.model.js +0 -56
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +0 -263
- package/dist/src/modules/v4/enso/enso.model.js +0 -147
- package/dist/src/modules/v4/enso/enso.service.js +0 -116
- package/dist/src/modules/v4/explorer/explorer.controller.js +0 -13
- package/dist/src/modules/v4/explorer/explorer.model.js +0 -8
- package/dist/src/modules/v4/explorer/explorer.repository.js +0 -23
- package/dist/src/modules/v4/explorer/explorer.service.js +0 -24
- package/dist/src/modules/v4/icon/icon.model.js +0 -1
- package/dist/src/modules/v4/icon/icon.service.js +0 -16
- package/dist/src/modules/v4/interaction/interaction.controller.js +0 -45
- package/dist/src/modules/v4/interaction/interaction.model.js +0 -25
- package/dist/src/modules/v4/interaction/interaction.service.js +0 -95
- package/dist/src/modules/v4/kyberzap/kyberzap.model.js +0 -83
- package/dist/src/modules/v4/kyberzap/kyberzap.service.js +0 -176
- package/dist/src/modules/v4/liquidity/implementations/AjnaPositionFetcher.js +0 -90
- package/dist/src/modules/v4/liquidity/implementations/BadgerPositionFetcher.js +0 -69
- package/dist/src/modules/v4/liquidity/implementations/ClammPositionFetcher.js +0 -61
- package/dist/src/modules/v4/liquidity/implementations/DolomitePositionFetcher.js +0 -45
- package/dist/src/modules/v4/liquidity/implementations/ERC20PositionFetcher.js +0 -47
- package/dist/src/modules/v4/liquidity/implementations/EulerPositionFetcher.js +0 -40
- package/dist/src/modules/v4/liquidity/liquidity.controller.js +0 -16
- package/dist/src/modules/v4/liquidity/liquidity.model.js +0 -5
- package/dist/src/modules/v4/liquidity/liquidity.repository.js +0 -6
- package/dist/src/modules/v4/liquidity/liquidity.service.js +0 -34
- package/dist/src/modules/v4/merklRoot/merklRoot.controller.js +0 -31
- package/dist/src/modules/v4/merklRoot/merklRoot.model.js +0 -12
- package/dist/src/modules/v4/merklRoot/merklRoot.repository.js +0 -56
- package/dist/src/modules/v4/merklRoot/merklRoot.service.js +0 -48
- package/dist/src/modules/v4/opportunity/opportunity.controller.js +0 -189
- package/dist/src/modules/v4/opportunity/opportunity.converter.js +0 -174
- package/dist/src/modules/v4/opportunity/opportunity.model.js +0 -132
- package/dist/src/modules/v4/opportunity/opportunity.repository.js +0 -515
- package/dist/src/modules/v4/opportunity/opportunity.service.js +0 -380
- package/dist/src/modules/v4/opportunity/transform-id.pipe.js +0 -6
- package/dist/src/modules/v4/opportunity/validate-id.pipe.js +0 -12
- package/dist/src/modules/v4/price/price.controller.js +0 -56
- package/dist/src/modules/v4/price/price.model.js +0 -12
- package/dist/src/modules/v4/price/price.repository.js +0 -22
- package/dist/src/modules/v4/price/price.service.js +0 -63
- package/dist/src/modules/v4/prisma/index.js +0 -1
- package/dist/src/modules/v4/programPayload/programPayload.controller.js +0 -85
- package/dist/src/modules/v4/programPayload/programPayload.model.js +0 -179
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +0 -7567
- package/dist/src/modules/v4/programPayload/programPayload.service.js +0 -240
- package/dist/src/modules/v4/protocol/protocol.controller.js +0 -42
- package/dist/src/modules/v4/protocol/protocol.model.js +0 -186
- package/dist/src/modules/v4/protocol/protocol.repository.js +0 -175
- package/dist/src/modules/v4/protocol/protocol.service.js +0 -73
- package/dist/src/modules/v4/referral/referral.controller.js +0 -25
- package/dist/src/modules/v4/referral/referral.model.js +0 -12
- package/dist/src/modules/v4/referral/referral.service.js +0 -171
- package/dist/src/modules/v4/reward/reward.controller.js +0 -140
- package/dist/src/modules/v4/reward/reward.converter.js +0 -124
- package/dist/src/modules/v4/reward/reward.model.js +0 -153
- package/dist/src/modules/v4/reward/reward.repository.js +0 -350
- package/dist/src/modules/v4/reward/reward.service.js +0 -406
- package/dist/src/modules/v4/router.js +0 -93
- package/dist/src/modules/v4/status/status.controller.js +0 -68
- package/dist/src/modules/v4/status/status.model.js +0 -34
- package/dist/src/modules/v4/status/status.repository.js +0 -146
- package/dist/src/modules/v4/status/status.service.js +0 -150
- package/dist/src/modules/v4/token/token.controller.js +0 -118
- package/dist/src/modules/v4/token/token.model.js +0 -87
- package/dist/src/modules/v4/token/token.repository.js +0 -192
- package/dist/src/modules/v4/token/token.service.js +0 -410
- package/dist/src/modules/v4/tracer/tracer.service.js +0 -30
- package/dist/src/modules/v4/turtle/turtle.controller.js +0 -20
- package/dist/src/modules/v4/turtle/turtle.repository.js +0 -40
- package/dist/src/modules/v4/turtle/turtle.service.js +0 -28
- package/dist/src/modules/v4/tvl/tvl.model.js +0 -13
- package/dist/src/modules/v4/tvl/tvl.service.js +0 -63
- package/dist/src/modules/v4/uniswap/uniswap.controller.js +0 -100
- package/dist/src/modules/v4/uniswap/uniswap.model.js +0 -46
- package/dist/src/modules/v4/uniswap/uniswap.repository.js +0 -12
- package/dist/src/modules/v4/uniswap/uniswap.service.js +0 -245
- package/dist/src/modules/v4/user/user.controller.js +0 -77
- package/dist/src/modules/v4/user/user.model.js +0 -66
- package/dist/src/modules/v4/user/user.repository.js +0 -41
- package/dist/src/modules/v4/user/user.service.js +0 -102
- package/dist/src/plugins/error-handling.plugin.js +0 -34
- package/dist/src/routes/v1/allowances.js +0 -115
- package/dist/src/routes/v1/balances.js +0 -25
- package/dist/src/routes/v1/prices.js +0 -9
- package/dist/src/routes/v1/router.js +0 -6
- package/dist/src/routes/v1/tokens.js +0 -17
- package/dist/src/routes/v2/merkl.js +0 -13
- package/dist/src/routes/v2/router.js +0 -3
- package/dist/src/routes/v3/app.js +0 -43
- package/dist/src/routes/v3/blacklist.js +0 -19
- package/dist/src/routes/v3/campaign/delay.js +0 -81
- package/dist/src/routes/v3/campaignClaims.js +0 -29
- package/dist/src/routes/v3/campaignUnclaimed.js +0 -28
- package/dist/src/routes/v3/campaigns.js +0 -136
- package/dist/src/routes/v3/campaignsForMainParameter.js +0 -33
- package/dist/src/routes/v3/campaignsRewardsReport.js +0 -48
- package/dist/src/routes/v3/claims.js +0 -16
- package/dist/src/routes/v3/compoundV2.js +0 -9
- package/dist/src/routes/v3/createCampaign.js +0 -66
- package/dist/src/routes/v3/dolomite.js +0 -12
- package/dist/src/routes/v3/euler.js +0 -52
- package/dist/src/routes/v3/fetch.js +0 -27
- package/dist/src/routes/v3/health.js +0 -13
- package/dist/src/routes/v3/lostyield.js +0 -101
- package/dist/src/routes/v3/merkl.js +0 -119
- package/dist/src/routes/v3/morphoMarkets.js +0 -27
- package/dist/src/routes/v3/morphoVaults.js +0 -22
- package/dist/src/routes/v3/multiChainPositions.js +0 -70
- package/dist/src/routes/v3/opportunity.js +0 -28
- package/dist/src/routes/v3/overview.js +0 -72
- package/dist/src/routes/v3/parse.js +0 -23
- package/dist/src/routes/v3/payload.js +0 -40
- package/dist/src/routes/v3/poolInfo.js +0 -88
- package/dist/src/routes/v3/positions.js +0 -62
- package/dist/src/routes/v3/radiant.js +0 -26
- package/dist/src/routes/v3/recipients.js +0 -29
- package/dist/src/routes/v3/rewards.js +0 -36
- package/dist/src/routes/v3/rewardsReport.js +0 -40
- package/dist/src/routes/v3/router.js +0 -70
- package/dist/src/routes/v3/silo.js +0 -20
- package/dist/src/routes/v3/token.js +0 -24
- package/dist/src/routes/v3/twt/participants.js +0 -63
- package/dist/src/routes/v3/uniswapv4.js +0 -29
- package/dist/src/routes/v3/updates.js +0 -47
- package/dist/src/routes/v3/userRewards.js +0 -63
- package/dist/src/scripts/fill-coingecko-data.js +0 -3
- package/dist/src/scripts/fill-descriptions.js +0 -101
- package/dist/src/scripts/fill-unknown-tokens.js +0 -58
- package/dist/src/scripts/reparse-opportunities.js +0 -75
- package/dist/src/types/external/spectraAPI.js +0 -1
- package/dist/src/types/index.js +0 -1
- package/dist/src/utils/TailSampler.js +0 -23
- package/dist/src/utils/bigintToString.js +0 -20
- package/dist/src/utils/caseChanges.js +0 -15
- package/dist/src/utils/decodeCalls.js +0 -340
- package/dist/src/utils/encodeCalls.js +0 -506
- package/dist/src/utils/error.js +0 -114
- package/dist/src/utils/execute.js +0 -117
- package/dist/src/utils/generateCardName.js +0 -209
- package/dist/src/utils/generic.js +0 -43
- package/dist/src/utils/hashArray.js +0 -7
- package/dist/src/utils/lastBlockBefore.js +0 -78
- package/dist/src/utils/logger.js +0 -52
- package/dist/src/utils/parseDistributionType.js +0 -16
- package/dist/src/utils/pricer.js +0 -189
- package/dist/src/utils/prices/chainlinkRead.js +0 -8
- package/dist/src/utils/prices/curveVirtualPrice.js +0 -7
- package/dist/src/utils/prices/getDQUICK.js +0 -8
- package/dist/src/utils/prices/priceFetcherFactory.js +0 -32
- package/dist/src/utils/prices/priceService.js +0 -274
- package/dist/src/utils/prices/services/OnChainCallService.js +0 -38
- package/dist/src/utils/prices/services/coinGeckoService.js +0 -63
- package/dist/src/utils/prices/services/defillamaService.js +0 -53
- package/dist/src/utils/prices/services/dexScreenerService.js +0 -62
- package/dist/src/utils/prices/services/erc4626Service.js +0 -38
- package/dist/src/utils/prices/services/getERC4626.js +0 -11
- package/dist/src/utils/prices/services/indexCoopService.js +0 -55
- package/dist/src/utils/prices/services/priceFetcher.js +0 -1
- package/dist/src/utils/prices/uniV2Price.js +0 -40
- package/dist/src/utils/providers.js +0 -37
- package/dist/src/utils/queries/allCampaigns.js +0 -12
- package/dist/src/utils/sanitizeChain.js +0 -6
- package/dist/src/utils/stryke.js +0 -4
- package/dist/src/utils/throw.js +0 -55
- package/dist/tsconfig.package.tsbuildinfo +0 -1
@@ -1,353 +0,0 @@
|
|
1
|
-
import { Erc20SubType } from "@/engine/implementations/Erc20/subTypes";
|
2
|
-
import { decodeCall, decodeReturnValue } from "@/utils/decodeCalls";
|
3
|
-
import { enzymeFundValueCalculatorRouterMapping, getTypeFromFactoryAddress } from "./helpers/factoryFinder";
|
4
|
-
import { getTypeFromAddressChain } from "./helpers/hardcoded";
|
5
|
-
import { getTypeFromOwnerAddress } from "./helpers/ownerFinder";
|
6
|
-
import { processorMapping } from "./implementations/processorMapping";
|
7
|
-
function satisfiesNameConditions(name, type) {
|
8
|
-
const lowerCaseName = name.toLowerCase();
|
9
|
-
switch (type) {
|
10
|
-
case Erc20SubType.hourglass:
|
11
|
-
return lowerCaseName.startsWith("ct-hourglass");
|
12
|
-
case Erc20SubType.fraxlend:
|
13
|
-
return lowerCaseName.includes("fraxlend interest bearing");
|
14
|
-
case Erc20SubType.sturdy_aggregator:
|
15
|
-
return lowerCaseName.includes("aggregator");
|
16
|
-
case Erc20SubType.sturdy_silo:
|
17
|
-
return lowerCaseName.includes("sturdy interest bearing");
|
18
|
-
case Erc20SubType.aura:
|
19
|
-
return lowerCaseName.includes("aura deposit vault");
|
20
|
-
case Erc20SubType.poolside:
|
21
|
-
return lowerCaseName.includes("poolside");
|
22
|
-
case Erc20SubType.anglesLiquid:
|
23
|
-
return lowerCaseName.includes("angles liquid");
|
24
|
-
case Erc20SubType.balancerGauge:
|
25
|
-
return (lowerCaseName.includes("balancer") &&
|
26
|
-
!lowerCaseName.includes("aura deposit vault") &&
|
27
|
-
!lowerCaseName.startsWith("vifi"));
|
28
|
-
case Erc20SubType.beraborrow_gauge:
|
29
|
-
return lowerCaseName.includes("beraborrow") && lowerCaseName.includes("bpt");
|
30
|
-
case Erc20SubType.beratrax_vault:
|
31
|
-
return lowerCaseName.startsWith("beratrax vault");
|
32
|
-
case Erc20SubType.gearbox:
|
33
|
-
return lowerCaseName.includes("farming of") || lowerCaseName.startsWith("trade");
|
34
|
-
case Erc20SubType.euler_borrow:
|
35
|
-
return lowerCaseName.startsWith("debt token of evk vault");
|
36
|
-
case Erc20SubType.euler_lend:
|
37
|
-
return lowerCaseName.includes("evk vault");
|
38
|
-
case Erc20SubType.fluid:
|
39
|
-
return lowerCaseName.startsWith("fluid");
|
40
|
-
case Erc20SubType.filament:
|
41
|
-
return lowerCaseName.startsWith("filament");
|
42
|
-
case Erc20SubType.radiant_lend:
|
43
|
-
return lowerCaseName.includes("radiant interest");
|
44
|
-
case Erc20SubType.radiant_borrow:
|
45
|
-
return lowerCaseName.includes("radiant variable debt");
|
46
|
-
case Erc20SubType.ionic:
|
47
|
-
return lowerCaseName.includes("ionic");
|
48
|
-
case Erc20SubType.venus:
|
49
|
-
return lowerCaseName.startsWith("venus");
|
50
|
-
case Erc20SubType.reactor_fusion:
|
51
|
-
return lowerCaseName.startsWith("reactorfusion");
|
52
|
-
case Erc20SubType.rfx:
|
53
|
-
return lowerCaseName.includes("rfx");
|
54
|
-
case Erc20SubType.rfx_slv:
|
55
|
-
return lowerCaseName.includes("rfx") && lowerCaseName.includes("shared liquidity vault");
|
56
|
-
case Erc20SubType.layerbank:
|
57
|
-
return lowerCaseName.includes("layerbank");
|
58
|
-
case Erc20SubType.moonwell:
|
59
|
-
return lowerCaseName.includes("moonwell");
|
60
|
-
case Erc20SubType.curve_2:
|
61
|
-
return (lowerCaseName === "crvusd/frax" ||
|
62
|
-
lowerCaseName === "ezeth/wfrxeth" ||
|
63
|
-
lowerCaseName === "pufeth/wsteth" ||
|
64
|
-
lowerCaseName === "hai/lusd" ||
|
65
|
-
lowerCaseName === "weth/pufeth");
|
66
|
-
case Erc20SubType.crosscurve:
|
67
|
-
return lowerCaseName.startsWith("crosscurve") || lowerCaseName === "eywa/usdt";
|
68
|
-
case Erc20SubType.curveNPool:
|
69
|
-
return lowerCaseName === "zai/usdc" || lowerCaseName === "zai/szai";
|
70
|
-
case Erc20SubType.silostaking:
|
71
|
-
return lowerCaseName === "isei";
|
72
|
-
case Erc20SubType.beefy:
|
73
|
-
return lowerCaseName.startsWith("moo velo");
|
74
|
-
case Erc20SubType.uniswapv2:
|
75
|
-
return lowerCaseName.includes("uniswap") && lowerCaseName !== "uniswap";
|
76
|
-
case Erc20SubType.fenix:
|
77
|
-
return lowerCaseName.includes("stablev1 amm");
|
78
|
-
case Erc20SubType.ra:
|
79
|
-
return lowerCaseName.includes("volatile pair -") || lowerCaseName.includes("correlated pair -");
|
80
|
-
case Erc20SubType.syncswap:
|
81
|
-
return lowerCaseName.includes("syncswap");
|
82
|
-
case Erc20SubType.aave_lending:
|
83
|
-
return lowerCaseName.includes("aave");
|
84
|
-
case Erc20SubType.aave_borrowing:
|
85
|
-
return lowerCaseName.includes("aave") && lowerCaseName.includes("debt");
|
86
|
-
case Erc20SubType.xlend_lending:
|
87
|
-
return ((lowerCaseName.startsWith("extrafi x") || lowerCaseName.startsWith("extrax")) && !lowerCaseName.includes("debt"));
|
88
|
-
case Erc20SubType.xlend_borrowing:
|
89
|
-
return ((lowerCaseName.startsWith("extrafi x") || lowerCaseName.startsWith("extrax")) && lowerCaseName.includes("debt"));
|
90
|
-
case Erc20SubType.curve_gauge:
|
91
|
-
return lowerCaseName.startsWith("curve.fi") && lowerCaseName.includes("gauge");
|
92
|
-
case Erc20SubType.vicuna_lending:
|
93
|
-
return lowerCaseName.startsWith("vicuna sonic") && !lowerCaseName.includes("debt");
|
94
|
-
case Erc20SubType.vicuna_borrowing:
|
95
|
-
return lowerCaseName.startsWith("vicuna sonic variable debt");
|
96
|
-
case Erc20SubType.yei_borrowing:
|
97
|
-
return ((lowerCaseName.startsWith("yei") || (lowerCaseName.includes("aave") && lowerCaseName.includes("yei"))) &&
|
98
|
-
lowerCaseName.includes("debt"));
|
99
|
-
case Erc20SubType.ironclad_borrowing:
|
100
|
-
return ((lowerCaseName.startsWith("ironclad") ||
|
101
|
-
(lowerCaseName.includes("aave") && lowerCaseName.includes("ironclad"))) &&
|
102
|
-
lowerCaseName.includes("debt") &&
|
103
|
-
name.toLowerCase() !== "ironclad token");
|
104
|
-
case Erc20SubType.zerolend_borrowing:
|
105
|
-
return lowerCaseName.includes("zerolend") && lowerCaseName.includes("debt");
|
106
|
-
case Erc20SubType.lnd_borrowing:
|
107
|
-
return lowerCaseName.includes("lnd") && lowerCaseName.includes("debt");
|
108
|
-
case Erc20SubType.dlend_borrowing:
|
109
|
-
return lowerCaseName.includes("dlend") && lowerCaseName.includes("debt");
|
110
|
-
case Erc20SubType.yei_lending:
|
111
|
-
return lowerCaseName.startsWith("yei") || (lowerCaseName.includes("aave") && lowerCaseName.includes("yei"));
|
112
|
-
case Erc20SubType.ironclad_lending:
|
113
|
-
return ((lowerCaseName.startsWith("ironclad") ||
|
114
|
-
(lowerCaseName.includes("aave") && lowerCaseName.includes("ironclad"))) &&
|
115
|
-
name.toLowerCase() !== "ironclad token");
|
116
|
-
case Erc20SubType.zerolend_lending:
|
117
|
-
return lowerCaseName.includes("zerolend");
|
118
|
-
case Erc20SubType.lnd_lending:
|
119
|
-
return lowerCaseName.includes("lnd");
|
120
|
-
case Erc20SubType.dlend_lending:
|
121
|
-
return lowerCaseName.startsWith("dlend") && !lowerCaseName.includes("debt");
|
122
|
-
case Erc20SubType.compound:
|
123
|
-
return lowerCaseName.includes("compound");
|
124
|
-
case Erc20SubType.ironcladStaking:
|
125
|
-
return lowerCaseName === "ironclad token";
|
126
|
-
case Erc20SubType.woofi:
|
127
|
-
return lowerCaseName.includes("woofi");
|
128
|
-
case Erc20SubType.maverickBoostedPosition:
|
129
|
-
return lowerCaseName.includes("maverick");
|
130
|
-
case Erc20SubType.zkSwapThreePool:
|
131
|
-
return lowerCaseName.includes("zf");
|
132
|
-
case Erc20SubType.maha:
|
133
|
-
return lowerCaseName.includes("staked") && lowerCaseName.includes("maha");
|
134
|
-
case Erc20SubType.tempest:
|
135
|
-
return lowerCaseName.startsWith("ts");
|
136
|
-
case Erc20SubType.tempestStaking:
|
137
|
-
return lowerCaseName.startsWith("tempest");
|
138
|
-
case Erc20SubType.holdstation:
|
139
|
-
return lowerCaseName.startsWith("hs");
|
140
|
-
case Erc20SubType.noLinkVault:
|
141
|
-
return lowerCaseName.startsWith("unifi");
|
142
|
-
case Erc20SubType.vicuna:
|
143
|
-
return lowerCaseName.startsWith("vifi");
|
144
|
-
case Erc20SubType.avalon_borrowing:
|
145
|
-
return lowerCaseName.includes("avalon") && lowerCaseName.includes("debt");
|
146
|
-
case Erc20SubType.avalon_lending:
|
147
|
-
return lowerCaseName.includes("avalon");
|
148
|
-
case Erc20SubType.superlend_borrowing:
|
149
|
-
return lowerCaseName.includes("superlend") && lowerCaseName.includes("debt");
|
150
|
-
case Erc20SubType.superlend_lending:
|
151
|
-
return lowerCaseName.includes("superlend");
|
152
|
-
case Erc20SubType.lendle_borrowing:
|
153
|
-
return lowerCaseName.includes("lendle") && lowerCaseName.includes("debt");
|
154
|
-
case Erc20SubType.lendle_lending:
|
155
|
-
return lowerCaseName.includes("lendle");
|
156
|
-
case Erc20SubType.takotako_borrowing:
|
157
|
-
return lowerCaseName.includes("takotako") && lowerCaseName.includes("debt");
|
158
|
-
case Erc20SubType.takotako_lending:
|
159
|
-
return lowerCaseName.includes("takotako");
|
160
|
-
case Erc20SubType.cian:
|
161
|
-
return lowerCaseName.includes("cian");
|
162
|
-
case Erc20SubType.concrete:
|
163
|
-
return lowerCaseName.includes("concrete");
|
164
|
-
case Erc20SubType.equalizer_gauge:
|
165
|
-
return lowerCaseName.includes("equalizer");
|
166
|
-
case Erc20SubType.spectra_lpt:
|
167
|
-
return lowerCaseName.includes("spectra") && lowerCaseName.includes("curve");
|
168
|
-
case Erc20SubType.spectra_yt:
|
169
|
-
return lowerCaseName.includes("yield") && lowerCaseName.includes("token");
|
170
|
-
case Erc20SubType.bunniV2:
|
171
|
-
return lowerCaseName.includes("bunni");
|
172
|
-
case Erc20SubType.sake_lending:
|
173
|
-
return lowerCaseName.includes("sake soneium");
|
174
|
-
case Erc20SubType.sake_borrowing:
|
175
|
-
return lowerCaseName.includes("sake soneium") && lowerCaseName.includes("debt");
|
176
|
-
case Erc20SubType.stability_lending:
|
177
|
-
return lowerCaseName.startsWith("stability market");
|
178
|
-
case Erc20SubType.stability:
|
179
|
-
return lowerCaseName.startsWith("stability") && !lowerCaseName.startsWith("stability market");
|
180
|
-
default:
|
181
|
-
return false;
|
182
|
-
}
|
183
|
-
}
|
184
|
-
function generateResult(type, name, targetToken, typeInfo, campaign) {
|
185
|
-
const ProcessorClass = processorMapping[type];
|
186
|
-
if (!ProcessorClass) {
|
187
|
-
throw new Error(`Processor not found for key: ${type}`);
|
188
|
-
}
|
189
|
-
const processorObject = new ProcessorClass();
|
190
|
-
if (campaign)
|
191
|
-
typeInfo = { ...typeInfo, ...parseForStaking(campaign) };
|
192
|
-
typeInfo = {
|
193
|
-
...typeInfo,
|
194
|
-
name: name,
|
195
|
-
tokenAddress: targetToken,
|
196
|
-
totalSupply: 0,
|
197
|
-
blacklistedSupply: 0,
|
198
|
-
};
|
199
|
-
return processorObject.computeRound1(type, typeInfo);
|
200
|
-
}
|
201
|
-
export function processNamingConditionsInOrder(name, targetToken, campaign) {
|
202
|
-
// Order matters
|
203
|
-
const types = Object.values(Erc20SubType).filter(value => typeof value === "string");
|
204
|
-
for (const type of types) {
|
205
|
-
if (satisfiesNameConditions(name, type)) {
|
206
|
-
return generateResult(type, name, targetToken, {}, campaign);
|
207
|
-
}
|
208
|
-
}
|
209
|
-
}
|
210
|
-
function parseForFactory(calls, targetToken, campaign) {
|
211
|
-
try {
|
212
|
-
const factory = decodeReturnValue(calls.factory, "factory");
|
213
|
-
const name = decodeReturnValue(calls.name, "name");
|
214
|
-
const type = getTypeFromFactoryAddress(factory);
|
215
|
-
if (type !== Erc20SubType.unknown)
|
216
|
-
return generateResult(type, name, targetToken, { factory }, campaign);
|
217
|
-
}
|
218
|
-
catch (e) {
|
219
|
-
// No factory on this token
|
220
|
-
// console.log(e);
|
221
|
-
}
|
222
|
-
}
|
223
|
-
function parseForOwner(calls, targetToken) {
|
224
|
-
try {
|
225
|
-
const owner = decodeReturnValue(calls.owner, "owner");
|
226
|
-
const name = decodeReturnValue(calls.name, "name");
|
227
|
-
const type = getTypeFromOwnerAddress(owner);
|
228
|
-
if (type !== Erc20SubType.unknown)
|
229
|
-
return generateResult(type, name, targetToken, { owner: owner });
|
230
|
-
}
|
231
|
-
catch (e) {
|
232
|
-
// No factory on this token
|
233
|
-
// console.log(e);
|
234
|
-
}
|
235
|
-
}
|
236
|
-
function parseForEnzyme(calls, targetToken) {
|
237
|
-
// Enzyme check
|
238
|
-
try {
|
239
|
-
const dispatcher = decodeReturnValue(calls.creator, "getCreator");
|
240
|
-
const name = decodeReturnValue(calls.name, "name");
|
241
|
-
const type = getTypeFromFactoryAddress(dispatcher);
|
242
|
-
const fundValueCalculator = enzymeFundValueCalculatorRouterMapping[dispatcher];
|
243
|
-
const typeInfo = {
|
244
|
-
fundValueCalculator,
|
245
|
-
dispatcher,
|
246
|
-
};
|
247
|
-
if (type === Erc20SubType.enzyme) {
|
248
|
-
return generateResult(type, name, targetToken, typeInfo);
|
249
|
-
}
|
250
|
-
}
|
251
|
-
catch (e) {
|
252
|
-
// No factory on this token
|
253
|
-
}
|
254
|
-
}
|
255
|
-
function parseForMetamorpho(calls, targetToken) {
|
256
|
-
// MetaMorpho check
|
257
|
-
try {
|
258
|
-
decodeReturnValue(calls.metamorpho, "MORPHO");
|
259
|
-
const name = decodeReturnValue(calls.name, "name");
|
260
|
-
return generateResult(Erc20SubType.metamorpho, name, targetToken, {});
|
261
|
-
}
|
262
|
-
catch (e) {
|
263
|
-
// Not a metamorpho token
|
264
|
-
}
|
265
|
-
}
|
266
|
-
function parseForBalancer(calls, targetToken, name) {
|
267
|
-
// Check for balancer pools
|
268
|
-
try {
|
269
|
-
decodeReturnValue(calls.poolId, "getPoolId");
|
270
|
-
return generateResult(Erc20SubType.balancerPool, name, targetToken, {});
|
271
|
-
}
|
272
|
-
catch (e) {
|
273
|
-
// Not a balancer pool
|
274
|
-
}
|
275
|
-
try {
|
276
|
-
decodeReturnValue(calls.vault, "getVault");
|
277
|
-
return generateResult(Erc20SubType.balancerV3, name, targetToken, {});
|
278
|
-
}
|
279
|
-
catch (e) {
|
280
|
-
// Not a balancer v3 pool
|
281
|
-
}
|
282
|
-
}
|
283
|
-
function checkAgainstHardcoded(calls, chainId, targetToken) {
|
284
|
-
// Check for balancer pools
|
285
|
-
try {
|
286
|
-
const name = decodeReturnValue(calls.name, "name");
|
287
|
-
const type = getTypeFromAddressChain(chainId, targetToken);
|
288
|
-
if (type !== Erc20SubType.unknown)
|
289
|
-
return generateResult(type, name, targetToken, {});
|
290
|
-
}
|
291
|
-
catch (e) {
|
292
|
-
// Not a hardcoded address
|
293
|
-
}
|
294
|
-
}
|
295
|
-
function parseForStaking(campaign) {
|
296
|
-
try {
|
297
|
-
const whitelist = campaign.campaignParameters.whitelist;
|
298
|
-
if (whitelist.length === 1) {
|
299
|
-
const forwarders = campaign.campaignParameters.forwarders;
|
300
|
-
if (forwarders.length === 1) {
|
301
|
-
if (forwarders[0].sender === whitelist[0]) {
|
302
|
-
return { isStaking: "true", stakingContract: whitelist[0] };
|
303
|
-
}
|
304
|
-
}
|
305
|
-
}
|
306
|
-
}
|
307
|
-
catch (e) {
|
308
|
-
// No factory on this token
|
309
|
-
// console.log(e);
|
310
|
-
}
|
311
|
-
return { isStaking: "false" };
|
312
|
-
}
|
313
|
-
export function getTokenTypeRound1(calls, targetToken, index, campaign) {
|
314
|
-
const returnValueOfCalls = calls.map(call => call.returnData);
|
315
|
-
const returnValue = {
|
316
|
-
factory: returnValueOfCalls[index],
|
317
|
-
metamorpho: returnValueOfCalls[index + 1],
|
318
|
-
name: returnValueOfCalls[index + 2],
|
319
|
-
poolId: returnValueOfCalls[index + 3],
|
320
|
-
creator: returnValueOfCalls[index + 4],
|
321
|
-
owner: returnValueOfCalls[index + 5],
|
322
|
-
vault: returnValueOfCalls[index + 6],
|
323
|
-
};
|
324
|
-
let result = parseForFactory(returnValue, targetToken, campaign);
|
325
|
-
if (result)
|
326
|
-
return result;
|
327
|
-
result = parseForOwner(returnValue, targetToken);
|
328
|
-
if (result)
|
329
|
-
return result;
|
330
|
-
result = checkAgainstHardcoded(returnValue, campaign.computeChainId, targetToken);
|
331
|
-
if (result)
|
332
|
-
return result;
|
333
|
-
result = parseForEnzyme(returnValue, targetToken);
|
334
|
-
if (result)
|
335
|
-
return result;
|
336
|
-
result = parseForMetamorpho(returnValue, targetToken);
|
337
|
-
if (result)
|
338
|
-
return result;
|
339
|
-
let name;
|
340
|
-
try {
|
341
|
-
name = decodeCall(returnValueOfCalls, index + 2, "name");
|
342
|
-
}
|
343
|
-
catch {
|
344
|
-
return generateResult(Erc20SubType.unknown, "Unknown", targetToken, {}, campaign);
|
345
|
-
}
|
346
|
-
result = parseForBalancer(returnValue, targetToken, name);
|
347
|
-
if (result)
|
348
|
-
return result;
|
349
|
-
result = processNamingConditionsInOrder(name, targetToken, campaign);
|
350
|
-
if (result)
|
351
|
-
return result;
|
352
|
-
return generateResult(Erc20SubType.unknown, name, targetToken, {}, campaign);
|
353
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { processorMapping } from "./implementations/processorMapping";
|
2
|
-
export function getTokenTypeRound2(index, type, typeInfo, calls, campaign) {
|
3
|
-
try {
|
4
|
-
const returnValueOfCalls = calls.map(call => call.returnData);
|
5
|
-
const ProcessorClass = processorMapping[type];
|
6
|
-
if (!ProcessorClass) {
|
7
|
-
throw new Error(`Processor not found for key: ${type}`);
|
8
|
-
}
|
9
|
-
const processorObject = new ProcessorClass();
|
10
|
-
return processorObject.computeRound2(index, type, typeInfo, returnValueOfCalls, campaign);
|
11
|
-
}
|
12
|
-
catch (error) {
|
13
|
-
console.error(error);
|
14
|
-
return {
|
15
|
-
type: type,
|
16
|
-
calls: [],
|
17
|
-
typeInfo: {
|
18
|
-
...typeInfo,
|
19
|
-
},
|
20
|
-
};
|
21
|
-
}
|
22
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { processorMapping } from "./implementations/processorMapping";
|
2
|
-
export function getTokenTypeRound3(index, type, typeInfo, calls) {
|
3
|
-
try {
|
4
|
-
const ProcessorClass = processorMapping[type];
|
5
|
-
const returnValueOfCalls = calls.map(call => call.returnData);
|
6
|
-
if (!ProcessorClass) {
|
7
|
-
throw new Error(`Processor not found for key: ${type}`);
|
8
|
-
}
|
9
|
-
const processorObject = new ProcessorClass();
|
10
|
-
return processorObject.computeRound3(index, type, typeInfo, returnValueOfCalls);
|
11
|
-
}
|
12
|
-
catch (error) {
|
13
|
-
console.error(error);
|
14
|
-
return {
|
15
|
-
type: type,
|
16
|
-
calls: [],
|
17
|
-
typeInfo: {
|
18
|
-
...typeInfo,
|
19
|
-
},
|
20
|
-
};
|
21
|
-
}
|
22
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import { processorMapping } from "./implementations/processorMapping";
|
2
|
-
export function getTokenTypeRound4(index, type, typeInfo, calls, campaign) {
|
3
|
-
try {
|
4
|
-
const ProcessorClass = processorMapping[type];
|
5
|
-
const returnValueOfCalls = calls.map(call => call.returnData);
|
6
|
-
if (!ProcessorClass) {
|
7
|
-
throw new Error(`Processor not found for key: ${type}`);
|
8
|
-
}
|
9
|
-
const processorObject = new ProcessorClass();
|
10
|
-
return processorObject.computeRound4(index, type, typeInfo, returnValueOfCalls, campaign);
|
11
|
-
}
|
12
|
-
catch (error) {
|
13
|
-
console.error(error);
|
14
|
-
return {
|
15
|
-
type: type,
|
16
|
-
calls: [],
|
17
|
-
typeInfo: {
|
18
|
-
...typeInfo,
|
19
|
-
},
|
20
|
-
};
|
21
|
-
}
|
22
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,155 +0,0 @@
|
|
1
|
-
import { Erc20SubType } from "@/engine/implementations/Erc20/subTypes";
|
2
|
-
import { OpportunityAction } from "@db/api";
|
3
|
-
export const tokenTypeToProtocolAndAction = {
|
4
|
-
[Erc20SubType.aave_borrowing]: { protocol: "aave", action: OpportunityAction.BORROW },
|
5
|
-
[Erc20SubType.anglesLiquid]: { protocol: "angles", action: OpportunityAction.LEND },
|
6
|
-
[Erc20SubType.aave_lending]: { protocol: "aave", action: OpportunityAction.LEND },
|
7
|
-
[Erc20SubType.aerodrome]: { protocol: "aerodrome", action: OpportunityAction.POOL },
|
8
|
-
[Erc20SubType.akron]: { protocol: "akron", action: OpportunityAction.POOL },
|
9
|
-
[Erc20SubType.aura]: { protocol: "aura", action: OpportunityAction.POOL },
|
10
|
-
[Erc20SubType.balancerGauge]: { protocol: "balancer", action: OpportunityAction.POOL },
|
11
|
-
[Erc20SubType.balancerPool]: { protocol: "balancer", action: OpportunityAction.POOL },
|
12
|
-
[Erc20SubType.baseswap]: { protocol: "base-swap", action: OpportunityAction.HOLD },
|
13
|
-
[Erc20SubType.beefy]: { protocol: "beefy", action: OpportunityAction.POOL },
|
14
|
-
[Erc20SubType.compound]: { protocol: "compound", action: OpportunityAction.LEND },
|
15
|
-
[Erc20SubType.curve]: { protocol: "curve", action: OpportunityAction.POOL },
|
16
|
-
[Erc20SubType.curve_2]: { protocol: "curve", action: OpportunityAction.POOL },
|
17
|
-
[Erc20SubType.dragonswap]: { protocol: "dragonswap", action: OpportunityAction.POOL },
|
18
|
-
[Erc20SubType.enzyme]: { protocol: "enzyme", action: OpportunityAction.HOLD },
|
19
|
-
[Erc20SubType.euler_borrow]: { protocol: "euler", action: OpportunityAction.BORROW },
|
20
|
-
[Erc20SubType.euler_lend]: { protocol: "euler", action: OpportunityAction.LEND },
|
21
|
-
[Erc20SubType.fenix]: { protocol: "fenix", action: OpportunityAction.HOLD },
|
22
|
-
[Erc20SubType.filament]: { protocol: "filament", action: OpportunityAction.LONG },
|
23
|
-
[Erc20SubType.fluid]: { protocol: "fluid", action: OpportunityAction.LEND },
|
24
|
-
[Erc20SubType.fraxlend]: { protocol: "fraxlend", action: OpportunityAction.LEND },
|
25
|
-
[Erc20SubType.gearbox]: { protocol: "gearbox", action: OpportunityAction.LEND },
|
26
|
-
[Erc20SubType.ionic]: { protocol: "ionic", action: OpportunityAction.LEND },
|
27
|
-
[Erc20SubType.ironclad_borrowing]: { protocol: "ironclad", action: OpportunityAction.HOLD },
|
28
|
-
[Erc20SubType.ironclad_lending]: { protocol: "ironclad", action: OpportunityAction.HOLD },
|
29
|
-
[Erc20SubType.koi]: { protocol: "koi", action: OpportunityAction.POOL },
|
30
|
-
[Erc20SubType.layerbank]: { protocol: "layerbank", action: OpportunityAction.LEND },
|
31
|
-
[Erc20SubType.metamorpho]: { protocol: "morpho", action: OpportunityAction.HOLD },
|
32
|
-
[Erc20SubType.moonwell]: { protocol: "moonwell", action: OpportunityAction.LEND },
|
33
|
-
[Erc20SubType.pendle]: { protocol: "pendle", action: OpportunityAction.HOLD },
|
34
|
-
[Erc20SubType.poolside]: { protocol: "poolside", action: OpportunityAction.POOL },
|
35
|
-
[Erc20SubType.ra]: { protocol: "ra", action: OpportunityAction.HOLD },
|
36
|
-
[Erc20SubType.radiant_borrow]: { protocol: "radiant", action: OpportunityAction.BORROW },
|
37
|
-
[Erc20SubType.radiant_lend]: { protocol: "radiant", action: OpportunityAction.LEND },
|
38
|
-
[Erc20SubType.reactor_fusion]: { protocol: "reactor_fusion", action: OpportunityAction.LEND },
|
39
|
-
[Erc20SubType.silostaking]: { protocol: "silo", action: OpportunityAction.LEND },
|
40
|
-
[Erc20SubType.splice]: { protocol: "splice", action: OpportunityAction.HOLD },
|
41
|
-
[Erc20SubType.sturdy_aggregator]: { protocol: "sturdy", action: OpportunityAction.LEND },
|
42
|
-
[Erc20SubType.sturdy_silo]: { protocol: "sturdy", action: OpportunityAction.LEND },
|
43
|
-
[Erc20SubType.syncswap]: { protocol: "syncswap", action: OpportunityAction.POOL },
|
44
|
-
[Erc20SubType.toros]: { protocol: "toros", action: OpportunityAction.HOLD },
|
45
|
-
[Erc20SubType.uniswapv2]: { protocol: "uniswap", action: OpportunityAction.POOL },
|
46
|
-
[Erc20SubType.velodrome]: { protocol: "velodrome", action: OpportunityAction.POOL },
|
47
|
-
[Erc20SubType.venus]: { protocol: "venus", action: OpportunityAction.LEND },
|
48
|
-
[Erc20SubType.unknown]: { protocol: undefined, action: OpportunityAction.HOLD },
|
49
|
-
[Erc20SubType.yei_borrowing]: { protocol: "yei", action: OpportunityAction.HOLD },
|
50
|
-
[Erc20SubType.yei_lending]: { protocol: "yei", action: OpportunityAction.HOLD },
|
51
|
-
[Erc20SubType.zerolend_borrowing]: { protocol: "zerolend", action: OpportunityAction.BORROW },
|
52
|
-
[Erc20SubType.zerolend_lending]: { protocol: "zerolend", action: OpportunityAction.LEND },
|
53
|
-
[Erc20SubType.lnd_borrowing]: { protocol: "lnd", action: OpportunityAction.BORROW },
|
54
|
-
[Erc20SubType.lnd_lending]: { protocol: "lnd", action: OpportunityAction.LEND },
|
55
|
-
[Erc20SubType.dlend_borrowing]: { protocol: "dlend", action: OpportunityAction.BORROW },
|
56
|
-
[Erc20SubType.dlend_lending]: { protocol: "dlend", action: OpportunityAction.LEND },
|
57
|
-
[Erc20SubType.zkswap]: { protocol: "zk-swap", action: OpportunityAction.POOL },
|
58
|
-
[Erc20SubType.rfx]: { protocol: "rfx", action: OpportunityAction.POOL },
|
59
|
-
[Erc20SubType.woofi]: { protocol: "woofi", action: OpportunityAction.LEND },
|
60
|
-
[Erc20SubType.ironcladStaking]: { protocol: "ironclad", action: OpportunityAction.HOLD },
|
61
|
-
[Erc20SubType.maverickBoostedPosition]: { protocol: "maverick", action: OpportunityAction.POOL },
|
62
|
-
[Erc20SubType.zkSwapThreePool]: { protocol: "zk-swap", action: OpportunityAction.POOL },
|
63
|
-
[Erc20SubType.maha]: { protocol: "maha", action: OpportunityAction.HOLD },
|
64
|
-
[Erc20SubType.tempest]: { protocol: "tempest", action: OpportunityAction.POOL },
|
65
|
-
[Erc20SubType.pendleYT]: { protocol: "pendle", action: OpportunityAction.HOLD },
|
66
|
-
[Erc20SubType.pancakeswap]: { protocol: "pancake-swap", action: OpportunityAction.POOL },
|
67
|
-
[Erc20SubType.tempestStaking]: { protocol: "tempest", action: OpportunityAction.HOLD },
|
68
|
-
[Erc20SubType.holdstation]: { protocol: "holdstation", action: OpportunityAction.HOLD },
|
69
|
-
[Erc20SubType.noLinkVault]: { protocol: undefined, action: OpportunityAction.HOLD },
|
70
|
-
[Erc20SubType.cpmmGamma]: { protocol: "gammaswap", action: OpportunityAction.POOL },
|
71
|
-
[Erc20SubType.crosscurve]: { protocol: "crosscurve", action: OpportunityAction.POOL },
|
72
|
-
[Erc20SubType.curveNPool]: { protocol: "curve", action: OpportunityAction.POOL },
|
73
|
-
[Erc20SubType.vicuna]: { protocol: "vicuna", action: OpportunityAction.POOL },
|
74
|
-
[Erc20SubType.traderJoe]: { protocol: "trader-joe", action: OpportunityAction.HOLD },
|
75
|
-
[Erc20SubType.avalon_lending]: { protocol: "avalon", action: OpportunityAction.HOLD },
|
76
|
-
[Erc20SubType.avalon_borrowing]: { protocol: "avalon", action: OpportunityAction.HOLD },
|
77
|
-
[Erc20SubType.satlayer]: { protocol: "satlayer", action: OpportunityAction.HOLD },
|
78
|
-
[Erc20SubType.veda]: { protocol: "veda", action: OpportunityAction.HOLD },
|
79
|
-
[Erc20SubType.superlend_borrowing]: { protocol: "superlend", action: OpportunityAction.BORROW },
|
80
|
-
[Erc20SubType.superlend_lending]: { protocol: "superlend", action: OpportunityAction.LEND },
|
81
|
-
[Erc20SubType.cian]: { protocol: "cian", action: OpportunityAction.HOLD },
|
82
|
-
[Erc20SubType.concrete]: { protocol: "concrete", action: OpportunityAction.HOLD },
|
83
|
-
[Erc20SubType.lendle_borrowing]: { protocol: "lendle", action: OpportunityAction.BORROW },
|
84
|
-
[Erc20SubType.lendle_lending]: { protocol: "lendle", action: OpportunityAction.LEND },
|
85
|
-
[Erc20SubType.takotako_borrowing]: { protocol: "tako-tako", action: OpportunityAction.BORROW },
|
86
|
-
[Erc20SubType.takotako_lending]: { protocol: "tako-tako", action: OpportunityAction.LEND },
|
87
|
-
[Erc20SubType.equalizer_gauge]: { protocol: "equalizer", action: OpportunityAction.HOLD },
|
88
|
-
[Erc20SubType.vicuna_lending]: { protocol: "vicuna", action: OpportunityAction.LEND },
|
89
|
-
[Erc20SubType.vicuna_borrowing]: { protocol: "vicuna", action: OpportunityAction.BORROW },
|
90
|
-
[Erc20SubType.spectra_lpt]: { protocol: "spectra", action: OpportunityAction.POOL },
|
91
|
-
[Erc20SubType.spectra_yt]: { protocol: "spectra", action: OpportunityAction.POOL },
|
92
|
-
[Erc20SubType.rfx_slv]: { protocol: "rfx", action: OpportunityAction.POOL },
|
93
|
-
[Erc20SubType.hourglass]: { protocol: "hourglass", action: OpportunityAction.HOLD },
|
94
|
-
[Erc20SubType.katana]: { protocol: "katana", action: OpportunityAction.POOL },
|
95
|
-
[Erc20SubType.punchswap]: { protocol: "punchswap", action: OpportunityAction.POOL },
|
96
|
-
[Erc20SubType.balancerV3]: { protocol: "balancer", action: OpportunityAction.POOL },
|
97
|
-
[Erc20SubType.hanji_liquidity_vault_token]: { protocol: "hanji", action: OpportunityAction.POOL },
|
98
|
-
[Erc20SubType.xU308]: { protocol: "uranium", action: OpportunityAction.HOLD },
|
99
|
-
[Erc20SubType.stability]: {
|
100
|
-
protocol: "stability",
|
101
|
-
action: OpportunityAction.HOLD,
|
102
|
-
},
|
103
|
-
[Erc20SubType.stability_lending]: {
|
104
|
-
protocol: "stability",
|
105
|
-
action: OpportunityAction.LEND,
|
106
|
-
},
|
107
|
-
[Erc20SubType.bunniV2]: {
|
108
|
-
protocol: "bunni",
|
109
|
-
action: OpportunityAction.HOLD,
|
110
|
-
},
|
111
|
-
[Erc20SubType.beratrax_vault]: {
|
112
|
-
protocol: "beratrax",
|
113
|
-
action: OpportunityAction.HOLD,
|
114
|
-
},
|
115
|
-
[Erc20SubType.beraborrow_gauge]: {
|
116
|
-
protocol: "beraborrow",
|
117
|
-
action: OpportunityAction.HOLD,
|
118
|
-
},
|
119
|
-
[Erc20SubType.xlend_lending]: {
|
120
|
-
protocol: "xlend",
|
121
|
-
action: OpportunityAction.LEND,
|
122
|
-
},
|
123
|
-
[Erc20SubType.xlend_borrowing]: {
|
124
|
-
protocol: "xlend",
|
125
|
-
action: OpportunityAction.BORROW,
|
126
|
-
},
|
127
|
-
[Erc20SubType.curve_gauge]: {
|
128
|
-
protocol: "curve",
|
129
|
-
action: OpportunityAction.POOL,
|
130
|
-
},
|
131
|
-
[Erc20SubType.curveTricrypto]: {
|
132
|
-
protocol: "curve",
|
133
|
-
action: OpportunityAction.POOL,
|
134
|
-
},
|
135
|
-
[Erc20SubType.sake_borrowing]: {
|
136
|
-
protocol: "sake",
|
137
|
-
action: OpportunityAction.BORROW,
|
138
|
-
},
|
139
|
-
[Erc20SubType.sake_lending]: {
|
140
|
-
protocol: "sake",
|
141
|
-
action: OpportunityAction.LEND,
|
142
|
-
},
|
143
|
-
[Erc20SubType.gamma]: {
|
144
|
-
protocol: "gamma",
|
145
|
-
action: OpportunityAction.POOL,
|
146
|
-
},
|
147
|
-
[Erc20SubType.hyperswap]: {
|
148
|
-
protocol: "hyperswap",
|
149
|
-
action: OpportunityAction.POOL,
|
150
|
-
},
|
151
|
-
[Erc20SubType.hypurrfi_isolated_market]: {
|
152
|
-
protocol: "hypurrfi",
|
153
|
-
action: OpportunityAction.LEND,
|
154
|
-
},
|
155
|
-
};
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import { TokenService } from "@/modules/v4/token/token.service";
|
2
|
-
import { OpportunityAction } from "@db/api";
|
3
|
-
import { NETWORK_LABELS } from "@sdk";
|
4
|
-
export class AjnaMetadata {
|
5
|
-
async build(campaign) {
|
6
|
-
const { params, computeChainId, subType } = campaign;
|
7
|
-
try {
|
8
|
-
const [collateral, quote] = await TokenService.findManyOrCreate([
|
9
|
-
{
|
10
|
-
chainId: computeChainId,
|
11
|
-
address: params.collateralToken,
|
12
|
-
},
|
13
|
-
{
|
14
|
-
chainId: computeChainId,
|
15
|
-
address: params.quoteToken,
|
16
|
-
},
|
17
|
-
]);
|
18
|
-
if (!collateral || !quote)
|
19
|
-
throw new Error("Failed to fetch tokens");
|
20
|
-
const market = `${params.symbolQuoteToken}/${collateral?.symbol}`;
|
21
|
-
const subtypes = [
|
22
|
-
{ name: `Supply ${collateral?.symbol} on ${market}`, action: OpportunityAction.LEND },
|
23
|
-
{ name: `Borrow ${quote?.symbol} on ${market}`, action: OpportunityAction.BORROW },
|
24
|
-
];
|
25
|
-
const subtype = subtypes[subType ?? 0];
|
26
|
-
return {
|
27
|
-
action: subtype.action,
|
28
|
-
name: subtype.name,
|
29
|
-
tokens: [
|
30
|
-
{ chainId: computeChainId, address: collateral.address },
|
31
|
-
{ chainId: computeChainId, address: quote.address },
|
32
|
-
],
|
33
|
-
mainProtocol: "ajna",
|
34
|
-
depositUrl: AjnaMetadata.generateUrl(computeChainId, params),
|
35
|
-
};
|
36
|
-
}
|
37
|
-
catch (_err) {
|
38
|
-
const market = `${params.symbolQuoteToken}/${params.symbolCollateralToken}`;
|
39
|
-
const subtypes = [
|
40
|
-
{ name: `Supply ${params.symbolCollateralToken} on ${market}`, action: OpportunityAction.LEND },
|
41
|
-
{ name: `Borrow ${params.symbolQuoteToken} on ${market}`, action: OpportunityAction.BORROW },
|
42
|
-
];
|
43
|
-
const subtype = subtypes[subType ?? 0];
|
44
|
-
return {
|
45
|
-
action: subtype.action,
|
46
|
-
name: subtype.name,
|
47
|
-
tokens: [
|
48
|
-
{ chainId: computeChainId, address: params.collateralToken },
|
49
|
-
{ chainId: computeChainId, address: params.quoteToken },
|
50
|
-
],
|
51
|
-
mainProtocol: "ajna",
|
52
|
-
depositUrl: AjnaMetadata.generateUrl(computeChainId, params),
|
53
|
-
};
|
54
|
-
}
|
55
|
-
}
|
56
|
-
static generateUrl(computeChainId, params) {
|
57
|
-
return `https://ajnafi.com/${NETWORK_LABELS[computeChainId].toLowerCase()}/pools/${params.poolId}`;
|
58
|
-
}
|
59
|
-
}
|