@merkl/api 0.18.1 → 0.18.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/database/api/seeder/resources/protocol.d.ts +48 -48
- package/dist/src/backgroundJobs/index.js +8 -7
- package/dist/src/backgroundJobs/jobs/campaignsCacheUpdater.js +11 -11
- package/dist/src/backgroundJobs/jobs/health.js +1 -1
- package/dist/src/backgroundJobs/jobs/opportunityUpdater.js +2 -1
- package/dist/src/cache/index.js +2 -2
- package/dist/src/cache/redis.js +1 -1
- package/dist/src/eden/index.d.ts +1039 -944
- package/dist/src/entities/campaign.js +1 -1
- package/dist/src/factories/dynamicData/factory.d.ts +0 -0
- package/dist/src/factories/dynamicData/factory.js +10 -0
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/factory.js +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Ajna.d.ts +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Ajna.js +3 -3
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Ambiant.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Ambiant.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Badger.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Badger.js +3 -3
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Clamm.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Clamm.js +3 -3
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Compound.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Compound.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Default.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Default.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Dolomite.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Dolomite.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/EigenLayer.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/EigenLayer.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Encompassing.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Encompassing.js +3 -3
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Erc20.d.ts +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Erc20.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Erc20Snapshot.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Erc20Snapshot.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Euler.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Euler.js +3 -3
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/EventBased.d.ts +3 -3
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/EventBased.js +5 -5
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Hyperdrive.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Hyperdrive.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Invalid.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Invalid.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Ion.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Ion.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/JsonAirdrop.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/JsonAirdrop.js +3 -3
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Morpho.d.ts +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Morpho.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Radiant.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Radiant.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Silo.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Silo.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/UniswapV4.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/UniswapV4.js +2 -2
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Vest.d.ts +1 -1
- package/dist/src/factories/{metadataFactory → opportunityMetadata}/implementations/Vest.js +3 -3
- package/dist/src/guards/BackOffice.guard.js +1 -1
- package/dist/src/guards/Engine.guard.js +1 -1
- package/dist/src/guards/TokenAuth.guard.js +1 -1
- package/dist/src/index.d.ts +212 -191
- package/dist/src/jobs/etl/dynamic-data.js +1 -1
- package/dist/src/jobs/etl/pendings.js +5 -4
- package/dist/src/jobs/etl/prices.js +3 -3
- package/dist/src/jobs/etl/reward-breakdowns.js +3 -3
- package/dist/src/jobs/etl/rewards.js +2 -2
- package/dist/src/jobs/etl/update-dynamic-data.js +4 -4
- package/dist/src/jobs/etl/update-euler-vaults.d.ts +1 -0
- package/dist/src/jobs/etl/update-euler-vaults.js +122 -0
- package/dist/src/libs/campaigns/campaignTypes/AjnaDynamicData.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/BadgerDynamicData.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/CLAMMDynamicData.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.js +4 -4
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/GenericProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/GenericProcessor.js +4 -4
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AaveProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AaveProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AnglesLiquid.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AnglesLiquid.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AssetProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AssetProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AuraProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/AuraProcessor.js +3 -3
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BalancerGaugeProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BalancerGaugeProcessor.js +3 -3
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BalancerPoolProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BalancerPoolProcessor.js +3 -3
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BalancerV3PoolProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BalancerV3PoolProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BeefyProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/BeefyProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/CompoundProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/CompoundProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/ERC4626Processor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/ERC4626Processor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EnzymeProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EnzymeProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EqualizerGaugeProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EqualizerGaugeProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EulerBorrowProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EulerBorrowProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EulerLendProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/EulerLendProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/FluidProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/FluidProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/FraxProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/FraxProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/GammaProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/GammaProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/GearboxProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/GearboxProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HanjiVaultProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HanjiVaultProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HoldStationProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HoldStationProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HourglassProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/HourglassProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/MaverickBPProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/MaverickBPProcessor.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/MetamorphoProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/MetamorphoProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/NoLinkVaultProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/NoLinkVaultProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/PendleProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/PendleProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/PendleYTProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/PendleYTProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/RadiantProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/RadiantProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/RfxProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/RfxProcessor.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/Satlayer.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/Satlayer.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SpectraProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SpectraProcessor.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SpectraYTProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SpectraYTProcessor.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SpliceProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SturdySiloProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/SturdySiloProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/TempestVaultProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/TempestVaultProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/TemplateProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/TorosProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/TorosProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/UniswapProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/UniswapProcessor.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/VicunaProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/VicunaProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/WoofiProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/WoofiProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/ZkSwapThreePoolProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/ZkSwapThreePoolProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/curveNPoolProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/curveNPoolProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/curveProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/curveProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/stakedCurveProcessor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/stakedCurveProcessor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/xU308Processor.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/implementations/xU308Processor.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesPrices.d.ts +1 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/EventBasedDynamicData.js +14 -17
- package/dist/src/libs/campaigns/campaignTypes/RadiantDynamicData.js +2 -2
- package/dist/src/libs/campaigns/campaignTypes/UniswapV4DynamicData.js +2 -2
- package/dist/src/libs/campaigns/campaignsDynamicData.js +1 -1
- package/dist/src/libs/campaigns/utils/fetchClamInfo.d.ts +1 -1
- package/dist/src/libs/campaigns/utils/fetchLogs.js +1 -1
- package/dist/src/libs/campaigns/utils/getCompV2ForksVaults.js +4 -4
- package/dist/src/libs/campaigns/utils/getContractCreationBlock.js +1 -1
- package/dist/src/libs/campaigns/utils/getDolomiteMarkets.js +1 -1
- package/dist/src/libs/campaigns/utils/getEulerV2Vaults.js +5 -5
- package/dist/src/libs/campaigns/utils/getUniswapV4Pools.js +4 -4
- package/dist/src/libs/deprecated-merklv3/index.d.ts +1 -1
- package/dist/src/libs/deprecated-merklv3/index.js +2 -2
- package/dist/src/libs/getTokensList.js +1 -1
- package/dist/src/libs/merklChainData.js +2 -2
- package/dist/src/libs/parse/marketsWithCache.js +2 -2
- package/dist/src/libs/positions/ajna/index.js +1 -1
- package/dist/src/libs/positions/badger/index.js +2 -2
- package/dist/src/libs/positions/clamm/index.js +3 -3
- package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.js +1 -1
- package/dist/src/libs/staticCampaigns.js +2 -2
- package/dist/src/libs/tokens/balances.js +1 -1
- package/dist/src/libs/tokens/tokenInfo.d.ts +1 -1
- package/dist/src/modules/v4/accounting/accounting.controller.js +3 -3
- package/dist/src/modules/v4/accounting/accounting.repository.d.ts +1 -1
- package/dist/src/modules/v4/accounting/accounting.repository.js +1 -1
- package/dist/src/modules/v4/accounting/accounting.service.d.ts +1 -1
- package/dist/src/modules/v4/accounting/accounting.service.js +2 -2
- package/dist/src/modules/v4/airflow/airflow.service.js +1 -1
- package/dist/src/modules/v4/apr/apr.model.d.ts +1 -1
- package/dist/src/modules/v4/apr/apr.model.js +1 -1
- package/dist/src/modules/v4/apr/apr.service.js +1 -1
- package/dist/src/modules/v4/blacklist/blacklist.controller.js +2 -2
- package/dist/src/modules/v4/blacklist/blacklist.repository.js +1 -1
- package/dist/src/modules/v4/boost/boost.controller.d.ts +1 -1
- package/dist/src/modules/v4/cache/cache.repository.js +1 -1
- package/dist/src/modules/v4/cache/cache.service.js +1 -1
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +23 -23
- package/dist/src/modules/v4/campaign/campaign.controller.js +4 -4
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +2 -2
- package/dist/src/modules/v4/campaign/campaign.model.js +2 -2
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +60 -46
- package/dist/src/modules/v4/campaign/campaign.repository.js +6 -5
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +69 -55
- package/dist/src/modules/v4/campaign/campaign.service.js +9 -9
- package/dist/src/modules/v4/chain/chain.controller.d.ts +10 -10
- package/dist/src/modules/v4/chain/chain.controller.js +1 -1
- package/dist/src/modules/v4/chain/chain.model.d.ts +1 -1
- package/dist/src/modules/v4/chain/chain.model.js +1 -1
- package/dist/src/modules/v4/chain/chain.repository.d.ts +11 -11
- package/dist/src/modules/v4/chain/chain.repository.js +1 -1
- package/dist/src/modules/v4/chain/chain.service.d.ts +10 -10
- package/dist/src/modules/v4/claims/claims.controller.js +1 -1
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +1 -1
- package/dist/src/modules/v4/computedValue/computedValue.controller.js +2 -2
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +1 -1
- package/dist/src/modules/v4/computedValue/computedValue.repository.js +1 -1
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +1 -1
- package/dist/src/modules/v4/computedValue/computedValue.service.js +1 -1
- package/dist/src/modules/v4/creator/creator.controller.d.ts +5 -5
- package/dist/src/modules/v4/creator/creator.controller.js +2 -2
- package/dist/src/modules/v4/creator/creator.model.d.ts +1 -1
- package/dist/src/modules/v4/creator/creator.repository.d.ts +5 -5
- package/dist/src/modules/v4/creator/creator.repository.js +1 -1
- package/dist/src/modules/v4/creator/creator.service.d.ts +4 -4
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +6 -7
- package/dist/src/modules/v4/enso/enso.model.d.ts +40 -40
- package/dist/src/modules/v4/enso/enso.service.d.ts +3 -3
- package/dist/src/modules/v4/enso/enso.service.js +2 -2
- package/dist/src/modules/v4/explorer/explorer.controller.d.ts +2 -2
- package/dist/src/modules/v4/explorer/explorer.controller.js +1 -1
- package/dist/src/modules/v4/explorer/explorer.model.js +1 -1
- package/dist/src/modules/v4/explorer/explorer.repository.d.ts +5 -5
- package/dist/src/modules/v4/explorer/explorer.repository.js +1 -1
- package/dist/src/modules/v4/explorer/explorer.service.d.ts +6 -6
- package/dist/src/modules/v4/interaction/interaction.controller.d.ts +1 -1
- package/dist/src/modules/v4/interaction/interaction.model.d.ts +2 -2
- package/dist/src/modules/v4/interaction/interaction.service.d.ts +1 -1
- package/dist/src/modules/v4/interaction/interaction.service.js +3 -3
- package/dist/src/modules/v4/kyberzap/kyberzap.model.d.ts +22 -22
- package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +1 -1
- package/dist/src/modules/v4/kyberzap/kyberzap.service.js +1 -1
- package/dist/src/modules/v4/liquidity/implementations/BadgerPositionFetcher.js +1 -1
- package/dist/src/modules/v4/liquidity/implementations/ClammPositionFetcher.js +1 -1
- package/dist/src/modules/v4/liquidity/liquidity.controller.js +1 -1
- package/dist/src/modules/v4/liquidity/liquidity.service.js +1 -1
- package/dist/src/modules/v4/merklRoot/index.d.ts +3 -3
- package/dist/src/modules/v4/merklRoot/index.js +3 -3
- package/dist/src/modules/v4/merklRoot/merklRoot.controller.js +2 -2
- package/dist/src/modules/v4/merklRoot/merklRoot.repository.js +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +81 -81
- package/dist/src/modules/v4/opportunity/opportunity.controller.js +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.converter.js +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +11 -11
- package/dist/src/modules/v4/opportunity/opportunity.model.js +7 -7
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +128 -114
- package/dist/src/modules/v4/opportunity/opportunity.repository.js +13 -5
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +106 -106
- package/dist/src/modules/v4/opportunity/opportunity.service.js +11 -11
- package/dist/src/modules/v4/opportunity/validate-id.pipe.js +1 -1
- package/dist/src/modules/v4/price/price.controller.d.ts +8 -8
- package/dist/src/modules/v4/price/price.controller.js +2 -2
- package/dist/src/modules/v4/price/price.model.js +1 -1
- package/dist/src/modules/v4/price/price.repository.d.ts +10 -10
- package/dist/src/modules/v4/price/price.repository.js +1 -1
- package/dist/src/modules/v4/price/price.service.d.ts +8 -8
- package/dist/src/modules/v4/price/price.service.js +3 -3
- package/dist/src/modules/v4/prisma/index.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.controller.js +2 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +209 -21
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +120 -62
- package/dist/src/modules/v4/programPayload/programPayload.service.js +4 -2
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +6 -6
- package/dist/src/modules/v4/protocol/protocol.controller.js +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +10 -10
- package/dist/src/modules/v4/protocol/protocol.repository.js +1 -1
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +2 -2
- package/dist/src/modules/v4/protocol/protocol.service.js +3 -3
- package/dist/src/modules/v4/referral/referral.controller.js +1 -1
- package/dist/src/modules/v4/reward/index.d.ts +2 -2
- package/dist/src/modules/v4/reward/index.js +2 -2
- package/dist/src/modules/v4/reward/reward.controller.d.ts +1 -1
- package/dist/src/modules/v4/reward/reward.controller.js +6 -6
- package/dist/src/modules/v4/reward/reward.model.d.ts +1 -1
- package/dist/src/modules/v4/reward/reward.repository.d.ts +10 -10
- package/dist/src/modules/v4/reward/reward.repository.js +4 -4
- package/dist/src/modules/v4/reward/reward.service.d.ts +56 -56
- package/dist/src/modules/v4/reward/reward.service.js +5 -3
- package/dist/src/modules/v4/router.d.ts +202 -186
- package/dist/src/modules/v4/router.js +23 -23
- package/dist/src/modules/v4/status/status.controller.d.ts +4 -4
- package/dist/src/modules/v4/status/status.controller.js +3 -3
- package/dist/src/modules/v4/status/status.model.js +1 -1
- package/dist/src/modules/v4/status/status.repository.d.ts +11 -11
- package/dist/src/modules/v4/status/status.repository.js +1 -1
- package/dist/src/modules/v4/status/status.service.d.ts +6 -6
- package/dist/src/modules/v4/status/status.service.js +4 -4
- package/dist/src/modules/v4/token/token.controller.d.ts +31 -15
- package/dist/src/modules/v4/token/token.controller.js +4 -4
- package/dist/src/modules/v4/token/token.model.d.ts +5 -2
- package/dist/src/modules/v4/token/token.model.js +2 -1
- package/dist/src/modules/v4/token/token.repository.d.ts +3 -3
- package/dist/src/modules/v4/token/token.repository.js +3 -3
- package/dist/src/modules/v4/token/token.service.d.ts +24 -11
- package/dist/src/modules/v4/token/token.service.js +36 -15
- package/dist/src/modules/v4/tvl/tvl.model.d.ts +1 -1
- package/dist/src/modules/v4/tvl/tvl.model.js +1 -1
- package/dist/src/modules/v4/tvl/tvl.service.js +1 -1
- package/dist/src/modules/v4/uniswapV4/uniswapV4.service.js +3 -3
- package/dist/src/modules/v4/user/user.controller.d.ts +22 -22
- package/dist/src/modules/v4/user/user.controller.js +2 -2
- package/dist/src/modules/v4/user/user.model.d.ts +1 -1
- package/dist/src/modules/v4/user/user.model.js +1 -1
- package/dist/src/modules/v4/user/user.repository.js +1 -1
- package/dist/src/modules/v4/user/user.service.js +2 -2
- package/dist/src/plugins/error-handling.plugin.d.ts +1 -1
- package/dist/src/plugins/error-handling.plugin.js +2 -2
- package/dist/src/routes/v1/allowances.d.ts +2 -2
- package/dist/src/routes/v1/allowances.js +5 -5
- package/dist/src/routes/v1/balances.js +5 -5
- package/dist/src/routes/v1/prices.js +1 -1
- package/dist/src/routes/v1/tokens.js +1 -1
- package/dist/src/routes/v3/app.d.ts +7 -2
- package/dist/src/routes/v3/app.js +20 -10
- package/dist/src/routes/v3/blacklist.js +1 -1
- package/dist/src/routes/v3/campaign/delay.js +3 -3
- package/dist/src/routes/v3/campaignClaims.js +3 -3
- package/dist/src/routes/v3/campaignUnclaimed.js +1 -1
- package/dist/src/routes/v3/campaigns.js +6 -7
- package/dist/src/routes/v3/campaignsForMainParameter.js +2 -2
- package/dist/src/routes/v3/campaignsRewardsReport.d.ts +2 -2
- package/dist/src/routes/v3/campaignsRewardsReport.js +4 -6
- package/dist/src/routes/v3/compoundV2.js +1 -1
- package/dist/src/routes/v3/euler.js +1 -1
- package/dist/src/routes/v3/health.js +1 -1
- package/dist/src/routes/v3/lostyield.js +3 -3
- package/dist/src/routes/v3/merkl.js +1 -1
- package/dist/src/routes/v3/morphoMarkets.js +1 -1
- package/dist/src/routes/v3/morphoVaults.js +1 -1
- package/dist/src/routes/v3/multiChainPositions.js +1 -1
- package/dist/src/routes/v3/opportunity.d.ts +2 -2
- package/dist/src/routes/v3/opportunity.js +3 -4
- package/dist/src/routes/v3/overview.d.ts +2 -2
- package/dist/src/routes/v3/overview.js +2 -3
- package/dist/src/routes/v3/positions.d.ts +3 -4
- package/dist/src/routes/v3/positions.js +4 -5
- package/dist/src/routes/v3/radiant.js +1 -1
- package/dist/src/routes/v3/recipients.js +1 -1
- package/dist/src/routes/v3/rewards.js +2 -2
- package/dist/src/routes/v3/rewardsReport.js +1 -1
- package/dist/src/routes/v3/router.d.ts +11 -6
- package/dist/src/routes/v3/silo.js +1 -1
- package/dist/src/routes/v3/token.js +4 -4
- package/dist/src/routes/v3/twt/participants.js +55 -3
- package/dist/src/routes/v3/uniswapv4.js +1 -1
- package/dist/src/routes/v3/updates.js +2 -2
- package/dist/src/routes/v3/userRewards.js +5 -5
- package/dist/src/types/index.d.ts +0 -26
- package/dist/src/types/index.js +1 -6
- package/dist/src/utils/encodeCalls.d.ts +1 -1
- package/dist/src/utils/encodeCalls.js +1 -1
- package/dist/src/utils/error.d.ts +1 -1
- package/dist/src/utils/error.js +1 -1
- package/dist/src/utils/generateCardName.d.ts +1 -1
- package/dist/src/utils/generateCardName.js +1 -1
- package/dist/src/utils/generateIcons.d.ts +1 -1
- package/dist/src/utils/generateIcons.js +2 -2
- package/dist/src/utils/lastBlockBefore.js +2 -2
- package/dist/src/utils/pricer.js +1 -1
- package/dist/src/utils/prices/priceFetcherFactory.d.ts +1 -1
- package/dist/src/utils/prices/priceFetcherFactory.js +1 -1
- package/dist/src/utils/prices/priceService.js +2 -2
- package/dist/src/utils/prices/services/coinGeckoService.d.ts +1 -1
- package/dist/src/utils/prices/services/coinGeckoService.js +1 -1
- package/dist/src/utils/prices/services/defillamaService.d.ts +1 -1
- package/dist/src/utils/prices/services/defillamaService.js +1 -1
- package/dist/src/utils/prices/services/dexScreenerService.d.ts +1 -1
- package/dist/src/utils/prices/services/dexScreenerService.js +1 -1
- package/dist/src/utils/prices/services/erc4626Service.d.ts +1 -1
- package/dist/src/utils/prices/services/erc4626Service.js +2 -2
- package/dist/src/utils/prices/services/indexCoopService.d.ts +1 -1
- package/dist/src/utils/prices/services/indexCoopService.js +1 -1
- package/dist/src/utils/prices/services/priceFetcher.d.ts +1 -1
- package/dist/src/utils/prisma.d.ts +3 -3
- package/dist/src/utils/prisma.js +2 -2
- package/dist/src/utils/queries/activeCampaigns.d.ts +1 -1
- package/dist/src/utils/queries/activeCampaigns.js +1 -1
- package/dist/src/utils/queries/allCampaigns.d.ts +1 -1
- package/dist/src/utils/queries/allCampaigns.js +1 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/dist/src/libs/campaigns/getCampaigns.d.ts +0 -1
- package/dist/src/libs/campaigns/getCampaigns.js +0 -18
- package/dist/src/libs/custom/twtParticipants.d.ts +0 -6
- package/dist/src/libs/custom/twtParticipants.js +0 -54
- package/dist/src/modules/v4/programPayload/index.d.ts +0 -3
- package/dist/src/modules/v4/programPayload/index.js +0 -3
- package/dist/src/plugins/logger.plugin.d.ts +0 -22
- package/dist/src/plugins/logger.plugin.js +0 -3
- package/dist/src/types/parameters/Action.d.ts +0 -4
- package/dist/src/types/parameters/Action.js +0 -11
- package/dist/src/types/parameters/Chain.d.ts +0 -4
- package/dist/src/types/parameters/Chain.js +0 -13
- package/dist/src/types/parameters/ChainCampaignId.d.ts +0 -4
- package/dist/src/types/parameters/ChainCampaignId.js +0 -13
- package/dist/src/types/parameters/MainParameter.d.ts +0 -4
- package/dist/src/types/parameters/MainParameter.js +0 -19
- package/dist/src/types/parameters/OpportunityId.d.ts +0 -4
- package/dist/src/types/parameters/OpportunityId.js +0 -14
- package/dist/src/types/parameters/Timestamp.d.ts +0 -4
- package/dist/src/types/parameters/Timestamp.js +0 -16
- package/dist/src/types/parameters/Type.d.ts +0 -4
- package/dist/src/types/parameters/Type.js +0 -15
- package/dist/src/types/parameters/index.d.ts +0 -36
- package/dist/src/types/parameters/index.js +0 -17
- /package/dist/src/factories/{metadataFactory → opportunityMetadata}/factory.d.ts +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getClamsInfo } from "
|
1
|
+
import { getClamsInfo } from "@/libs/deprecated-merklv3";
|
2
2
|
import { AMM, ChainId, isSupportedChain } from "@sdk";
|
3
3
|
import { t } from "elysia";
|
4
4
|
import checkQueryAddressValidity from "../../hooks/checkQueryAddressValidity";
|
@@ -5,7 +5,7 @@ export declare const query: import("@sinclair/typebox").TObject<{
|
|
5
5
|
mainParameter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
6
6
|
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
7
7
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
8
|
-
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
8
|
+
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
9
9
|
tag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
10
10
|
}>;
|
11
11
|
declare const _default: (app: Elysia) => Elysia<"", false, {
|
@@ -29,7 +29,7 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
|
|
29
29
|
type?: number | undefined;
|
30
30
|
tag?: string | undefined;
|
31
31
|
chainId?: number | undefined;
|
32
|
-
action?: undefined;
|
32
|
+
action?: string | undefined;
|
33
33
|
campaigns?: boolean | undefined;
|
34
34
|
mainParameter?: string | undefined;
|
35
35
|
testTokens?: boolean | undefined;
|
@@ -1,13 +1,12 @@
|
|
1
|
-
import { OpportunityConvertorService } from "
|
1
|
+
import { OpportunityConvertorService } from "@/modules/v4/opportunity/opportunity.converter";
|
2
2
|
import { t } from "elysia";
|
3
|
-
import param from "../../types/parameters";
|
4
3
|
export const query = t.Object({
|
5
4
|
campaigns: t.Optional(t.Boolean()),
|
6
5
|
testTokens: t.Optional(t.Boolean()),
|
7
|
-
mainParameter: t.Optional(
|
6
|
+
mainParameter: t.Optional(t.String()),
|
8
7
|
chainId: t.Optional(t.Numeric()),
|
9
8
|
type: t.Optional(t.Numeric()),
|
10
|
-
action: t.Optional(
|
9
|
+
action: t.Optional(t.String()),
|
11
10
|
tag: t.Optional(t.String()),
|
12
11
|
});
|
13
12
|
export default (app) => {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type Elysia } from "elysia";
|
2
2
|
export declare const query: import("@sinclair/typebox").TObject<{
|
3
|
-
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").
|
3
|
+
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
4
4
|
}>;
|
5
5
|
export declare const response: import("@sinclair/typebox").TObject<{
|
6
6
|
disputes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
@@ -40,7 +40,7 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
|
|
40
40
|
body: unknown;
|
41
41
|
params: {};
|
42
42
|
query: {
|
43
|
-
chainId?: undefined;
|
43
|
+
chainId?: number | undefined;
|
44
44
|
};
|
45
45
|
headers: unknown;
|
46
46
|
response: {
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import param from "../../types/parameters";
|
2
1
|
import { ANGLE_NETWORKS } from "@sdk";
|
3
2
|
import { withTimeout } from "@sdk";
|
4
3
|
import { t } from "elysia";
|
@@ -6,7 +5,7 @@ import checkQueryChainIdValidity from "../../hooks/checkQueryChainIdValidity";
|
|
6
5
|
import { merklChainDataWithCache } from "../../libs/merklChainData";
|
7
6
|
import { log } from "../../utils/logger";
|
8
7
|
export const query = t.Object({
|
9
|
-
chainId: t.Optional(
|
8
|
+
chainId: t.Optional(t.Numeric()),
|
10
9
|
});
|
11
10
|
export const response = t.Object({
|
12
11
|
disputes: t.Record(t.String({ title: "ChainId" }), t.Object({
|
@@ -66,7 +65,7 @@ export default (app) => app.use(checkQueryChainIdValidity()).get("/overview", as
|
|
66
65
|
return result;
|
67
66
|
}, {
|
68
67
|
transform({ query }) {
|
69
|
-
query.chainId = !query.chainId ? undefined :
|
68
|
+
query.chainId = !query.chainId ? undefined : query.chainId;
|
70
69
|
},
|
71
70
|
query,
|
72
71
|
tags: ["Merkl"],
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import type Elysia from "elysia";
|
2
|
-
import { type TSchema } from "elysia";
|
3
2
|
export declare const query: import("@sinclair/typebox").TObject<{
|
4
|
-
chainId: import("@sinclair/typebox").
|
3
|
+
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
5
4
|
user: import("@sinclair/typebox").TString;
|
6
5
|
}>;
|
7
|
-
export declare const response: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TTemplateLiteral<[import("@sinclair/typebox").
|
6
|
+
export declare const response: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TTemplateLiteral<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TLiteral<"_">, import("@sinclair/typebox").TString]>, import("@sinclair/typebox").TObject<{
|
8
7
|
userPositions: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<(import("@sinclair/typebox").TObject<{
|
9
8
|
almAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
10
9
|
id: import("@sinclair/typebox").TString;
|
@@ -41,7 +40,7 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
|
|
41
40
|
body: unknown;
|
42
41
|
params: {};
|
43
42
|
query: {
|
44
|
-
chainId
|
43
|
+
chainId?: number | undefined;
|
45
44
|
user: string;
|
46
45
|
};
|
47
46
|
headers: unknown;
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import { Redis } from "
|
2
|
-
import param from "../../types/parameters";
|
1
|
+
import { Redis } from "@/cache";
|
3
2
|
import { Campaign } from "@sdk";
|
4
3
|
import { t } from "elysia";
|
5
4
|
import checkQueryAddressValidity from "../../hooks/checkQueryAddressValidity";
|
@@ -7,7 +6,7 @@ import checkQueryChainIdValidity from "../../hooks/checkQueryChainIdValidity";
|
|
7
6
|
import { getUserPositionsV2 } from "../../libs/positions";
|
8
7
|
import { prepareFetch } from "../../libs/positions/prepareFetch";
|
9
8
|
export const query = t.Object({
|
10
|
-
chainId:
|
9
|
+
chainId: t.Optional(t.Numeric()),
|
11
10
|
user: t.String(),
|
12
11
|
});
|
13
12
|
const positions = {
|
@@ -30,7 +29,7 @@ const positions = {
|
|
30
29
|
balance: t.Number(),
|
31
30
|
}),
|
32
31
|
};
|
33
|
-
export const response = t.Record(t.TemplateLiteral([
|
32
|
+
export const response = t.Record(t.TemplateLiteral([t.Numeric(), t.Literal("_"), t.String()]), t.Object({
|
34
33
|
userPositions: t.Array(t.Union(Object.values(positions))),
|
35
34
|
}));
|
36
35
|
export default (app) => app
|
@@ -55,7 +54,7 @@ export default (app) => app
|
|
55
54
|
return await getUserPositionsV2(positionsToCheck, chainId, user);
|
56
55
|
}, {
|
57
56
|
transform({ query }) {
|
58
|
-
query.chainId = !query.chainId ? undefined :
|
57
|
+
query.chainId = !query.chainId ? undefined : query.chainId;
|
59
58
|
},
|
60
59
|
query,
|
61
60
|
tags: ["Merkl"],
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { RewardService } from "
|
2
|
-
import { RewardConvertorService } from "
|
1
|
+
import { RewardService } from "@/modules/v4/reward";
|
2
|
+
import { RewardConvertorService } from "@/modules/v4/reward/reward.converter";
|
3
3
|
import { ChainId, isSupportedChain } from "@sdk";
|
4
4
|
import { t } from "elysia";
|
5
5
|
import checkQueryAddressValidity from "../../hooks/checkQueryAddressValidity";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { RewardService } from "
|
1
|
+
import { RewardService } from "@/modules/v4/reward";
|
2
2
|
import { t } from "elysia";
|
3
3
|
import checkQueryChainIdValidity from "../../hooks/checkQueryChainIdValidity";
|
4
4
|
import { InvalidParameter } from "../../utils/error";
|
@@ -20,8 +20,13 @@ export declare const v3: Elysia<"/v3", false, {
|
|
20
20
|
query: {};
|
21
21
|
headers: unknown;
|
22
22
|
response: {
|
23
|
-
|
24
|
-
|
23
|
+
200: {
|
24
|
+
tokens: any;
|
25
|
+
prices: {
|
26
|
+
rate: number;
|
27
|
+
token: string;
|
28
|
+
}[];
|
29
|
+
};
|
25
30
|
};
|
26
31
|
};
|
27
32
|
};
|
@@ -117,7 +122,7 @@ export declare const v3: Elysia<"/v3", false, {
|
|
117
122
|
query: {
|
118
123
|
from?: number | undefined;
|
119
124
|
to?: number | undefined;
|
120
|
-
chain_campaignIds:
|
125
|
+
chain_campaignIds: string[];
|
121
126
|
};
|
122
127
|
headers: unknown;
|
123
128
|
response: {
|
@@ -387,7 +392,7 @@ export declare const v3: Elysia<"/v3", false, {
|
|
387
392
|
type?: number | undefined;
|
388
393
|
tag?: string | undefined;
|
389
394
|
chainId?: number | undefined;
|
390
|
-
action?: undefined;
|
395
|
+
action?: string | undefined;
|
391
396
|
campaigns?: boolean | undefined;
|
392
397
|
mainParameter?: string | undefined;
|
393
398
|
testTokens?: boolean | undefined;
|
@@ -406,7 +411,7 @@ export declare const v3: Elysia<"/v3", false, {
|
|
406
411
|
body: unknown;
|
407
412
|
params: {};
|
408
413
|
query: {
|
409
|
-
chainId?: undefined;
|
414
|
+
chainId?: number | undefined;
|
410
415
|
};
|
411
416
|
headers: unknown;
|
412
417
|
response: {
|
@@ -511,7 +516,7 @@ export declare const v3: Elysia<"/v3", false, {
|
|
511
516
|
body: unknown;
|
512
517
|
params: {};
|
513
518
|
query: {
|
514
|
-
chainId
|
519
|
+
chainId?: number | undefined;
|
515
520
|
user: string;
|
516
521
|
};
|
517
522
|
headers: unknown;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import checkQueryAddressValidity from "
|
2
|
-
import checkQueryChainIdValidity from "
|
3
|
-
import { getTokenInfo } from "
|
4
|
-
import { executeSimple } from "
|
1
|
+
import checkQueryAddressValidity from "@/hooks/checkQueryAddressValidity";
|
2
|
+
import checkQueryChainIdValidity from "@/hooks/checkQueryChainIdValidity";
|
3
|
+
import { getTokenInfo } from "@/libs/tokens/tokenInfo";
|
4
|
+
import { executeSimple } from "@/utils/execute";
|
5
5
|
import { t } from "elysia";
|
6
6
|
export const query = t.Object({
|
7
7
|
chainId: t.Numeric(),
|
@@ -1,11 +1,63 @@
|
|
1
|
+
import { Redis } from "@/cache";
|
2
|
+
import { batchMulticallCallWithRetry } from "@/utils/generic";
|
3
|
+
import { log } from "@/utils/logger";
|
4
|
+
import { Interface } from "@ethersproject/abi";
|
5
|
+
import { BN2Number, ChainId, ERC20Interface } from "@sdk";
|
1
6
|
import { t } from "elysia";
|
2
|
-
|
7
|
+
const stTwtABI = [
|
8
|
+
{
|
9
|
+
constant: true,
|
10
|
+
inputs: [],
|
11
|
+
name: "participantNumber",
|
12
|
+
outputs: [
|
13
|
+
{
|
14
|
+
name: "",
|
15
|
+
type: "uint256",
|
16
|
+
},
|
17
|
+
],
|
18
|
+
payable: false,
|
19
|
+
stateMutability: "view",
|
20
|
+
type: "function",
|
21
|
+
},
|
22
|
+
];
|
23
|
+
const stTwtAddresses = {
|
24
|
+
[ChainId.BSC]: "0x5029f49585D57ed770D2194841B5A0bE06BFc2ED",
|
25
|
+
};
|
26
|
+
const stTwtInterface = new Interface(stTwtABI);
|
27
|
+
async function getTwtParticipants(chainId) {
|
28
|
+
const tokenAddress = stTwtAddresses[chainId];
|
29
|
+
const calls = [
|
30
|
+
{
|
31
|
+
allowFailure: true,
|
32
|
+
callData: stTwtInterface.encodeFunctionData("participantNumber", []),
|
33
|
+
target: tokenAddress,
|
34
|
+
},
|
35
|
+
{
|
36
|
+
allowFailure: true,
|
37
|
+
callData: ERC20Interface.encodeFunctionData("totalSupply"),
|
38
|
+
target: tokenAddress,
|
39
|
+
},
|
40
|
+
];
|
41
|
+
const result = await batchMulticallCallWithRetry(chainId, { calls });
|
42
|
+
const res = {
|
43
|
+
participants: 0,
|
44
|
+
totalSupply: 0,
|
45
|
+
};
|
46
|
+
try {
|
47
|
+
res.participants = stTwtInterface.decodeFunctionResult("participantNumber", result[0].returnData)[0].toNumber();
|
48
|
+
res.totalSupply = BN2Number(ERC20Interface.decodeFunctionResult("totalSupply", result[1].returnData)[0], 18);
|
49
|
+
}
|
50
|
+
catch (_error) {
|
51
|
+
log.local(`❌ Failed to call participantNumber for ${tokenAddress} on ${chainId}`);
|
52
|
+
}
|
53
|
+
return res;
|
54
|
+
}
|
3
55
|
export const query = t.Object({
|
4
56
|
chainId: t.Numeric(),
|
5
57
|
});
|
6
|
-
export default (app) => app.get("", async ({ query
|
58
|
+
export default (app) => app.get("", async ({ query }) => {
|
7
59
|
const chainId = query.chainId;
|
8
|
-
return await
|
60
|
+
return await Redis.getOrSet(`TwtParticipants_${chainId}`, getTwtParticipants, chainId);
|
9
61
|
}, {
|
10
62
|
query,
|
11
63
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getUniswapV4PoolsWithCache } from "
|
1
|
+
import { getUniswapV4PoolsWithCache } from "@/libs/campaigns/utils/getUniswapV4Pools";
|
2
2
|
import { t } from "elysia";
|
3
3
|
export const response = t.Array(t.Object({ address: t.String(), asset: t.String(), chaind: t.Number(), debtTokenAddress: t.String() }));
|
4
4
|
export default (app) => app.get("/uniswapv4", async () => {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Redis } from "
|
2
|
-
import { staticCampaignWithCache } from "
|
1
|
+
import { Redis } from "@/cache";
|
2
|
+
import { staticCampaignWithCache } from "@/libs/staticCampaigns";
|
3
3
|
import { ChainId, HOUR, isSupportedChain } from "@sdk";
|
4
4
|
import { t } from "elysia";
|
5
5
|
export const query = t.Object({});
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import checkQueryAddressValidity from "
|
2
|
-
import { RewardService, UserRewardV3Dto } from "
|
3
|
-
import { RewardConvertorService } from "
|
4
|
-
import { InvalidParameter } from "
|
5
|
-
import { throwOnUnsupportedChainId } from "
|
1
|
+
import checkQueryAddressValidity from "@/hooks/checkQueryAddressValidity";
|
2
|
+
import { RewardService, UserRewardV3Dto } from "@/modules/v4/reward";
|
3
|
+
import { RewardConvertorService } from "@/modules/v4/reward/reward.converter";
|
4
|
+
import { InvalidParameter } from "@/utils/error";
|
5
|
+
import { throwOnUnsupportedChainId } from "@/utils/throw";
|
6
6
|
import { t } from "elysia";
|
7
7
|
import { utils } from "ethers";
|
8
8
|
import checkQueryChainIdValidity from "../../hooks/checkQueryChainIdValidity";
|
@@ -1,35 +1,9 @@
|
|
1
1
|
import type { BytesLike } from "ethers";
|
2
|
-
export type CampaignFrontend = {
|
3
|
-
chainId: number;
|
4
|
-
index: number;
|
5
|
-
creator: string;
|
6
|
-
campaignId: string;
|
7
|
-
campaignType: string;
|
8
|
-
campaignSubType: string;
|
9
|
-
rewardToken: string;
|
10
|
-
amount: string;
|
11
|
-
amountDecimal: number;
|
12
|
-
startTimestamp: number;
|
13
|
-
endTimestamp: number;
|
14
|
-
lastProcessedTimestamp: number;
|
15
|
-
mainParameter: string;
|
16
|
-
merklApr: string;
|
17
|
-
otherAprs: string[];
|
18
|
-
};
|
19
|
-
export declare enum Campaign {
|
20
|
-
INVALID = 0,
|
21
|
-
ERC20 = 1,
|
22
|
-
CLAMM = 2
|
23
|
-
}
|
24
2
|
export type MultiCallDataType = {
|
25
3
|
target: string;
|
26
4
|
callData: BytesLike;
|
27
5
|
allowFailure?: boolean;
|
28
6
|
}[];
|
29
|
-
export type leafCacheType = {
|
30
|
-
type: "Buffer";
|
31
|
-
data: number[];
|
32
|
-
};
|
33
7
|
export type MerklChainData = {
|
34
8
|
merkleRoot: string;
|
35
9
|
treeRoot: string;
|
package/dist/src/types/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import { tokenType } from "
|
1
|
+
import { tokenType } from "@/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
2
2
|
import { type CallDto } from "@sdk";
|
3
3
|
export declare function createCall(target: string, key: string, type?: tokenType, metaData?: any): CallDto;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { tokenType } from "
|
1
|
+
import { tokenType } from "@/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
2
2
|
import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerV3StablePoolInterface, BalancerVaultInterface, BeefyInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, CurveLPTokenInterface, CurveStableSwapNGInterface, DefutureVaultInterface, ERC20Interface, ERC4626Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, HourglassERC20TBTInterface, HourglassVedaLockDepositorV2Interface, IonicInterface, LPManagerHelperInterface, LPManagerInterface, LayerBankInterface, LendleInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxDatastoreInterface, RswEthStrategyInterface, SpectraYTInterface, SturdyInterface, SymetricAmbientStrategyInterface, SyncSwapClassicPoolInterface, TorosInterface, UniswapV2PoolInterface, VePufferInterface, ZFStableLPINterface, } from "@sdk";
|
3
3
|
export function createCall(target, key, type, metaData) {
|
4
4
|
switch (key) {
|
package/dist/src/utils/error.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { tokenType } from "
|
1
|
+
import { tokenType } from "@/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
2
2
|
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
3
|
export declare const stakingContractToStakingSymbol: {
|
4
4
|
[key: string]: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { tokenType } from "
|
1
|
+
import { tokenType } from "@/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
2
2
|
import { ChainId } from "@sdk";
|
3
3
|
export const stakingContractToStakingSymbol = {
|
4
4
|
"0x18eeD20f71BEf84B605253C89A7576E3634134C0": "CyberStaking",
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { tokenType } from "
|
1
|
+
import { tokenType } from "@/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
2
2
|
import type { Campaign, CampaignParameters } from "@sdk";
|
3
3
|
export declare function generateIcons(type: tokenType, typeInfo: any, campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.ERC20LOGPROCESSOR> | CampaignParameters<Campaign.ERC20REBASELOGPROCESSOR> | CampaignParameters<Campaign.EULER>, symbols?: string[]): string[];
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { tokenType } from "
|
2
|
-
import { OpportunityAction } from "
|
1
|
+
import { tokenType } from "@/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
2
|
+
import { OpportunityAction } from "@db/api";
|
3
3
|
export function generateIcons(type, typeInfo, campaign, symbols = [""]) {
|
4
4
|
const action = typeInfo.action ? typeInfo.action : "HOLD";
|
5
5
|
switch (action) {
|
package/dist/src/utils/pricer.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PriceSourceMethod } from "
|
1
|
+
import { PriceSourceMethod } from "@db/api";
|
2
2
|
import CoingeckoService from "./services/coinGeckoService";
|
3
3
|
import DefillamaService from "./services/defillamaService";
|
4
4
|
import DexScreenerService from "./services/dexScreenerService";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { PriceService as PriceSourceService } from "
|
2
|
-
import { PriceSourceMethod } from "
|
1
|
+
import { PriceService as PriceSourceService } from "@/modules/v4/price";
|
2
|
+
import { PriceSourceMethod } from "@db/api";
|
3
3
|
import { BN2Number, ChainId, Stable, registry } from "@sdk";
|
4
4
|
import axios from "axios";
|
5
5
|
import { Contract } from "ethers";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type PriceSource } from "
|
1
|
+
import { type PriceSource } from "@db/api";
|
2
2
|
import type PriceFetcher from "./priceFetcher";
|
3
3
|
import type { ResponsePriceType } from "./priceFetcher";
|
4
4
|
export default class CoingeckoService implements PriceFetcher {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type PriceSource } from "
|
1
|
+
import { type PriceSource } from "@db/api";
|
2
2
|
import type PriceFetcher from "./priceFetcher";
|
3
3
|
import type { ResponsePriceType } from "./priceFetcher";
|
4
4
|
export default class DefillamaService implements PriceFetcher {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type PriceSource } from "
|
1
|
+
import { type PriceSource } from "@db/api";
|
2
2
|
import type PriceFetcher from "./priceFetcher";
|
3
3
|
import type { ResponsePriceType } from "./priceFetcher";
|
4
4
|
export default class DexScreenerService implements PriceFetcher {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type PriceSource } from "
|
1
|
+
import { type PriceSource } from "@db/api";
|
2
2
|
import type PriceFetcher from "./priceFetcher";
|
3
3
|
import type { ResponsePriceType } from "./priceFetcher";
|
4
4
|
export default class ERC4626Service implements PriceFetcher {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { PriceService } from "
|
2
|
-
import { PriceSourceMethod } from "
|
1
|
+
import { PriceService } from "@/modules/v4/price";
|
2
|
+
import { PriceSourceMethod } from "@db/api";
|
3
3
|
import { log } from "../../logger";
|
4
4
|
import { getERC4626Price } from "./getERC4626";
|
5
5
|
export default class ERC4626Service {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { type PriceSource } from "
|
1
|
+
import { type PriceSource } from "@db/api";
|
2
2
|
import type PriceFetcher from "./priceFetcher";
|
3
3
|
import type { ResponsePriceType } from "./priceFetcher";
|
4
4
|
export default class IndexCoop implements PriceFetcher {
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { PrismaClient as EnginePrismaClient } from "
|
2
|
-
export declare const apiDbClient: import("database/api/.generated/runtime/library").DynamicClientExtensionThis<import("
|
1
|
+
import { PrismaClient as EnginePrismaClient } from "@db/engine";
|
2
|
+
export declare const apiDbClient: import("database/api/.generated/runtime/library").DynamicClientExtensionThis<import("@db/api").Prisma.TypeMap<import("database/api/.generated/runtime/library").InternalArgs & {
|
3
3
|
result: {};
|
4
4
|
model: {};
|
5
5
|
query: {};
|
6
6
|
client: {
|
7
7
|
$drizzle: () => import("drizzle-orm/prisma/pg").PrismaPgDatabase;
|
8
8
|
};
|
9
|
-
}, import("
|
9
|
+
}, import("@db/api").Prisma.PrismaClientOptions>, import("@db/api").Prisma.TypeMapCb, {
|
10
10
|
result: {};
|
11
11
|
model: {};
|
12
12
|
query: {};
|