@merkl/api 0.20.106 → 0.20.109
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/constants.d.ts +1 -23
- package/dist/src/constants.js +1 -36
- package/dist/src/eden/index.d.ts +347 -226
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Ajna.js +1 -1
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Clamm.js +4 -4
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Compound.js +2 -2
- package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.js +101 -0
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Dolomite.js +1 -1
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/ERC721.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/ERCMultiToken.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/EigenLayer.js +1 -1
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Erc20.d.ts +1 -1
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Erc20.js +10 -10
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Erc20Snapshot.js +1 -1
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/EventBased.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Morpho.js +1 -1
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Radiant.js +3 -3
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Silo.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/UniswapV4.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Vest.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/fetchA51Strategies.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getDolomiteMarkets.js +2 -2
- package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getEulerV2Vaults.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/GenericProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/factoryFinder.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/factoryFinder.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/hardcoded.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/hardcoded.js +1 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +2 -0
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/ownerFinder.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AaveProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AnglesLiquid.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AssetProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AssetProcessor.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AuraProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BEXRewardGaugeProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BalancerGaugeProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BalancerPoolProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BalancerV3PoolProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BeefyProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BunniV2Processor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/CompoundProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/ERC4626Processor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EnzymeProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EqualizerGaugeProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EulerBorrowProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EulerLendProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/FluidProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/FraxProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/FraxProcessor.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/GammaALMProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/GammaProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/GearboxProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/HanjiVaultProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/HoldStationProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/HourglassProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/MaverickBPProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/MetamorphoProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/NoLinkVaultProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/NoLinkVaultProcessor.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/PendleProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/PendleYTProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/RadiantProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/RfxProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/Satlayer.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SpectraProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SpectraProcessor.js +3 -3
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SpectraYTProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SpectraYTProcessor.js +3 -3
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SpliceProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SturdySiloProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/TempestVaultProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/TempestVaultProcessor.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/TemplateProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/TorosProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/UniswapProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/VicunaProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/WoofiProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/ZkSwapThreePoolProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/curveNPoolProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/curveProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/curveProcessor.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/processorMapping.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/processorMapping.js +3 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/stakedCurveProcessor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/stakedCurveProcessor.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/xU308Processor.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesPrices.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesPrices.js +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound1.js +5 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound2.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound3.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound4.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/tokenTypeStruct.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/tokenTypeToProtocolAndAction.d.ts +1 -1
- package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/tokenTypeToProtocolAndAction.js +3 -1
- package/dist/src/engine/{opportunityMetadata/implementations/Ajna.d.ts → implementations/Ajna/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Ajna.js → implementations/Ajna/metadata.js} +4 -3
- package/dist/src/engine/implementations/Ajna/tvl.d.ts +7 -0
- package/dist/src/engine/{campaignTVL/implementations/Ajna.js → implementations/Ajna/tvl.js} +9 -9
- package/dist/src/engine/{opportunityMetadata/implementations/Ambient.d.ts → implementations/Ambient/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Ambient.js → implementations/Ambient/metadata.js} +2 -1
- package/dist/src/engine/{campaignTVL/implementations/Ambiant.d.ts → implementations/Ambient/tvl.d.ts} +3 -3
- package/dist/src/engine/{campaignTVL/implementations/Ambiant.js → implementations/Ambient/tvl.js} +2 -2
- package/dist/src/engine/{opportunityMetadata/implementations/Badger.d.ts → implementations/Badger/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Badger.js → implementations/Badger/metadata.js} +2 -1
- package/dist/src/engine/{opportunityMetadata/implementations/Clamm.d.ts → implementations/Clamm/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Clamm.js → implementations/Clamm/metadata.js} +2 -1
- package/dist/src/engine/{opportunityMetadata/implementations/Compound.d.ts → implementations/Compound/metadata.d.ts} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/Compound.js → implementations/Compound/metadata.js} +3 -2
- package/dist/src/engine/{opportunityMetadata/implementations/CompoundV3.d.ts → implementations/CompoundV3/metadata.d.ts} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/CompoundV3.js → implementations/CompoundV3/metadata.js} +4 -3
- package/dist/src/engine/implementations/Default/metadata.d.ts +13 -0
- package/dist/src/engine/{opportunityMetadata/implementations/Default.js → implementations/Default/metadata.js} +3 -2
- package/dist/src/engine/{opportunityMetadata/implementations/Dolomite.d.ts → implementations/Dolomite/metadata.d.ts} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/Dolomite.js → implementations/Dolomite/metadata.js} +3 -2
- package/dist/src/engine/{opportunityMetadata/implementations/EigenLayer.d.ts → implementations/EigenLayer/metadata.d.ts} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/EigenLayer.js → implementations/EigenLayer/metadata.js} +2 -1
- package/dist/src/engine/implementations/Encompassing/metadata.d.ts +16 -0
- package/dist/src/engine/{opportunityMetadata/implementations/Encompassing.js → implementations/Encompassing/metadata.js} +4 -3
- package/dist/src/engine/implementations/Erc20/metadata.d.ts +29 -0
- package/dist/src/engine/{opportunityMetadata/implementations/Erc20/index.js → implementations/Erc20/metadata.js} +19 -14
- package/dist/src/engine/{campaignTVL/implementations/Erc20/computeSubTypes.d.ts → implementations/Erc20/subTypes/detect.d.ts} +2 -2
- package/dist/src/engine/{campaignTVL/implementations/Erc20/computeSubTypes.js → implementations/Erc20/subTypes/detect.js} +6 -6
- package/dist/src/engine/implementations/Erc20/subTypes/factories.d.ts +5 -0
- package/dist/src/engine/implementations/Erc20/subTypes/factories.js +33 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.js +21 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.js +43 -0
- package/dist/src/engine/{campaignTVL/implementations/Erc20/Erc20SubType.d.ts → implementations/Erc20/subTypes/index.d.ts} +2 -0
- package/dist/src/engine/{campaignTVL/implementations/Erc20/Erc20SubType.js → implementations/Erc20/subTypes/index.js} +2 -0
- package/dist/src/engine/implementations/Erc20/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/tvl.js +98 -0
- package/dist/src/engine/implementations/Erc20Snapshot/metadata.d.ts +15 -0
- package/dist/src/engine/{opportunityMetadata/implementations/Erc20Snapshot.js → implementations/Erc20Snapshot/metadata.js} +2 -1
- package/dist/src/engine/implementations/Erc721/metadata.d.ts +17 -0
- package/dist/src/engine/{opportunityMetadata/implementations/ERC721.js → implementations/Erc721/metadata.js} +3 -2
- package/dist/src/engine/implementations/ErcMultiToken/metadata.d.ts +29 -0
- package/dist/src/engine/{opportunityMetadata/implementations/ERCMultiToken.js → implementations/ErcMultiToken/metadata.js} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/Euler.d.ts → implementations/Euler/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Euler.js → implementations/Euler/metadata.js} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/EventBased.d.ts → implementations/EventBased/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/EventBased.js → implementations/EventBased/metadata.js} +2 -1
- package/dist/src/engine/{opportunityMetadata/implementations/Hyperdrive.d.ts → implementations/Hyperdrive/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Hyperdrive.js → implementations/Hyperdrive/metadata.js} +3 -2
- package/dist/src/engine/{opportunityMetadata/implementations/Invalid.d.ts → implementations/Invalid/metadata.d.ts} +1 -1
- package/dist/src/engine/{opportunityMetadata/implementations/Ion.d.ts → implementations/Ion/metadata.d.ts} +4 -4
- package/dist/src/engine/{opportunityMetadata/implementations/Ion.js → implementations/Ion/metadata.js} +2 -1
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +24 -0
- package/dist/src/engine/{opportunityMetadata/implementations/JsonAirdrop.js → implementations/JsonAirdrop/metadata.js} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Morpho.d.ts → implementations/Morpho/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/Morpho.js → implementations/Morpho/metadata.js} +4 -1
- package/dist/src/engine/{opportunityMetadata/implementations/Radiant.d.ts → implementations/Radiant/metadata.d.ts} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/Radiant.js → implementations/Radiant/metadata.js} +4 -1
- package/dist/src/engine/{opportunityMetadata/implementations/Silo.d.ts → implementations/Silo/metadata.d.ts} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/Silo.js → implementations/Silo/metadata.js} +4 -1
- package/dist/src/engine/{opportunityMetadata/implementations/UniswapV4.d.ts → implementations/UniswapV4/metadata.d.ts} +4 -3
- package/dist/src/engine/{opportunityMetadata/implementations/UniswapV4.js → implementations/UniswapV4/metadata.js} +2 -1
- package/dist/src/engine/implementations/UniswapV4/tvl.d.ts +7 -0
- package/dist/src/engine/{campaignTVL/implementations/UniswapV4.js → implementations/UniswapV4/tvl.js} +11 -11
- package/dist/src/engine/{opportunityMetadata/implementations/Vest.d.ts → implementations/Vest/metadata.d.ts} +5 -4
- package/dist/src/engine/{opportunityMetadata/implementations/Vest.js → implementations/Vest/metadata.js} +3 -2
- package/dist/src/engine/metadata/factory.js +71 -0
- package/dist/src/engine/tvl/factory.d.ts +3 -0
- package/dist/src/engine/tvl/factory.js +23 -0
- package/dist/src/hooks/checkQueryAddressValidity.js +1 -1
- package/dist/src/hooks/checkQueryChainIdValidity.js +1 -1
- package/dist/src/index.d.ts +123 -80
- package/dist/src/jobs/dynamic-data.js +1 -1
- package/dist/src/jobs/update-analytics.js +290 -34
- package/dist/src/jobs/update-euler-vaults.js +1 -1
- package/dist/src/libs/computeFee.js +1 -1
- package/dist/src/libs/deprecated-merklv3/index.js +1 -1
- package/dist/src/libs/getTokensList.js +1 -1
- package/dist/src/libs/merklChainData.js +1 -1
- package/dist/src/libs/positions/EigenLayer/index.d.ts +1 -1
- package/dist/src/libs/positions/ajna/index.d.ts +1 -1
- package/dist/src/libs/positions/badger/index.d.ts +1 -1
- package/dist/src/libs/positions/clamm/index.js +3 -3
- package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.js +1 -1
- package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.js +1 -1
- package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.js +1 -1
- package/dist/src/libs/positions/compound/index.d.ts +1 -1
- package/dist/src/libs/positions/dolomite/index.d.ts +1 -1
- package/dist/src/libs/positions/erc20/index.d.ts +1 -1
- package/dist/src/libs/positions/erc20/index.js +0 -1
- package/dist/src/libs/positions/euler/index.d.ts +1 -1
- package/dist/src/libs/positions/euler/index.js +0 -1
- package/dist/src/libs/positions/index.js +1 -1
- package/dist/src/libs/positions/morpho/index.d.ts +1 -1
- package/dist/src/libs/positions/prepareFetch.js +1 -1
- package/dist/src/libs/positions/silo/index.d.ts +1 -1
- package/dist/src/libs/tokens/balances.d.ts +1 -1
- package/dist/src/libs/tokens/balances.js +1 -1
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +42 -15
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +7 -9
- package/dist/src/modules/v4/campaign/campaign.repository.js +20 -27
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +47 -17
- package/dist/src/modules/v4/campaign/campaign.service.js +51 -38
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +67 -22
- package/dist/src/modules/v4/campaign/campaign.test.controller.js +32 -9
- package/dist/src/modules/v4/chain/chain.controller.d.ts +3 -1
- package/dist/src/modules/v4/chain/chain.repository.d.ts +8 -2
- package/dist/src/modules/v4/chain/chain.repository.js +1 -2
- package/dist/src/modules/v4/chain/chain.service.d.ts +16 -2
- package/dist/src/modules/v4/chain/chain.service.js +3 -3
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +49 -13
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +4 -4
- package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +2 -1
- package/dist/src/modules/v4/opportunity/opportunity.converter.js +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +8 -8
- package/dist/src/modules/v4/opportunity/opportunity.service.js +16 -32
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +7 -7
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +3 -3
- package/dist/src/modules/v4/programPayload/programPayload.model.js +2 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +279 -4
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +295 -3
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/router.d.ts +123 -80
- package/dist/src/modules/v4/router.js +0 -2
- package/dist/src/modules/v4/uniswap/uniswap.service.js +1 -1
- package/dist/src/routes/v3/campaigns.js +3 -3
- package/dist/src/routes/v3/compoundV2.js +1 -1
- package/dist/src/routes/v3/createCampaign.js +1 -1
- package/dist/src/routes/v3/dolomite.js +1 -1
- package/dist/src/routes/v3/euler.js +1 -1
- package/dist/src/routes/v3/fetch.js +1 -1
- package/dist/src/routes/v3/lostyield.js +3 -3
- package/dist/src/routes/v3/merkl.js +2 -2
- package/dist/src/routes/v3/multiChainPositions.js +1 -1
- package/dist/src/routes/v3/overview.js +1 -1
- package/dist/src/routes/v3/poolInfo.js +2 -2
- package/dist/src/routes/v3/rewardsReport.js +1 -1
- package/dist/src/scripts/reparse-opportunities.js +5 -3
- package/dist/src/utils/decodeCalls.d.ts +1 -1
- package/dist/src/utils/decodeCalls.js +3 -1
- package/dist/src/utils/encodeCalls.d.ts +1 -1
- package/dist/src/utils/encodeCalls.js +3 -1
- package/dist/src/utils/error.d.ts +6 -6
- package/dist/src/utils/generateCardName.d.ts +1 -1
- package/dist/src/utils/generateCardName.js +3 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/engine/campaignTVL/factory.d.ts +0 -3
- package/dist/src/engine/campaignTVL/factory.js +0 -23
- package/dist/src/engine/campaignTVL/implementations/Ajna.d.ts +0 -7
- package/dist/src/engine/campaignTVL/implementations/Erc20/factory.d.ts +0 -3
- package/dist/src/engine/campaignTVL/implementations/Erc20/factory.js +0 -13
- package/dist/src/engine/campaignTVL/implementations/Erc20/index.d.ts +0 -6
- package/dist/src/engine/campaignTVL/implementations/Erc20/index.js +0 -34
- package/dist/src/engine/campaignTVL/implementations/UniswapV4.d.ts +0 -7
- package/dist/src/engine/dynamicData/implementations/CompoundV3.js +0 -69
- package/dist/src/engine/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +0 -2
- package/dist/src/engine/opportunityMetadata/factory.js +0 -71
- package/dist/src/engine/opportunityMetadata/implementations/Default.d.ts +0 -13
- package/dist/src/engine/opportunityMetadata/implementations/ERC721.d.ts +0 -16
- package/dist/src/engine/opportunityMetadata/implementations/ERCMultiToken.d.ts +0 -28
- package/dist/src/engine/opportunityMetadata/implementations/Encompassing.d.ts +0 -15
- package/dist/src/engine/opportunityMetadata/implementations/Erc20/index.d.ts +0 -18
- package/dist/src/engine/opportunityMetadata/implementations/Erc20Snapshot.d.ts +0 -14
- package/dist/src/engine/opportunityMetadata/implementations/JsonAirdrop.d.ts +0 -23
- package/dist/src/entities/campaign.d.ts +0 -58
- package/dist/src/entities/campaign.js +0 -136
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +0 -51
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +0 -19
- package/dist/src/modules/v4/dynamicData/dynamicData.repository.d.ts +0 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.repository.js +0 -1
- package/dist/src/types/returnTypes.d.ts +0 -19
- package/dist/src/types/returnTypes.js +0 -1
- package/dist/src/types/utils.d.ts +0 -5
- package/dist/src/types/utils.js +0 -1
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/factory.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/factory.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Ajna.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Badger.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Badger.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Clamm.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Compound.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/CompoundV3.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Dolomite.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/ERC721.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/ERCMultiToken.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/EigenLayer.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Encompassing.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Encompassing.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Erc20Snapshot.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/EventBased.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Hyperdrive.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Hyperdrive.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Morpho.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Radiant.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Silo.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/UniswapV4.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/Vest.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/default.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/implementations/default.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/fetchA51Strategies.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/fetchClamInfo.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/fetchClamInfo.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/fetchLogs.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/fetchLogs.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getCompV2ForksVaults.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getCompV2ForksVaults.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getContractCreationBlock.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getContractCreationBlock.js +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getDolomiteMarkets.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getEulerV2Vaults.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getFixedApr.d.ts +0 -0
- /package/dist/src/engine/{dynamicData → deprecated/dynamicData}/utils/getFixedApr.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/GenericProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/eulerVaultNames.d.ts +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/eulerVaultNames.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/getBlacklistedSupply.d.ts +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/getBlacklistedSupply.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/metamorphoTvl.d.ts +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/metamorphoTvl.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/spliceTVL.d.ts +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/helpers/spliceTVL.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AaveProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AnglesLiquid.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/AuraProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BEXRewardGaugeProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BalancerGaugeProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BalancerPoolProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BalancerV3PoolProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BeefyProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/BunniV2Processor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/CompoundProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/ERC4626Processor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EnzymeProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EqualizerGaugeProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EulerBorrowProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/EulerLendProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/FluidProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/GammaALMProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/GammaProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/GearboxProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/HanjiVaultProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/HoldStationProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/HourglassProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/MaverickBPProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/MetamorphoProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/PendleProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/PendleYTProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/RadiantProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/RfxProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/Satlayer.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SpliceProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/SturdySiloProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/TemplateProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/TorosProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/UniswapProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/VicunaProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/WoofiProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/ZkSwapThreePoolProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/curveNPoolProcessor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/implementations/xU308Processor.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound1.d.ts +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound2.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound3.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/subtypesRound4.js +0 -0
- /package/dist/src/engine/{erc20SubTypeProcessors → deprecated/erc20SubTypeProcessors}/tokenTypeStruct.js +0 -0
- /package/dist/src/engine/{opportunityMetadata/implementations/Invalid.js → implementations/Invalid/metadata.js} +0 -0
- /package/dist/src/engine/{opportunityMetadata → metadata}/factory.d.ts +0 -0
@@ -13,28 +13,44 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
13
13
|
macroFn: {};
|
14
14
|
}, {
|
15
15
|
campaigns: {
|
16
|
-
"dry-
|
16
|
+
"dry-runtvl": {
|
17
17
|
":campaignId": {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
18
|
+
get: {
|
19
|
+
body: unknown;
|
20
|
+
params: {
|
21
|
+
campaignId: string;
|
22
|
+
};
|
23
|
+
query: unknown;
|
24
|
+
headers: {
|
25
|
+
authorization: string;
|
26
|
+
};
|
27
|
+
response: {
|
28
|
+
200: unknown[];
|
29
|
+
};
|
30
|
+
};
|
31
|
+
};
|
32
|
+
};
|
33
|
+
} & {
|
34
|
+
"dry-runtvls": {
|
35
|
+
":opportunityId": {
|
36
|
+
get: {
|
37
|
+
body: unknown;
|
38
|
+
params: {
|
39
|
+
opportunityId: string;
|
40
|
+
};
|
41
|
+
query: unknown;
|
42
|
+
headers: {
|
43
|
+
authorization: string;
|
44
|
+
};
|
45
|
+
response: {
|
46
|
+
200: unknown[];
|
31
47
|
};
|
32
48
|
};
|
33
49
|
};
|
34
50
|
};
|
35
51
|
} & {
|
36
52
|
"dry-run": {
|
37
|
-
|
53
|
+
tvls: {
|
38
54
|
list: {
|
39
55
|
post: {
|
40
56
|
body: string[];
|
@@ -52,7 +68,7 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
52
68
|
};
|
53
69
|
} & {
|
54
70
|
"dry-run": {
|
55
|
-
|
71
|
+
tvl: {
|
56
72
|
post: {
|
57
73
|
body: {
|
58
74
|
id?: string | undefined;
|
@@ -79,6 +95,35 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
79
95
|
};
|
80
96
|
};
|
81
97
|
};
|
98
|
+
} & {
|
99
|
+
"dry-run": {
|
100
|
+
tvl: {
|
101
|
+
get: {
|
102
|
+
body: unknown;
|
103
|
+
params: {};
|
104
|
+
query: {
|
105
|
+
decimals?: number | undefined;
|
106
|
+
chainId: number;
|
107
|
+
tokenAddress: string;
|
108
|
+
rewardTokenAddress: string;
|
109
|
+
symbolRewardToken: string;
|
110
|
+
};
|
111
|
+
headers: {
|
112
|
+
authorization: string;
|
113
|
+
};
|
114
|
+
response: {
|
115
|
+
200: {
|
116
|
+
tvl: number;
|
117
|
+
totalSupply: number;
|
118
|
+
cardName: string;
|
119
|
+
blacklistedSupply: number;
|
120
|
+
priceTargetToken: number;
|
121
|
+
type: string;
|
122
|
+
};
|
123
|
+
};
|
124
|
+
};
|
125
|
+
};
|
126
|
+
};
|
82
127
|
} & {
|
83
128
|
"dry-run": {
|
84
129
|
metadata: {
|
@@ -143,11 +188,11 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
143
188
|
} & {
|
144
189
|
price?: number | null | undefined;
|
145
190
|
})[];
|
146
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "
|
147
|
-
depositUrl:
|
191
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
|
192
|
+
depositUrl: string | undefined;
|
148
193
|
explorerAddress: string | undefined;
|
149
194
|
tags: string[];
|
150
|
-
} | null;
|
195
|
+
} | null | undefined;
|
151
196
|
};
|
152
197
|
};
|
153
198
|
};
|
@@ -206,11 +251,11 @@ export declare const CampaignTestController: Elysia<"/campaigns", false, {
|
|
206
251
|
} & {
|
207
252
|
price?: number | null | undefined;
|
208
253
|
})[];
|
209
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "
|
210
|
-
depositUrl:
|
254
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
|
255
|
+
depositUrl: string | undefined;
|
211
256
|
explorerAddress: string | undefined;
|
212
257
|
tags: string[];
|
213
|
-
} | null;
|
258
|
+
} | null | undefined;
|
214
259
|
};
|
215
260
|
};
|
216
261
|
};
|
@@ -2,10 +2,11 @@ import { NotFoundError } from "@/errors";
|
|
2
2
|
import { InvalidParameter } from "@/errors/InvalidParameter.error";
|
3
3
|
import { BackOfficeGuard } from "@/guards/BackOffice.guard";
|
4
4
|
import { AuthorizationHeadersDto } from "@/guards/Engine.guard";
|
5
|
+
import { throwOnUnsupportedChainId } from "@/utils/throw";
|
5
6
|
import { Campaign as CampaignEnum } from "@sdk";
|
6
7
|
import Elysia from "elysia";
|
8
|
+
import { DynamicDataSourceIdentifier } from "../dynamicData/dynamicData.model";
|
7
9
|
import { DynamicDataService } from "../dynamicData/dynamicData.service";
|
8
|
-
import { OpportunityService } from "../opportunity";
|
9
10
|
import { OpportunityConvertorService } from "../opportunity/opportunity.converter";
|
10
11
|
import { CampaignConfigMinimal, CampaignUniqueDto, CampaignsDto } from "./campaign.model";
|
11
12
|
import { CampaignService } from "./campaign.service";
|
@@ -18,8 +19,8 @@ export const CampaignTestController = new Elysia({
|
|
18
19
|
headers: AuthorizationHeadersDto,
|
19
20
|
beforeHandle: BackOfficeGuard,
|
20
21
|
})
|
21
|
-
// ─── Test
|
22
|
-
.get("/:campaignId
|
22
|
+
// ─── Test TVL computation given a campaignId ───────────────────────
|
23
|
+
.get("tvl/:campaignId", async ({ params }) => {
|
23
24
|
const id = (await CampaignService.findMany({ campaignId: params.campaignId, test: true }))?.[0]?.id;
|
24
25
|
if (!id)
|
25
26
|
throw new NotFoundError();
|
@@ -27,8 +28,21 @@ export const CampaignTestController = new Elysia({
|
|
27
28
|
const campaignV3 = OpportunityConvertorService.convertV4CampaignToV3(CampaignEnum[campaign.type], CampaignService.format(campaign), campaign.Opportunity.identifier);
|
28
29
|
return await DynamicDataService.update(campaignV3.computeChainId, campaignV3.campaignType, [campaignV3], true);
|
29
30
|
})
|
30
|
-
// ─── Test
|
31
|
-
.
|
31
|
+
// ─── Test TVL computation given a campaignId ───────────────────────
|
32
|
+
.get("tvls/:opportunityId", async ({ params }) => {
|
33
|
+
const campaigns = (await CampaignService.findMany({
|
34
|
+
opportunityId: params.opportunityId,
|
35
|
+
status: "LIVE",
|
36
|
+
test: true,
|
37
|
+
withOpportunity: true,
|
38
|
+
items: 10_000,
|
39
|
+
})).map(campaign => OpportunityConvertorService.convertV4CampaignToV3(CampaignEnum[campaign.type], campaign, campaign.Opportunity.identifier));
|
40
|
+
if (!campaigns.length)
|
41
|
+
throw new NotFoundError("Opportunity not found");
|
42
|
+
return await DynamicDataService.update(campaigns[0]?.computeChainId, campaigns[0].campaignType, campaigns, true);
|
43
|
+
})
|
44
|
+
// ─── Test TVL computation with a list of campaignId ───────────────────────
|
45
|
+
.post("/tvls/list", async ({ body }) => {
|
32
46
|
const listCampaigns = [];
|
33
47
|
const type = undefined;
|
34
48
|
for (const campaignId of body) {
|
@@ -43,18 +57,27 @@ export const CampaignTestController = new Elysia({
|
|
43
57
|
throw new InvalidParameter("No campaign type found");
|
44
58
|
return await DynamicDataService.update(listCampaigns[0].computeChainId, listCampaigns[0].campaignType, listCampaigns, true);
|
45
59
|
}, { body: CampaignsDto })
|
46
|
-
// ─── Test
|
47
|
-
.post("/
|
60
|
+
// ─── Test TVL computation with campaign config ───────────────────────
|
61
|
+
.post("/tvl", async ({ body }) => {
|
48
62
|
const campaign = CampaignService.createFakeCampaign(body);
|
49
63
|
return await DynamicDataService.update(campaign.computeChainId, campaign.campaignType, [campaign], true);
|
50
64
|
}, {
|
51
65
|
body: CampaignConfigMinimal,
|
66
|
+
})
|
67
|
+
// ─── Test TVL computation with campaign config ───────────────────────
|
68
|
+
.get("/tvl", async ({ query }) => await DynamicDataService.queryERC20DynamicData(query.chainId, query.tokenAddress, query.rewardTokenAddress, query.symbolRewardToken, query.decimals), {
|
69
|
+
query: DynamicDataSourceIdentifier,
|
70
|
+
headers: AuthorizationHeadersDto,
|
71
|
+
beforeHandle: async ({ query, headers }) => {
|
72
|
+
await BackOfficeGuard({ headers });
|
73
|
+
throwOnUnsupportedChainId(query.chainId);
|
74
|
+
},
|
52
75
|
})
|
53
76
|
// ─── Test Opportunity creation through a campaign config ───────────────────────
|
54
77
|
// @dev Starts from the engine db to debug opportunity creation failing and preventing the api db to be filled
|
55
78
|
.post("/metadata", async ({ body }) => {
|
56
79
|
const engineCampaign = CampaignService.createFakeCampaignEngine(body);
|
57
|
-
return await
|
80
|
+
return await CampaignService.create(engineCampaign, true);
|
58
81
|
}, {
|
59
82
|
body: CampaignConfigMinimal,
|
60
83
|
})
|
@@ -69,7 +92,7 @@ export const CampaignTestController = new Elysia({
|
|
69
92
|
]);
|
70
93
|
if (!engineCampaigns.length)
|
71
94
|
throw new NotFoundError("Campaign not found in engine db");
|
72
|
-
return await
|
95
|
+
return await CampaignService.create(engineCampaigns[0], true);
|
73
96
|
}, {
|
74
97
|
query: CampaignUniqueDto,
|
75
98
|
}));
|
@@ -125,13 +125,15 @@ export declare const ChainController: Elysia<"/chains", false, {
|
|
125
125
|
};
|
126
126
|
response: {
|
127
127
|
200: {
|
128
|
-
name: string;
|
129
128
|
Explorer: {
|
130
129
|
id: string;
|
131
130
|
type: import("@db/api").$Enums.ExplorerType;
|
132
131
|
url: string;
|
133
132
|
chainId: number;
|
134
133
|
}[];
|
134
|
+
id: number;
|
135
|
+
name: string;
|
136
|
+
icon: string;
|
135
137
|
};
|
136
138
|
};
|
137
139
|
};
|
@@ -63,22 +63,28 @@ export declare class ChainRepository {
|
|
63
63
|
* @returns
|
64
64
|
*/
|
65
65
|
static create(data: CreateChainModel): Promise<{
|
66
|
-
name: string;
|
67
66
|
Explorer: {
|
68
67
|
id: string;
|
69
68
|
type: import("@db/api").$Enums.ExplorerType;
|
70
69
|
url: string;
|
71
70
|
chainId: number;
|
72
71
|
}[];
|
72
|
+
} & {
|
73
|
+
id: number;
|
74
|
+
name: string;
|
75
|
+
icon: string;
|
73
76
|
}>;
|
74
77
|
static findUniqueOrThrow(id: number): Promise<{
|
75
|
-
name: string;
|
76
78
|
Explorer: {
|
77
79
|
id: string;
|
78
80
|
type: import("@db/api").$Enums.ExplorerType;
|
79
81
|
url: string;
|
80
82
|
chainId: number;
|
81
83
|
}[];
|
84
|
+
} & {
|
85
|
+
id: number;
|
86
|
+
name: string;
|
87
|
+
icon: string;
|
82
88
|
}>;
|
83
89
|
static update(id: number, data: UpdateChainModel): Promise<{
|
84
90
|
id: number;
|
@@ -24,6 +24,18 @@ export declare abstract class ChainService {
|
|
24
24
|
name: string;
|
25
25
|
icon: string;
|
26
26
|
})[]>;
|
27
|
+
static findUniqueOrThrow(id: number): Promise<{
|
28
|
+
Explorer: {
|
29
|
+
id: string;
|
30
|
+
type: import("@db/api").$Enums.ExplorerType;
|
31
|
+
url: string;
|
32
|
+
chainId: number;
|
33
|
+
}[];
|
34
|
+
} & {
|
35
|
+
id: number;
|
36
|
+
name: string;
|
37
|
+
icon: string;
|
38
|
+
}>;
|
27
39
|
static countMany(query: ChainSearchDto): Promise<number>;
|
28
40
|
/** List all chainIds available in the databse
|
29
41
|
* @warning some chains may not be fully integrated yet
|
@@ -35,13 +47,16 @@ export declare abstract class ChainService {
|
|
35
47
|
*/
|
36
48
|
static getSupportedIds(): Promise<number[]>;
|
37
49
|
static create(chain: CreateChainModel): Promise<{
|
38
|
-
name: string;
|
39
50
|
Explorer: {
|
40
51
|
id: string;
|
41
52
|
type: import("@db/api").$Enums.ExplorerType;
|
42
53
|
url: string;
|
43
54
|
chainId: number;
|
44
55
|
}[];
|
56
|
+
} & {
|
57
|
+
id: number;
|
58
|
+
name: string;
|
59
|
+
icon: string;
|
45
60
|
}>;
|
46
61
|
static update(id: number, data: UpdateChainModel): Promise<{
|
47
62
|
id: number;
|
@@ -53,5 +68,4 @@ export declare abstract class ChainService {
|
|
53
68
|
name: string;
|
54
69
|
icon: string;
|
55
70
|
}>;
|
56
|
-
static getName(id: number): Promise<string>;
|
57
71
|
}
|
@@ -12,6 +12,9 @@ export class ChainService {
|
|
12
12
|
return ChainRepository.findMany(query);
|
13
13
|
return await CacheService.wrap(TTLPresets.MIN_10, ChainRepository.findMany, query);
|
14
14
|
}
|
15
|
+
static async findUniqueOrThrow(id) {
|
16
|
+
return await ChainRepository.findUniqueOrThrow(id);
|
17
|
+
}
|
15
18
|
static async countMany(query) {
|
16
19
|
return await ChainRepository.countMany(query);
|
17
20
|
}
|
@@ -47,7 +50,4 @@ export class ChainService {
|
|
47
50
|
static async updateDailyRewards(id, dailyRewards) {
|
48
51
|
return await ChainRepository.update(id, { dailyRewards });
|
49
52
|
}
|
50
|
-
static async getName(id) {
|
51
|
-
return (await ChainRepository.findUniqueOrThrow(id)).name;
|
52
|
-
}
|
53
53
|
}
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { dynamicDataBuilderFactory } from "@/engine/deprecated/dynamicData/factory";
|
2
|
+
import { hasFixedAprConfig } from "@/engine/deprecated/dynamicData/utils/getFixedApr";
|
3
|
+
import { campaignTVLBuilderFactory } from "@/engine/tvl/factory";
|
3
4
|
import { HttpError } from "@/errors";
|
4
5
|
import { InvalidParameter } from "@/errors/InvalidParameter.error";
|
5
6
|
import { OpportunityRepository } from "@/modules/v4/opportunity/opportunity.repository";
|
@@ -13,6 +14,7 @@ import { Campaign as CampaignEnum, DAY, NETWORK_LABELS, } from "@sdk";
|
|
13
14
|
import moment from "moment";
|
14
15
|
import { AprService } from "../apr";
|
15
16
|
import { CampaignService } from "../campaign";
|
17
|
+
import { ComputedValueService } from "../computedValue/computedValue.service";
|
16
18
|
import { TokenService } from "../token/token.service";
|
17
19
|
export class DynamicDataService {
|
18
20
|
/**
|
@@ -62,29 +64,52 @@ export class DynamicDataService {
|
|
62
64
|
breakdowns: [],
|
63
65
|
};
|
64
66
|
for (const record of recordsForOpportunity) {
|
67
|
+
const { startTimestamp, endTimestamp, rewardToken: rewardTokenAddress, campaignParameters } = record.campaign;
|
65
68
|
// 2.b.1 TVL of the opportunity is the max of all TVLs of the campaigns
|
66
69
|
if (record.tvl > tvl.total) {
|
67
70
|
tvl.total = record.tvl;
|
68
71
|
tvl.breakdowns = record.tvlBreakdown;
|
69
72
|
}
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
+
if (!!record.displayTvl && record.displayTvl > tvl.total) {
|
74
|
+
tvl.total = record.displayTvl;
|
75
|
+
}
|
73
76
|
try {
|
74
77
|
// 2.b.2 Daily rewards is the sum of all daily rewards of the campaigns
|
75
78
|
const timespan = endTimestamp - startTimestamp;
|
76
79
|
const isWithinTimespan = moment().unix() > startTimestamp && moment().unix() < endTimestamp;
|
77
80
|
const dayspan = Math.max(1, Math.floor(timespan / DAY));
|
78
|
-
|
79
|
-
let
|
81
|
+
let dailyAmount = isWithinTimespan ? BigInt(record.campaign.amount) / BigInt(dayspan) : BigInt(0);
|
82
|
+
let rewardToken;
|
80
83
|
try {
|
81
|
-
|
84
|
+
rewardToken = await TokenService.findUniqueOrThrow({
|
85
|
+
address: rewardTokenAddress,
|
86
|
+
chainId: record.campaign.chainId,
|
87
|
+
});
|
82
88
|
}
|
83
89
|
catch {
|
84
|
-
await TokenService.findManyOrCreate([{ address:
|
85
|
-
|
90
|
+
await TokenService.findManyOrCreate([{ address: rewardTokenAddress, chainId: record.campaign.chainId }]);
|
91
|
+
rewardToken = await TokenService.findUniqueOrThrow({
|
92
|
+
address: rewardTokenAddress,
|
93
|
+
chainId: record.campaign.chainId,
|
94
|
+
});
|
95
|
+
}
|
96
|
+
let campaignDailyValue = await TokenService.getValueByTokenId(TokenService.hashId({ address: rewardTokenAddress, chainId: record.campaign.chainId }), dailyAmount);
|
97
|
+
// Fixed APR campaigns
|
98
|
+
if (hasFixedAprConfig(campaignParameters)) {
|
99
|
+
const { targetTokenPricing, rewardTokenPricing, apr: fixedApr } = campaignParameters;
|
100
|
+
const targetApr = Number(fixedApr);
|
101
|
+
if (targetTokenPricing && rewardTokenPricing) {
|
102
|
+
// Case 1: Fixed $ amount of reward per $ of liquidity
|
103
|
+
campaignDailyValue = targetApr * tvl.total;
|
104
|
+
dailyAmount = BigInt((campaignDailyValue / (rewardToken.price ?? 1)) * 10 ** rewardToken.decimals);
|
105
|
+
}
|
106
|
+
if (targetTokenPricing && !rewardTokenPricing) {
|
107
|
+
// Case 2: Fixed # amount of reward per $ of liquidity
|
108
|
+
// Return 0 if reward token price is invalid
|
109
|
+
campaignDailyValue = !rewardToken.price ? 0 : targetApr * rewardToken.price * tvl.total;
|
110
|
+
dailyAmount = BigInt((campaignDailyValue / (rewardToken.price ?? 1)) * 10 ** rewardToken.decimals);
|
111
|
+
}
|
86
112
|
}
|
87
|
-
const campaignDailyValue = await TokenService.getValueByTokenId(TokenService.hashId({ address: rewardToken, chainId: record.campaign.chainId }), dailyAmount);
|
88
113
|
dailyRewards.total += campaignDailyValue;
|
89
114
|
if (campaignDailyValue > 0) {
|
90
115
|
dailyRewards.breakdowns.push({
|
@@ -94,18 +119,29 @@ export class DynamicDataService {
|
|
94
119
|
}),
|
95
120
|
value: campaignDailyValue,
|
96
121
|
amount: dailyAmount,
|
97
|
-
token,
|
122
|
+
token: rewardToken,
|
98
123
|
});
|
99
124
|
}
|
100
125
|
// 2.b.3 APR is obtained from daily rewards and tvl following the distribution type
|
101
126
|
// TODO: switch on distribution type - dailyRewards can be in token amount
|
102
127
|
let aprCampaignValue;
|
103
|
-
if (
|
128
|
+
if (rewardToken.isPoint) {
|
104
129
|
aprCampaignValue = campaignDailyValue / record.tvl;
|
105
130
|
}
|
106
131
|
else {
|
107
132
|
aprCampaignValue = (campaignDailyValue * 365 * 100) / record.tvl;
|
108
133
|
}
|
134
|
+
let lastEligibilityRatio = 1;
|
135
|
+
if (!!campaignParameters.hooks?.length) {
|
136
|
+
lastEligibilityRatio =
|
137
|
+
(await ComputedValueService.findCampaignValue(Bun.hash(`${record.campaign.chainId}${record.campaign.campaignId}`).toString(), "averageBoost"))?.averageBoost ?? 1;
|
138
|
+
}
|
139
|
+
const forfeitingBoost = 1;
|
140
|
+
if (!!campaignParameters.hooks?.length) {
|
141
|
+
lastEligibilityRatio =
|
142
|
+
(await ComputedValueService.findCampaignValue(Bun.hash(`${record.campaign.chainId}${record.campaign.campaignId}`).toString(), "forfeitingBoost"))?.forfeitingBoost ?? 1;
|
143
|
+
}
|
144
|
+
aprCampaignValue = aprCampaignValue * lastEligibilityRatio * forfeitingBoost;
|
109
145
|
if (aprCampaignValue === Number.POSITIVE_INFINITY)
|
110
146
|
aprCampaignValue = 10_001;
|
111
147
|
if (aprCampaignValue > 0) {
|
@@ -156,8 +156,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
156
156
|
} & {
|
157
157
|
price?: number | null | undefined;
|
158
158
|
})[];
|
159
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "
|
160
|
-
depositUrl:
|
159
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
|
160
|
+
depositUrl: string | undefined;
|
161
161
|
explorerAddress: string | undefined;
|
162
162
|
tags: string[];
|
163
163
|
} | null;
|
@@ -220,8 +220,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
220
220
|
} & {
|
221
221
|
price?: number | null | undefined;
|
222
222
|
})[];
|
223
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "
|
224
|
-
depositUrl:
|
223
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
|
224
|
+
depositUrl: string | undefined;
|
225
225
|
explorerAddress: string | undefined;
|
226
226
|
tags: string[];
|
227
227
|
} | null;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { Campaign as CampaignEnum, type CampaignParameters, type Opportunity as OpportunityV3 } from "@sdk";
|
2
|
+
import type { CampaignWithParams } from "../campaign";
|
2
3
|
import { OpportunityService } from "./opportunity.service";
|
3
4
|
export declare abstract class OpportunityConvertorService {
|
4
5
|
#private;
|
5
|
-
static convertV4CampaignToV3<C extends CampaignEnum>(campaignType: C, campaign: Exclude<Awaited<ReturnType<(typeof OpportunityService)["findMany"]>>[number]["campaigns"], undefined>[number]
|
6
|
+
static convertV4CampaignToV3<C extends CampaignEnum>(campaignType: C, campaign: Exclude<Awaited<ReturnType<(typeof OpportunityService)["findMany"]>>[number]["campaigns"], undefined>[number] | Omit<CampaignWithParams<C>, "manualOverrides">, opportunityIdentifier: string): CampaignParameters<C>;
|
6
7
|
static convertV4toV3(opportunity: Awaited<ReturnType<(typeof OpportunityService)["findMany"]>>[number], withCampaigns?: boolean): OpportunityV3;
|
7
8
|
static setV3Opportunities(showCampaigns: boolean, test: boolean | undefined, identifier: string | undefined, chainId: string | undefined): Promise<{}>;
|
8
9
|
static logKeyAndTTLV3Opportunities(showCampaigns: boolean, test: boolean | undefined, identifier: string | undefined, chainId: string | undefined): Promise<void>;
|
@@ -15,7 +15,7 @@ export class OpportunityConvertorService {
|
|
15
15
|
campaignSubType: campaign.subType ?? 0,
|
16
16
|
campaignType,
|
17
17
|
chainId: campaign.distributionChain?.id ?? 0,
|
18
|
-
creator: campaign.
|
18
|
+
creator: campaign.creatorAddress,
|
19
19
|
index: 0, // DEPRECATED
|
20
20
|
mainParameter: opportunityIdentifier,
|
21
21
|
endTimestamp: Number(campaign.endTimestamp),
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type
|
1
|
+
import { type CampaignWithParams, type GetCampaignQueryModel } from "@/modules/v4/campaign";
|
2
2
|
import { type OpportunityManualOverride, type Prisma } from "@db/api";
|
3
3
|
import { type MerklChainId } from "@sdk";
|
4
4
|
import type { CreateOpportunityModel, GetOpportunitiesQueryModel, LightOpportunityFromDB, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique } from "./opportunity.model";
|
@@ -64,8 +64,8 @@ export declare abstract class OpportunityService {
|
|
64
64
|
} & {
|
65
65
|
price?: number | null | undefined;
|
66
66
|
})[];
|
67
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "
|
68
|
-
depositUrl:
|
67
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
|
68
|
+
depositUrl: string | undefined;
|
69
69
|
explorerAddress: string | undefined;
|
70
70
|
tags: string[];
|
71
71
|
} | null>;
|
@@ -97,7 +97,7 @@ export declare abstract class OpportunityService {
|
|
97
97
|
* @param dryRun whether to skip the opportunity table interaction and just return the computed opportunity
|
98
98
|
* @returns the opportunity entity computed
|
99
99
|
*/
|
100
|
-
static createFromCampaign(campaign: Omit<
|
100
|
+
static createFromCampaign(campaign: Omit<CampaignWithParams, "manualOverrides">, opportunityIdentifier: string, upsert?: boolean, dryRun?: boolean): Promise<{
|
101
101
|
id: string;
|
102
102
|
name: string;
|
103
103
|
type: string;
|
@@ -137,8 +137,8 @@ export declare abstract class OpportunityService {
|
|
137
137
|
} & {
|
138
138
|
price?: number | null | undefined;
|
139
139
|
})[];
|
140
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "
|
141
|
-
depositUrl:
|
140
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
|
141
|
+
depositUrl: string | undefined;
|
142
142
|
explorerAddress: string | undefined;
|
143
143
|
tags: string[];
|
144
144
|
} | null>;
|
@@ -185,8 +185,8 @@ export declare abstract class OpportunityService {
|
|
185
185
|
} & {
|
186
186
|
price?: number | null | undefined;
|
187
187
|
})[];
|
188
|
-
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "
|
189
|
-
depositUrl:
|
188
|
+
mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
|
189
|
+
depositUrl: string | undefined;
|
190
190
|
explorerAddress: string | undefined;
|
191
191
|
tags: string[];
|
192
192
|
} | null>;
|