@merkl/api 1.0.78 → 1.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cache/declaration.d.ts +133 -0
- package/dist/src/cache/index.d.ts +61 -0
- package/dist/src/cache/redis.d.ts +23 -0
- package/dist/src/constants.d.ts +86 -0
- package/dist/src/eden/index.d.ts +19038 -0
- package/dist/src/eden/index.js +2 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Ajna.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Badger.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Clamm.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Compound.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Dolomite.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/EigenLayer.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Encompassing.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.d.ts +108 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Erc20Snapshot.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Morpho.d.ts +9 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Radiant.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Silo.d.ts +9 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/UniswapV4.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/Vest.d.ts +9 -0
- package/dist/src/engine/deprecated/dynamicData/implementations/default.d.ts +5 -0
- package/dist/src/engine/deprecated/dynamicData/utils/fetchA51Strategies.d.ts +18 -0
- package/dist/src/engine/deprecated/dynamicData/utils/fetchClamInfo.d.ts +2 -0
- package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.d.ts +14 -0
- package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.d.ts +19 -0
- package/dist/src/engine/deprecated/dynamicData/utils/getContractCreationBlock.d.ts +2 -0
- package/dist/src/engine/deprecated/dynamicData/utils/getDolomiteMarkets.d.ts +8 -0
- package/dist/src/engine/deprecated/dynamicData/utils/getEulerV2Vaults.d.ts +7 -0
- package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.d.ts +8 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/GenericProcessor.d.ts +103 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/eulerVaultNames.d.ts +1 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +5 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getBlacklistedSupply.d.ts +2 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getCrossCurveTokenPrice.d.ts +1 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/hardcoded.d.ts +3 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +2 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/spliceTVL.d.ts +8 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/treasuryFinder.d.ts +2 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +30 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +35 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AssetProcessor.d.ts +35 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +107 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +85 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +75 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +88 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +44 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BeefyProcessor.d.ts +48 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BunniV2Processor.d.ts +45 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +44 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ERC4626Processor.d.ts +34 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EnzymeProcessor.d.ts +40 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.d.ts +28 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.d.ts +36 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerLendProcessor.d.ts +35 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +39 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FraxProcessor.d.ts +33 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaALMProcessor.d.ts +30 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaProcessor.d.ts +43 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +44 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +43 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +29 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +36 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +50 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +33 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.d.ts +38 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleProcessor.d.ts +29 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleYTProcessor.d.ts +29 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +32 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +40 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/Satlayer.d.ts +34 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraProcessor.d.ts +31 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraYTProcessor.d.ts +31 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +16 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/StabilityProcessor.d.ts +29 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +39 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TempestVaultProcessor.d.ts +52 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +32 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +30 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/UniswapProcessor.d.ts +44 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/VicunaProcessor.d.ts +28 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +32 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.d.ts +53 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +39 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +49 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.d.ts +4 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +54 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +38 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesPrices.d.ts +5 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.d.ts +4 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound2.d.ts +3 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound3.d.ts +3 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound4.d.ts +3 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeStruct.d.ts +7 -0
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.d.ts +7 -0
- package/dist/src/engine/implementations/Aave/metadata.d.ts +35 -0
- package/dist/src/engine/implementations/Aave/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Ajna/metadata.d.ts +19 -0
- package/dist/src/engine/implementations/Ajna/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Ambient/metadata.d.ts +19 -0
- package/dist/src/engine/implementations/Ambient/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Badger/metadata.d.ts +19 -0
- package/dist/src/engine/implementations/Clamm/metadata.d.ts +45 -0
- package/dist/src/engine/implementations/Compound/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/CompoundV3/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Default/metadata.d.ts +13 -0
- package/dist/src/engine/implementations/Dolomite/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/EigenLayer/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/EigenLayer/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Encompassing/metadata.d.ts +16 -0
- package/dist/src/engine/implementations/Erc20/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/detect.d.ts +8 -0
- package/dist/src/engine/implementations/Erc20/subTypes/factories.d.ts +5 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.d.ts +30 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/bunni/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/bunni/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.d.ts +20 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.d.ts +5 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gamma/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gamma/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.d.ts +30 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.d.ts +16 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/rooster/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/rooster/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/spectra/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/spectra/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.d.ts +31 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/mimswap/metadata.d.ts +30 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/mimswap/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +125 -0
- package/dist/src/engine/implementations/Erc20/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20Snapshot/metadata.d.ts +15 -0
- package/dist/src/engine/implementations/Erc721/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/ErcMultiToken/metadata.d.ts +29 -0
- package/dist/src/engine/implementations/EventBased/metadata.d.ts +24 -0
- package/dist/src/engine/implementations/FraxLend/metadataBorrow.d.ts +24 -0
- package/dist/src/engine/implementations/FraxLend/metadataCollateral.d.ts +18 -0
- package/dist/src/engine/implementations/FraxLend/tvlBorrow.d.ts +7 -0
- package/dist/src/engine/implementations/FraxLend/tvlCollateral.d.ts +7 -0
- package/dist/src/engine/implementations/Hyperdrive/metadata.d.ts +20 -0
- package/dist/src/engine/implementations/Invalid/metadata.d.ts +11 -0
- package/dist/src/engine/implementations/Ion/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +24 -0
- package/dist/src/engine/implementations/Locker/metadata.d.ts +24 -0
- package/dist/src/engine/implementations/Locker/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Morpho/metadata.d.ts +26 -0
- package/dist/src/engine/implementations/MultiLog/metadata.d.ts +8 -0
- package/dist/src/engine/implementations/MultiLog/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Radiant/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Silo/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/SymbioticVault/metadata.d.ts +20 -0
- package/dist/src/engine/implementations/SymbioticVault/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/UniswapV4/metadata.d.ts +20 -0
- package/dist/src/engine/implementations/UniswapV4/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/Vest/metadata.d.ts +17 -0
- package/dist/src/engine/implementations/morphoBorrow/metadata.d.ts +21 -0
- package/dist/src/engine/implementations/morphoBorrow/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/morphoBorrowSingleToken/metadata.d.ts +21 -0
- package/dist/src/engine/implementations/morphoCollateral/metadata.d.ts +21 -0
- package/dist/src/engine/implementations/morphoCollateral/tvl.d.ts +16 -0
- package/dist/src/engine/implementations/morphoCollateralSingleToken/metadata.d.ts +21 -0
- package/dist/src/engine/implementations/morphoCollateralSingleToken/tvl.d.ts +8 -0
- package/dist/src/engine/implementations/morphoSingleToken/tvl.d.ts +9 -0
- package/dist/src/engine/implementations/morphoSupply/metadata.d.ts +21 -0
- package/dist/src/engine/implementations/morphoSupply/tvl.d.ts +7 -0
- package/dist/src/engine/implementations/morphoSupplySingleToken/metadata.d.ts +21 -0
- package/dist/src/engine/implementations/morphoVault/metadata.d.ts +21 -0
- package/dist/src/engine/implementations/morphoVault/tvl.d.ts +7 -0
- package/dist/src/engine/metadata/factory.d.ts +3 -0
- package/dist/src/engine/tvl/factory.d.ts +6 -0
- package/dist/src/engine/tvl/logStates.d.ts +21 -0
- package/dist/src/errors/BadRequest.error.d.ts +4 -0
- package/dist/src/errors/Conflict.error.d.ts +4 -0
- package/dist/src/errors/HttpError.d.ts +11 -0
- package/dist/src/errors/InvalidParameter.error.d.ts +4 -0
- package/dist/src/errors/NotFound.error.d.ts +8 -0
- package/dist/src/errors/Opportunity.error.d.ts +6 -0
- package/dist/src/errors/UnableToFindPrice.error.d.ts +4 -0
- package/dist/src/errors/Unauthorized.error.d.ts +4 -0
- package/dist/src/errors/VoidString.error.d.ts +4 -0
- package/dist/src/errors/index.d.ts +6 -0
- package/dist/src/guards/BackOffice.guard.d.ts +7 -0
- package/dist/src/guards/Engine.guard.d.ts +7 -0
- package/dist/src/guards/TokenAuth.guard.d.ts +7 -0
- package/dist/src/guards/VerifyJwt.guard.d.ts +10 -0
- package/dist/src/hooks/checkQueryAddressValidity.d.ts +26 -0
- package/dist/src/hooks/checkQueryChainIdValidity.d.ts +26 -0
- package/dist/src/index.d.ts +10138 -0
- package/dist/src/jobs/pendings.d.ts +1 -0
- package/dist/src/jobs/prices.d.ts +1 -0
- package/dist/src/jobs/reward-breakdowns.d.ts +1 -0
- package/dist/src/jobs/rewards.d.ts +1 -0
- package/dist/src/jobs/set-dungeon-keeper.d.ts +1 -0
- package/dist/src/jobs/update-analytics.d.ts +1 -0
- package/dist/src/jobs/update-dynamic-data.d.ts +1 -0
- package/dist/src/jobs/update-euler-vaults.d.ts +1 -0
- package/dist/src/jobs/update-rpc-calls-cache.d.ts +1 -0
- package/dist/src/jobs/update-uniswap-v4-pools.d.ts +1 -0
- package/dist/src/jobs/update-v3-caches.d.ts +12 -0
- package/dist/src/libs/computeFee.d.ts +4 -0
- package/dist/src/libs/deprecated-merklv3/index.d.ts +5 -0
- package/dist/src/libs/getTokensList.d.ts +23 -0
- package/dist/src/libs/merklChainData.d.ts +4 -0
- package/dist/src/libs/parse/marketsWithCache.d.ts +4 -0
- package/dist/src/libs/positions/EigenLayer/index.d.ts +6 -0
- package/dist/src/libs/positions/ajna/index.d.ts +6 -0
- package/dist/src/libs/positions/badger/index.d.ts +6 -0
- package/dist/src/libs/positions/clamm/index.d.ts +7 -0
- package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.d.ts +5 -0
- package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.d.ts +8 -0
- package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.d.ts +10 -0
- package/dist/src/libs/positions/clamm/thegraph/index.d.ts +40 -0
- package/dist/src/libs/positions/compound/index.d.ts +24 -0
- package/dist/src/libs/positions/dolomite/index.d.ts +17 -0
- package/dist/src/libs/positions/erc20/index.d.ts +5 -0
- package/dist/src/libs/positions/euler/index.d.ts +5 -0
- package/dist/src/libs/positions/index.d.ts +3 -0
- package/dist/src/libs/positions/morpho/index.d.ts +6 -0
- package/dist/src/libs/positions/prepareFetch.d.ts +22 -0
- package/dist/src/libs/positions/silo/index.d.ts +5 -0
- package/dist/src/libs/positions/types.d.ts +75 -0
- package/dist/src/libs/staticCampaigns.d.ts +7 -0
- package/dist/src/libs/tokens/allowances.d.ts +1 -0
- package/dist/src/libs/tokens/balances.d.ts +11 -0
- package/dist/src/libs/tokens/tokenInfo.d.ts +8 -0
- package/dist/src/modules/v4/accounting/accounting.controller.d.ts +284 -0
- package/dist/src/modules/v4/accounting/accounting.model.d.ts +32 -0
- package/dist/src/modules/v4/accounting/accounting.repository.d.ts +99 -0
- package/dist/src/modules/v4/accounting/accounting.service.d.ts +59 -0
- package/dist/src/modules/v4/airflow/airflow.service.d.ts +3 -0
- package/dist/src/modules/v4/apr/apr.model.d.ts +54 -0
- package/dist/src/modules/v4/apr/apr.service.d.ts +9 -0
- package/dist/src/modules/v4/authentication/authentication.controller.d.ts +74 -0
- package/dist/src/modules/v4/authentication/authentication.model.d.ts +10 -0
- package/dist/src/modules/v4/authentication/authentication.service.d.ts +10 -0
- package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +150 -0
- package/dist/src/modules/v4/blacklist/blacklist.model.d.ts +20 -0
- package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +21 -0
- package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +24 -0
- package/dist/src/modules/v4/boost/boost.controller.d.ts +110 -0
- package/dist/src/modules/v4/boost/boost.model.d.ts +12 -0
- package/dist/src/modules/v4/boost/boost.service.d.ts +11 -0
- package/dist/src/modules/v4/bucket/bucket.model.d.ts +10 -0
- package/dist/src/modules/v4/bucket/bucket.service.d.ts +14 -0
- package/dist/src/modules/v4/cache/cache.model.d.ts +13 -0
- package/dist/src/modules/v4/cache/cache.repository.d.ts +8 -0
- package/dist/src/modules/v4/cache/cache.service.d.ts +12 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1008 -0
- package/dist/src/modules/v4/campaign/campaign.convertor.d.ts +9 -0
- package/dist/src/modules/v4/campaign/campaign.formatter.d.ts +6 -0
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +227 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +999 -0
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +405 -0
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +566 -0
- package/dist/src/modules/v4/chain/chain.controller.d.ts +194 -0
- package/dist/src/modules/v4/chain/chain.model.d.ts +52 -0
- package/dist/src/modules/v4/chain/chain.repository.d.ts +104 -0
- package/dist/src/modules/v4/chain/chain.service.d.ts +83 -0
- package/dist/src/modules/v4/chainInteraction/chainInteraction.service.d.ts +2 -0
- package/dist/src/modules/v4/claims/claims.controller.d.ts +55 -0
- package/dist/src/modules/v4/claims/claims.model.d.ts +9 -0
- package/dist/src/modules/v4/claims/claims.repository.d.ts +5 -0
- package/dist/src/modules/v4/claims/claims.service.d.ts +9 -0
- package/dist/src/modules/v4/coingecko/coingecko.model.d.ts +0 -0
- package/dist/src/modules/v4/coingecko/coingecko.repository.d.ts +14 -0
- package/dist/src/modules/v4/coingecko/coingecko.service.d.ts +16 -0
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +164 -0
- package/dist/src/modules/v4/computedValue/computedValue.model.d.ts +27 -0
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +21 -0
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +22 -0
- package/dist/src/modules/v4/creator/creator.controller.d.ts +456 -0
- package/dist/src/modules/v4/creator/creator.model.d.ts +59 -0
- package/dist/src/modules/v4/creator/creator.repository.d.ts +97 -0
- package/dist/src/modules/v4/creator/creator.service.d.ts +192 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +20 -0
- package/dist/src/modules/v4/enso/enso.model.d.ts +166 -0
- package/dist/src/modules/v4/enso/enso.service.d.ts +69 -0
- package/dist/src/modules/v4/explorer/explorer.controller.d.ts +58 -0
- package/dist/src/modules/v4/explorer/explorer.model.d.ts +16 -0
- package/dist/src/modules/v4/explorer/explorer.repository.d.ts +21 -0
- package/dist/src/modules/v4/explorer/explorer.service.d.ts +28 -0
- package/dist/src/modules/v4/icon/icon.model.d.ts +4 -0
- package/dist/src/modules/v4/icon/icon.service.d.ts +5 -0
- package/dist/src/modules/v4/interaction/interaction.controller.d.ts +128 -0
- package/dist/src/modules/v4/interaction/interaction.model.d.ts +110 -0
- package/dist/src/modules/v4/interaction/interaction.service.d.ts +38 -0
- package/dist/src/modules/v4/kyberzap/kyberzap.model.d.ts +114 -0
- package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +34 -0
- package/dist/src/modules/v4/liquidity/implementations/AjnaPositionFetcher.d.ts +6 -0
- package/dist/src/modules/v4/liquidity/implementations/BadgerPositionFetcher.d.ts +6 -0
- package/dist/src/modules/v4/liquidity/implementations/ClammPositionFetcher.d.ts +6 -0
- package/dist/src/modules/v4/liquidity/implementations/DolomitePositionFetcher.d.ts +6 -0
- package/dist/src/modules/v4/liquidity/implementations/ERC20PositionFetcher.d.ts +6 -0
- package/dist/src/modules/v4/liquidity/implementations/EulerPositionFetcher.d.ts +6 -0
- package/dist/src/modules/v4/liquidity/liquidity.controller.d.ts +50 -0
- package/dist/src/modules/v4/liquidity/liquidity.model.d.ts +25 -0
- package/dist/src/modules/v4/liquidity/liquidity.repository.d.ts +14 -0
- package/dist/src/modules/v4/liquidity/liquidity.service.d.ts +5 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +113 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.model.d.ts +13 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +23 -0
- package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +44 -0
- package/dist/src/modules/v4/node/node.controller.d.ts +65 -0
- package/dist/src/modules/v4/node/node.model.d.ts +27 -0
- package/dist/src/modules/v4/node/node.repository.d.ts +31 -0
- package/dist/src/modules/v4/node/node.service.d.ts +27 -0
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +1381 -0
- package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +131 -0
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +174 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +499 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +1052 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +704 -0
- package/dist/src/modules/v4/opportunity/transform-id.pipe.d.ts +5 -0
- package/dist/src/modules/v4/opportunity/validate-id.pipe.d.ts +5 -0
- package/dist/src/modules/v4/parse/parse.controller.d.ts +64 -0
- package/dist/src/modules/v4/parse/parse.model.d.ts +10 -0
- package/dist/src/modules/v4/payload/payload.controller.d.ts +127 -0
- package/dist/src/modules/v4/payload/payload.model.d.ts +309 -0
- package/dist/src/modules/v4/payload/payload.service.d.ts +27 -0
- package/dist/src/modules/v4/price/price.controller.d.ts +267 -0
- package/dist/src/modules/v4/price/price.model.d.ts +38 -0
- package/dist/src/modules/v4/price/price.repository.d.ts +41 -0
- package/dist/src/modules/v4/price/price.service.d.ts +51 -0
- package/dist/src/modules/v4/prisma/index.d.ts +54 -0
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +1190 -0
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +334 -0
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +3237 -0
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +50 -0
- package/dist/src/modules/v4/programPayload/subPayloads/hypurrFi.d.ts +72 -0
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +290 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +107 -0
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +89 -0
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +35 -0
- package/dist/src/modules/v4/referral/referral.controller.d.ts +104 -0
- package/dist/src/modules/v4/referral/referral.model.d.ts +10 -0
- package/dist/src/modules/v4/referral/referral.service.d.ts +216 -0
- package/dist/src/modules/v4/reward/reward.controller.d.ts +598 -0
- package/dist/src/modules/v4/reward/reward.converter.d.ts +14 -0
- package/dist/src/modules/v4/reward/reward.model.d.ts +260 -0
- package/dist/src/modules/v4/reward/reward.repository.d.ts +174 -0
- package/dist/src/modules/v4/reward/reward.service.d.ts +753 -0
- package/dist/src/modules/v4/router.d.ts +8568 -0
- package/dist/src/modules/v4/status/status.controller.d.ts +303 -0
- package/dist/src/modules/v4/status/status.model.d.ts +63 -0
- package/dist/src/modules/v4/status/status.repository.d.ts +104 -0
- package/dist/src/modules/v4/status/status.service.d.ts +89 -0
- package/dist/src/modules/v4/token/token.controller.d.ts +499 -0
- package/dist/src/modules/v4/token/token.model.d.ts +125 -0
- package/dist/src/modules/v4/token/token.repository.d.ts +138 -0
- package/dist/src/modules/v4/token/token.service.d.ts +361 -0
- package/dist/src/modules/v4/tracer/tracer.service.d.ts +3 -0
- package/dist/src/modules/v4/turtle/turtle.controller.d.ts +81 -0
- package/dist/src/modules/v4/turtle/turtle.repository.d.ts +14 -0
- package/dist/src/modules/v4/turtle/turtle.service.d.ts +17 -0
- package/dist/src/modules/v4/tvl/tvl.model.d.ts +35 -0
- package/dist/src/modules/v4/tvl/tvl.service.d.ts +9 -0
- package/dist/src/modules/v4/uniswap/uniswap.controller.d.ts +480 -0
- package/dist/src/modules/v4/uniswap/uniswap.model.d.ts +55 -0
- package/dist/src/modules/v4/uniswap/uniswap.repository.d.ts +24 -0
- package/dist/src/modules/v4/uniswap/uniswap.service.d.ts +21 -0
- package/dist/src/modules/v4/user/user.controller.d.ts +445 -0
- package/dist/src/modules/v4/user/user.model.d.ts +85 -0
- package/dist/src/modules/v4/user/user.repository.d.ts +34 -0
- package/dist/src/modules/v4/user/user.service.d.ts +37 -0
- package/dist/src/plugins/errorHandler.d.ts +33 -0
- package/dist/src/routes/v1/allowances.d.ts +80 -0
- package/dist/src/routes/v1/balances.d.ts +63 -0
- package/dist/src/routes/v1/prices.d.ts +55 -0
- package/dist/src/routes/v1/router.d.ts +142 -0
- package/dist/src/routes/v1/tokens.d.ts +58 -0
- package/dist/src/routes/v2/merkl.d.ts +92 -0
- package/dist/src/routes/v2/router.d.ts +83 -0
- package/dist/src/routes/v3/app.d.ts +61 -0
- package/dist/src/routes/v3/blacklist.d.ts +58 -0
- package/dist/src/routes/v3/campaign/delay.d.ts +60 -0
- package/dist/src/routes/v3/campaignClaims.d.ts +61 -0
- package/dist/src/routes/v3/campaignUnclaimed.d.ts +60 -0
- package/dist/src/routes/v3/campaigns.d.ts +71 -0
- package/dist/src/routes/v3/campaignsForMainParameter.d.ts +67 -0
- package/dist/src/routes/v3/campaignsRewardsReport.d.ts +60 -0
- package/dist/src/routes/v3/claims.d.ts +61 -0
- package/dist/src/routes/v3/compoundV2.d.ts +55 -0
- package/dist/src/routes/v3/createCampaign.d.ts +60 -0
- package/dist/src/routes/v3/dolomite.d.ts +59 -0
- package/dist/src/routes/v3/euler.d.ts +114 -0
- package/dist/src/routes/v3/fetch.d.ts +59 -0
- package/dist/src/routes/v3/health.d.ts +54 -0
- package/dist/src/routes/v3/lostyield.d.ts +66 -0
- package/dist/src/routes/v3/merkl.d.ts +116 -0
- package/dist/src/routes/v3/morphoMarkets.d.ts +75 -0
- package/dist/src/routes/v3/morphoVaults.d.ts +65 -0
- package/dist/src/routes/v3/multiChainPositions.d.ts +58 -0
- package/dist/src/routes/v3/opportunity.d.ts +127 -0
- package/dist/src/routes/v3/overview.d.ts +91 -0
- package/dist/src/routes/v3/parse.d.ts +60 -0
- package/dist/src/routes/v3/payload.d.ts +71 -0
- package/dist/src/routes/v3/poolInfo.d.ts +62 -0
- package/dist/src/routes/v3/positions.d.ts +75 -0
- package/dist/src/routes/v3/radiant.d.ts +69 -0
- package/dist/src/routes/v3/recipients.d.ts +59 -0
- package/dist/src/routes/v3/rewards.d.ts +86 -0
- package/dist/src/routes/v3/rewardsReport.d.ts +69 -0
- package/dist/src/routes/v3/router.d.ts +1403 -0
- package/dist/src/routes/v3/silo.d.ts +66 -0
- package/dist/src/routes/v3/token.d.ts +64 -0
- package/dist/src/routes/v3/twt/participants.d.ts +52 -0
- package/dist/src/routes/v3/uniswapv4.d.ts +252 -0
- package/dist/src/routes/v3/updates.d.ts +66 -0
- package/dist/src/routes/v3/userRewards.d.ts +82 -0
- package/dist/src/scripts/fill-coingecko-data.d.ts +1 -0
- package/dist/src/scripts/fill-descriptions.d.ts +1 -0
- package/dist/src/scripts/fill-unknown-tokens.d.ts +1 -0
- package/dist/src/scripts/reparse-opportunities.d.ts +1 -0
- package/dist/src/types/external/spectraAPI.d.ts +88 -0
- package/dist/src/types/index.d.ts +17 -0
- package/dist/src/utils/TailSampler.d.ts +8 -0
- package/dist/src/utils/bigintToString.d.ts +1 -0
- package/dist/src/utils/caseChanges.d.ts +4 -0
- package/dist/src/utils/decodeCalls.d.ts +3 -0
- package/dist/src/utils/encodeCalls.d.ts +3 -0
- package/dist/src/utils/error.d.ts +70 -0
- package/dist/src/utils/execute.d.ts +22 -0
- package/dist/src/utils/generateCardName.d.ts +6 -0
- package/dist/src/utils/generic.d.ts +7 -0
- package/dist/src/utils/hashArray.d.ts +2 -0
- package/dist/src/utils/lastBlockBefore.d.ts +3 -0
- package/dist/src/utils/logger.d.ts +54 -0
- package/dist/src/utils/pagination.d.ts +11 -0
- package/dist/src/utils/parseDistributionType.d.ts +1 -0
- package/dist/src/utils/pricer.d.ts +57 -0
- package/dist/src/utils/prices/chainlinkRead.d.ts +4 -0
- package/dist/src/utils/prices/curveVirtualPrice.d.ts +4 -0
- package/dist/src/utils/prices/getDQUICK.d.ts +4 -0
- package/dist/src/utils/prices/priceFetcherFactory.d.ts +10 -0
- package/dist/src/utils/prices/priceService.d.ts +13 -0
- package/dist/src/utils/prices/services/OnChainCallService.d.ts +8 -0
- package/dist/src/utils/prices/services/coinGeckoService.d.ts +12 -0
- package/dist/src/utils/prices/services/defillamaService.d.ts +12 -0
- package/dist/src/utils/prices/services/dexScreenerService.d.ts +12 -0
- package/dist/src/utils/prices/services/erc4626Service.d.ts +9 -0
- package/dist/src/utils/prices/services/getERC4626.d.ts +4 -0
- package/dist/src/utils/prices/services/indexCoopService.d.ts +12 -0
- package/dist/src/utils/prices/services/priceFetcher.d.ts +8 -0
- package/dist/src/utils/prices/services/uniswapV2PriceService.d.ts +8 -0
- package/dist/src/utils/prices/uniV2Price.d.ts +7 -0
- package/dist/src/utils/providers.d.ts +128 -0
- package/dist/src/utils/queries/allCampaigns.d.ts +1 -0
- package/dist/src/utils/sanitizeChain.d.ts +2 -0
- package/dist/src/utils/stryke.d.ts +2 -0
- package/dist/src/utils/throw.d.ts +22 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -0,0 +1,1052 @@
|
|
1
|
+
import { type MerklChainId } from "@angleprotocol/sdk/ts";
|
2
|
+
import { type Prisma, Status } from "@package/databases/api";
|
3
|
+
import type { AprRecord } from "../../../modules/v4/apr/apr.model";
|
4
|
+
import type { Campaign } from "../../../modules/v4/campaign/campaign.model";
|
5
|
+
import type { DailyRewardsRecord } from "../../../modules/v4/reward/reward.model";
|
6
|
+
import type { TvlRecord } from "../../../modules/v4/tvl/tvl.model";
|
7
|
+
import type { CreateOpportunityModel, FindOpportunityModel, GetOpportunitiesQueryModel, Opportunity } from "./opportunity.model";
|
8
|
+
export declare abstract class OpportunityRepository {
|
9
|
+
#private;
|
10
|
+
static create(newOpp: CreateOpportunityModel & {
|
11
|
+
id: string;
|
12
|
+
}, upsert?: boolean): Promise<{
|
13
|
+
Tokens: {
|
14
|
+
symbol: string;
|
15
|
+
name: string | null;
|
16
|
+
decimals: number;
|
17
|
+
price: number | null;
|
18
|
+
address: string;
|
19
|
+
id: string;
|
20
|
+
chainId: number;
|
21
|
+
icon: string;
|
22
|
+
isNative: boolean;
|
23
|
+
isPoint: boolean;
|
24
|
+
isPreTGE: boolean;
|
25
|
+
isTest: boolean;
|
26
|
+
verified: boolean;
|
27
|
+
displaySymbol: string;
|
28
|
+
}[];
|
29
|
+
Protocols: {
|
30
|
+
name: string;
|
31
|
+
description: string;
|
32
|
+
id: string;
|
33
|
+
url: string;
|
34
|
+
icon: string;
|
35
|
+
tags: string[];
|
36
|
+
}[];
|
37
|
+
} & {
|
38
|
+
name: string;
|
39
|
+
apr: number;
|
40
|
+
tvl: number;
|
41
|
+
description: string;
|
42
|
+
id: string;
|
43
|
+
status: import("@package/databases").Status;
|
44
|
+
chainId: number;
|
45
|
+
action: import("@package/databases").OpportunityAction;
|
46
|
+
type: string;
|
47
|
+
depositUrl: string | null;
|
48
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
49
|
+
identifier: string;
|
50
|
+
howToSteps: string[];
|
51
|
+
explorerAddress: string | null;
|
52
|
+
mainProtocolId: string | null;
|
53
|
+
dailyRewards: number;
|
54
|
+
tags: string[];
|
55
|
+
lastCampaignCreatedAt: Date;
|
56
|
+
}>;
|
57
|
+
static findUnique(id: string): Promise<({
|
58
|
+
Chain: {
|
59
|
+
name: string;
|
60
|
+
id: number;
|
61
|
+
icon: string;
|
62
|
+
};
|
63
|
+
Campaigns: ({
|
64
|
+
RewardToken: {
|
65
|
+
symbol: string;
|
66
|
+
name: string | null;
|
67
|
+
decimals: number;
|
68
|
+
price: number | null;
|
69
|
+
address: string;
|
70
|
+
id: string;
|
71
|
+
chainId: number;
|
72
|
+
icon: string;
|
73
|
+
isNative: boolean;
|
74
|
+
isPoint: boolean;
|
75
|
+
isPreTGE: boolean;
|
76
|
+
isTest: boolean;
|
77
|
+
verified: boolean;
|
78
|
+
displaySymbol: string;
|
79
|
+
};
|
80
|
+
} & {
|
81
|
+
campaignId: string;
|
82
|
+
description: string | null;
|
83
|
+
id: string;
|
84
|
+
params: import("@prisma/client/runtime/client").JsonValue;
|
85
|
+
amount: string;
|
86
|
+
startTimestamp: bigint;
|
87
|
+
type: string;
|
88
|
+
computeChainId: number;
|
89
|
+
distributionChainId: number;
|
90
|
+
endTimestamp: bigint;
|
91
|
+
distributionType: import("@package/databases").DistributionType;
|
92
|
+
subType: number | null;
|
93
|
+
rewardTokenId: string;
|
94
|
+
opportunityId: string;
|
95
|
+
creatorAddress: string;
|
96
|
+
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
97
|
+
createdAt: Date;
|
98
|
+
rootCampaignId: string | null;
|
99
|
+
parentCampaignId: string | null;
|
100
|
+
})[];
|
101
|
+
Tokens: {
|
102
|
+
symbol: string;
|
103
|
+
name: string | null;
|
104
|
+
decimals: number;
|
105
|
+
price: number | null;
|
106
|
+
address: string;
|
107
|
+
id: string;
|
108
|
+
chainId: number;
|
109
|
+
icon: string;
|
110
|
+
isNative: boolean;
|
111
|
+
isPoint: boolean;
|
112
|
+
isPreTGE: boolean;
|
113
|
+
isTest: boolean;
|
114
|
+
verified: boolean;
|
115
|
+
displaySymbol: string;
|
116
|
+
}[];
|
117
|
+
Protocols: {
|
118
|
+
name: string;
|
119
|
+
description: string;
|
120
|
+
id: string;
|
121
|
+
url: string;
|
122
|
+
icon: string;
|
123
|
+
tags: string[];
|
124
|
+
}[];
|
125
|
+
MainProtocol: {
|
126
|
+
name: string;
|
127
|
+
description: string;
|
128
|
+
id: string;
|
129
|
+
url: string;
|
130
|
+
icon: string;
|
131
|
+
tags: string[];
|
132
|
+
} | null;
|
133
|
+
TvlRecords: ({
|
134
|
+
TvlBreakdown: {
|
135
|
+
value: number;
|
136
|
+
type: import("@package/databases").TvlType;
|
137
|
+
identifier: string;
|
138
|
+
}[];
|
139
|
+
} & {
|
140
|
+
id: string;
|
141
|
+
timestamp: bigint;
|
142
|
+
opportunityId: string;
|
143
|
+
total: number;
|
144
|
+
})[];
|
145
|
+
AprRecords: ({
|
146
|
+
AprBreakdown: {
|
147
|
+
value: number;
|
148
|
+
type: import("@package/databases").AprType;
|
149
|
+
identifier: string;
|
150
|
+
}[];
|
151
|
+
} & {
|
152
|
+
id: string;
|
153
|
+
timestamp: bigint;
|
154
|
+
opportunityId: string;
|
155
|
+
cumulated: number;
|
156
|
+
})[];
|
157
|
+
DailyRewardsRecords: ({
|
158
|
+
DailyRewardsBreakdown: ({
|
159
|
+
Campaign: {
|
160
|
+
campaignId: string;
|
161
|
+
amount: string;
|
162
|
+
startTimestamp: bigint;
|
163
|
+
endTimestamp: bigint;
|
164
|
+
CampaignStatus: {
|
165
|
+
campaignId: string;
|
166
|
+
error: string;
|
167
|
+
status: import("@package/databases").RunStatus;
|
168
|
+
details: import("@prisma/client/runtime/client").JsonValue;
|
169
|
+
computedUntil: bigint;
|
170
|
+
processingStarted: bigint;
|
171
|
+
}[];
|
172
|
+
distributionType: import("@package/databases").DistributionType;
|
173
|
+
RewardToken: {
|
174
|
+
symbol: string;
|
175
|
+
name: string | null;
|
176
|
+
decimals: number;
|
177
|
+
price: number | null;
|
178
|
+
address: string;
|
179
|
+
id: string;
|
180
|
+
chainId: number;
|
181
|
+
icon: string;
|
182
|
+
isNative: boolean;
|
183
|
+
isPoint: boolean;
|
184
|
+
isPreTGE: boolean;
|
185
|
+
isTest: boolean;
|
186
|
+
verified: boolean;
|
187
|
+
displaySymbol: string;
|
188
|
+
};
|
189
|
+
};
|
190
|
+
} & {
|
191
|
+
campaignId: string;
|
192
|
+
id: string;
|
193
|
+
value: number;
|
194
|
+
dailyRewardsRecordId: string;
|
195
|
+
})[];
|
196
|
+
} & {
|
197
|
+
id: string;
|
198
|
+
timestamp: bigint;
|
199
|
+
opportunityId: string;
|
200
|
+
total: number;
|
201
|
+
})[];
|
202
|
+
} & {
|
203
|
+
name: string;
|
204
|
+
apr: number;
|
205
|
+
tvl: number;
|
206
|
+
description: string;
|
207
|
+
id: string;
|
208
|
+
status: import("@package/databases").Status;
|
209
|
+
chainId: number;
|
210
|
+
action: import("@package/databases").OpportunityAction;
|
211
|
+
type: string;
|
212
|
+
depositUrl: string | null;
|
213
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
214
|
+
identifier: string;
|
215
|
+
howToSteps: string[];
|
216
|
+
explorerAddress: string | null;
|
217
|
+
mainProtocolId: string | null;
|
218
|
+
dailyRewards: number;
|
219
|
+
tags: string[];
|
220
|
+
lastCampaignCreatedAt: Date;
|
221
|
+
}) | null>;
|
222
|
+
static findUniqueOrThrow(id: string, query: FindOpportunityModel): Promise<{
|
223
|
+
Chain: {
|
224
|
+
name: string;
|
225
|
+
id: number;
|
226
|
+
icon: string;
|
227
|
+
};
|
228
|
+
Campaigns: {
|
229
|
+
campaignId: string;
|
230
|
+
description: string | null;
|
231
|
+
id: string;
|
232
|
+
params: import("@prisma/client/runtime/client").JsonValue;
|
233
|
+
amount: string;
|
234
|
+
startTimestamp: bigint;
|
235
|
+
type: string;
|
236
|
+
computeChainId: number;
|
237
|
+
distributionChainId: number;
|
238
|
+
endTimestamp: bigint;
|
239
|
+
distributionType: import("@package/databases").DistributionType;
|
240
|
+
subType: number | null;
|
241
|
+
rewardTokenId: string;
|
242
|
+
opportunityId: string;
|
243
|
+
creatorAddress: string;
|
244
|
+
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
245
|
+
createdAt: Date;
|
246
|
+
rootCampaignId: string | null;
|
247
|
+
parentCampaignId: string | null;
|
248
|
+
}[];
|
249
|
+
Tokens: {
|
250
|
+
symbol: string;
|
251
|
+
name: string | null;
|
252
|
+
decimals: number;
|
253
|
+
price: number | null;
|
254
|
+
address: string;
|
255
|
+
id: string;
|
256
|
+
chainId: number;
|
257
|
+
icon: string;
|
258
|
+
isNative: boolean;
|
259
|
+
isPoint: boolean;
|
260
|
+
isPreTGE: boolean;
|
261
|
+
isTest: boolean;
|
262
|
+
verified: boolean;
|
263
|
+
displaySymbol: string;
|
264
|
+
}[];
|
265
|
+
Protocols: {
|
266
|
+
name: string;
|
267
|
+
description: string;
|
268
|
+
id: string;
|
269
|
+
url: string;
|
270
|
+
icon: string;
|
271
|
+
tags: string[];
|
272
|
+
}[];
|
273
|
+
MainProtocol: {
|
274
|
+
name: string;
|
275
|
+
description: string;
|
276
|
+
id: string;
|
277
|
+
url: string;
|
278
|
+
icon: string;
|
279
|
+
tags: string[];
|
280
|
+
} | null;
|
281
|
+
TvlRecords: ({
|
282
|
+
TvlBreakdown: {
|
283
|
+
value: number;
|
284
|
+
type: import("@package/databases").TvlType;
|
285
|
+
identifier: string;
|
286
|
+
}[];
|
287
|
+
} & {
|
288
|
+
id: string;
|
289
|
+
timestamp: bigint;
|
290
|
+
opportunityId: string;
|
291
|
+
total: number;
|
292
|
+
})[];
|
293
|
+
AprRecords: ({
|
294
|
+
AprBreakdown: {
|
295
|
+
value: number;
|
296
|
+
type: import("@package/databases").AprType;
|
297
|
+
identifier: string;
|
298
|
+
}[];
|
299
|
+
} & {
|
300
|
+
id: string;
|
301
|
+
timestamp: bigint;
|
302
|
+
opportunityId: string;
|
303
|
+
cumulated: number;
|
304
|
+
})[];
|
305
|
+
DailyRewardsRecords: ({
|
306
|
+
DailyRewardsBreakdown: ({
|
307
|
+
Campaign: {
|
308
|
+
campaignId: string;
|
309
|
+
amount: string;
|
310
|
+
startTimestamp: bigint;
|
311
|
+
endTimestamp: bigint;
|
312
|
+
CampaignStatus: {
|
313
|
+
campaignId: string;
|
314
|
+
error: string;
|
315
|
+
status: import("@package/databases").RunStatus;
|
316
|
+
details: import("@prisma/client/runtime/client").JsonValue;
|
317
|
+
computedUntil: bigint;
|
318
|
+
processingStarted: bigint;
|
319
|
+
}[];
|
320
|
+
distributionType: import("@package/databases").DistributionType;
|
321
|
+
RewardToken: {
|
322
|
+
symbol: string;
|
323
|
+
name: string | null;
|
324
|
+
decimals: number;
|
325
|
+
price: number | null;
|
326
|
+
address: string;
|
327
|
+
id: string;
|
328
|
+
chainId: number;
|
329
|
+
icon: string;
|
330
|
+
isNative: boolean;
|
331
|
+
isPoint: boolean;
|
332
|
+
isPreTGE: boolean;
|
333
|
+
isTest: boolean;
|
334
|
+
verified: boolean;
|
335
|
+
displaySymbol: string;
|
336
|
+
};
|
337
|
+
};
|
338
|
+
} & {
|
339
|
+
campaignId: string;
|
340
|
+
id: string;
|
341
|
+
value: number;
|
342
|
+
dailyRewardsRecordId: string;
|
343
|
+
})[];
|
344
|
+
} & {
|
345
|
+
id: string;
|
346
|
+
timestamp: bigint;
|
347
|
+
opportunityId: string;
|
348
|
+
total: number;
|
349
|
+
})[];
|
350
|
+
} & {
|
351
|
+
name: string;
|
352
|
+
apr: number;
|
353
|
+
tvl: number;
|
354
|
+
description: string;
|
355
|
+
id: string;
|
356
|
+
status: import("@package/databases").Status;
|
357
|
+
chainId: number;
|
358
|
+
action: import("@package/databases").OpportunityAction;
|
359
|
+
type: string;
|
360
|
+
depositUrl: string | null;
|
361
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
362
|
+
identifier: string;
|
363
|
+
howToSteps: string[];
|
364
|
+
explorerAddress: string | null;
|
365
|
+
mainProtocolId: string | null;
|
366
|
+
dailyRewards: number;
|
367
|
+
tags: string[];
|
368
|
+
lastCampaignCreatedAt: Date;
|
369
|
+
}>;
|
370
|
+
/**
|
371
|
+
* Gets opportunities and campaigns based on a campaign filter
|
372
|
+
*/
|
373
|
+
static findManyByCampaigns(where: Campaign["action"]["findMany"]["args"]["where"]): Promise<({
|
374
|
+
Chain: {
|
375
|
+
Explorer: {
|
376
|
+
id: string;
|
377
|
+
chainId: number;
|
378
|
+
type: import("@package/databases").ExplorerType;
|
379
|
+
url: string;
|
380
|
+
}[];
|
381
|
+
} & {
|
382
|
+
name: string;
|
383
|
+
id: number;
|
384
|
+
icon: string;
|
385
|
+
};
|
386
|
+
Campaigns: ({
|
387
|
+
CampaignStatus: {
|
388
|
+
campaignId: string;
|
389
|
+
error: string;
|
390
|
+
status: import("@package/databases").RunStatus;
|
391
|
+
details: import("@prisma/client/runtime/client").JsonValue;
|
392
|
+
computedUntil: bigint;
|
393
|
+
processingStarted: bigint;
|
394
|
+
}[];
|
395
|
+
Creator: {
|
396
|
+
address: string;
|
397
|
+
tags: string[];
|
398
|
+
creatorId: string | null;
|
399
|
+
};
|
400
|
+
ComputeChain: {
|
401
|
+
name: string;
|
402
|
+
id: number;
|
403
|
+
icon: string;
|
404
|
+
};
|
405
|
+
DistributionChain: {
|
406
|
+
Explorer: {
|
407
|
+
id: string;
|
408
|
+
chainId: number;
|
409
|
+
type: import("@package/databases").ExplorerType;
|
410
|
+
url: string;
|
411
|
+
}[];
|
412
|
+
} & {
|
413
|
+
name: string;
|
414
|
+
id: number;
|
415
|
+
icon: string;
|
416
|
+
};
|
417
|
+
RewardToken: {
|
418
|
+
symbol: string;
|
419
|
+
name: string | null;
|
420
|
+
decimals: number;
|
421
|
+
price: number | null;
|
422
|
+
address: string;
|
423
|
+
id: string;
|
424
|
+
chainId: number;
|
425
|
+
icon: string;
|
426
|
+
isNative: boolean;
|
427
|
+
isPoint: boolean;
|
428
|
+
isPreTGE: boolean;
|
429
|
+
isTest: boolean;
|
430
|
+
verified: boolean;
|
431
|
+
displaySymbol: string;
|
432
|
+
};
|
433
|
+
} & {
|
434
|
+
campaignId: string;
|
435
|
+
description: string | null;
|
436
|
+
id: string;
|
437
|
+
params: import("@prisma/client/runtime/client").JsonValue;
|
438
|
+
amount: string;
|
439
|
+
startTimestamp: bigint;
|
440
|
+
type: string;
|
441
|
+
computeChainId: number;
|
442
|
+
distributionChainId: number;
|
443
|
+
endTimestamp: bigint;
|
444
|
+
distributionType: import("@package/databases").DistributionType;
|
445
|
+
subType: number | null;
|
446
|
+
rewardTokenId: string;
|
447
|
+
opportunityId: string;
|
448
|
+
creatorAddress: string;
|
449
|
+
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
450
|
+
createdAt: Date;
|
451
|
+
rootCampaignId: string | null;
|
452
|
+
parentCampaignId: string | null;
|
453
|
+
})[];
|
454
|
+
Tokens: {
|
455
|
+
symbol: string;
|
456
|
+
name: string | null;
|
457
|
+
decimals: number;
|
458
|
+
price: number | null;
|
459
|
+
address: string;
|
460
|
+
id: string;
|
461
|
+
chainId: number;
|
462
|
+
icon: string;
|
463
|
+
isNative: boolean;
|
464
|
+
isPoint: boolean;
|
465
|
+
isPreTGE: boolean;
|
466
|
+
isTest: boolean;
|
467
|
+
verified: boolean;
|
468
|
+
displaySymbol: string;
|
469
|
+
}[];
|
470
|
+
Protocols: {
|
471
|
+
name: string;
|
472
|
+
description: string;
|
473
|
+
id: string;
|
474
|
+
url: string;
|
475
|
+
icon: string;
|
476
|
+
tags: string[];
|
477
|
+
}[];
|
478
|
+
MainProtocol: {
|
479
|
+
name: string;
|
480
|
+
description: string;
|
481
|
+
id: string;
|
482
|
+
url: string;
|
483
|
+
icon: string;
|
484
|
+
tags: string[];
|
485
|
+
} | null;
|
486
|
+
TvlRecords: ({
|
487
|
+
TvlBreakdown: {
|
488
|
+
value: number;
|
489
|
+
type: import("@package/databases").TvlType;
|
490
|
+
identifier: string;
|
491
|
+
}[];
|
492
|
+
} & {
|
493
|
+
id: string;
|
494
|
+
timestamp: bigint;
|
495
|
+
opportunityId: string;
|
496
|
+
total: number;
|
497
|
+
})[];
|
498
|
+
AprRecords: ({
|
499
|
+
AprBreakdown: {
|
500
|
+
value: number;
|
501
|
+
type: import("@package/databases").AprType;
|
502
|
+
identifier: string;
|
503
|
+
}[];
|
504
|
+
} & {
|
505
|
+
id: string;
|
506
|
+
timestamp: bigint;
|
507
|
+
opportunityId: string;
|
508
|
+
cumulated: number;
|
509
|
+
})[];
|
510
|
+
DailyRewardsRecords: ({
|
511
|
+
DailyRewardsBreakdown: ({
|
512
|
+
Campaign: {
|
513
|
+
campaignId: string;
|
514
|
+
amount: string;
|
515
|
+
startTimestamp: bigint;
|
516
|
+
endTimestamp: bigint;
|
517
|
+
CampaignStatus: {
|
518
|
+
campaignId: string;
|
519
|
+
error: string;
|
520
|
+
status: import("@package/databases").RunStatus;
|
521
|
+
details: import("@prisma/client/runtime/client").JsonValue;
|
522
|
+
computedUntil: bigint;
|
523
|
+
processingStarted: bigint;
|
524
|
+
}[];
|
525
|
+
distributionType: import("@package/databases").DistributionType;
|
526
|
+
RewardToken: {
|
527
|
+
symbol: string;
|
528
|
+
name: string | null;
|
529
|
+
decimals: number;
|
530
|
+
price: number | null;
|
531
|
+
address: string;
|
532
|
+
id: string;
|
533
|
+
chainId: number;
|
534
|
+
icon: string;
|
535
|
+
isNative: boolean;
|
536
|
+
isPoint: boolean;
|
537
|
+
isPreTGE: boolean;
|
538
|
+
isTest: boolean;
|
539
|
+
verified: boolean;
|
540
|
+
displaySymbol: string;
|
541
|
+
};
|
542
|
+
};
|
543
|
+
} & {
|
544
|
+
campaignId: string;
|
545
|
+
id: string;
|
546
|
+
value: number;
|
547
|
+
dailyRewardsRecordId: string;
|
548
|
+
})[];
|
549
|
+
} & {
|
550
|
+
id: string;
|
551
|
+
timestamp: bigint;
|
552
|
+
opportunityId: string;
|
553
|
+
total: number;
|
554
|
+
})[];
|
555
|
+
} & {
|
556
|
+
name: string;
|
557
|
+
apr: number;
|
558
|
+
tvl: number;
|
559
|
+
description: string;
|
560
|
+
id: string;
|
561
|
+
status: import("@package/databases").Status;
|
562
|
+
chainId: number;
|
563
|
+
action: import("@package/databases").OpportunityAction;
|
564
|
+
type: string;
|
565
|
+
depositUrl: string | null;
|
566
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
567
|
+
identifier: string;
|
568
|
+
howToSteps: string[];
|
569
|
+
explorerAddress: string | null;
|
570
|
+
mainProtocolId: string | null;
|
571
|
+
dailyRewards: number;
|
572
|
+
tags: string[];
|
573
|
+
lastCampaignCreatedAt: Date;
|
574
|
+
})[]>;
|
575
|
+
static findMany(query: GetOpportunitiesQueryModel): Promise<({
|
576
|
+
Chain: {
|
577
|
+
Explorer: {
|
578
|
+
id: string;
|
579
|
+
chainId: number;
|
580
|
+
type: import("@package/databases").ExplorerType;
|
581
|
+
url: string;
|
582
|
+
}[];
|
583
|
+
} & {
|
584
|
+
name: string;
|
585
|
+
id: number;
|
586
|
+
icon: string;
|
587
|
+
};
|
588
|
+
Campaigns: {
|
589
|
+
campaignId: string;
|
590
|
+
description: string | null;
|
591
|
+
id: string;
|
592
|
+
params: import("@prisma/client/runtime/client").JsonValue;
|
593
|
+
amount: string;
|
594
|
+
startTimestamp: bigint;
|
595
|
+
type: string;
|
596
|
+
computeChainId: number;
|
597
|
+
distributionChainId: number;
|
598
|
+
endTimestamp: bigint;
|
599
|
+
distributionType: import("@package/databases").DistributionType;
|
600
|
+
subType: number | null;
|
601
|
+
rewardTokenId: string;
|
602
|
+
opportunityId: string;
|
603
|
+
creatorAddress: string;
|
604
|
+
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
605
|
+
createdAt: Date;
|
606
|
+
rootCampaignId: string | null;
|
607
|
+
parentCampaignId: string | null;
|
608
|
+
}[];
|
609
|
+
Tokens: {
|
610
|
+
symbol: string;
|
611
|
+
name: string | null;
|
612
|
+
decimals: number;
|
613
|
+
price: number | null;
|
614
|
+
address: string;
|
615
|
+
id: string;
|
616
|
+
chainId: number;
|
617
|
+
icon: string;
|
618
|
+
isNative: boolean;
|
619
|
+
isPoint: boolean;
|
620
|
+
isPreTGE: boolean;
|
621
|
+
isTest: boolean;
|
622
|
+
verified: boolean;
|
623
|
+
displaySymbol: string;
|
624
|
+
}[];
|
625
|
+
Protocols: {
|
626
|
+
name: string;
|
627
|
+
description: string;
|
628
|
+
id: string;
|
629
|
+
url: string;
|
630
|
+
icon: string;
|
631
|
+
tags: string[];
|
632
|
+
}[];
|
633
|
+
MainProtocol: {
|
634
|
+
name: string;
|
635
|
+
description: string;
|
636
|
+
id: string;
|
637
|
+
url: string;
|
638
|
+
icon: string;
|
639
|
+
tags: string[];
|
640
|
+
} | null;
|
641
|
+
TvlRecords: ({
|
642
|
+
TvlBreakdown: {
|
643
|
+
value: number;
|
644
|
+
type: import("@package/databases").TvlType;
|
645
|
+
identifier: string;
|
646
|
+
}[];
|
647
|
+
} & {
|
648
|
+
id: string;
|
649
|
+
timestamp: bigint;
|
650
|
+
opportunityId: string;
|
651
|
+
total: number;
|
652
|
+
})[];
|
653
|
+
AprRecords: ({
|
654
|
+
AprBreakdown: {
|
655
|
+
value: number;
|
656
|
+
type: import("@package/databases").AprType;
|
657
|
+
identifier: string;
|
658
|
+
}[];
|
659
|
+
} & {
|
660
|
+
id: string;
|
661
|
+
timestamp: bigint;
|
662
|
+
opportunityId: string;
|
663
|
+
cumulated: number;
|
664
|
+
})[];
|
665
|
+
DailyRewardsRecords: ({
|
666
|
+
DailyRewardsBreakdown: ({
|
667
|
+
Campaign: {
|
668
|
+
campaignId: string;
|
669
|
+
amount: string;
|
670
|
+
startTimestamp: bigint;
|
671
|
+
endTimestamp: bigint;
|
672
|
+
CampaignStatus: {
|
673
|
+
campaignId: string;
|
674
|
+
error: string;
|
675
|
+
status: import("@package/databases").RunStatus;
|
676
|
+
details: import("@prisma/client/runtime/client").JsonValue;
|
677
|
+
computedUntil: bigint;
|
678
|
+
processingStarted: bigint;
|
679
|
+
}[];
|
680
|
+
distributionType: import("@package/databases").DistributionType;
|
681
|
+
RewardToken: {
|
682
|
+
symbol: string;
|
683
|
+
name: string | null;
|
684
|
+
decimals: number;
|
685
|
+
price: number | null;
|
686
|
+
address: string;
|
687
|
+
id: string;
|
688
|
+
chainId: number;
|
689
|
+
icon: string;
|
690
|
+
isNative: boolean;
|
691
|
+
isPoint: boolean;
|
692
|
+
isPreTGE: boolean;
|
693
|
+
isTest: boolean;
|
694
|
+
verified: boolean;
|
695
|
+
displaySymbol: string;
|
696
|
+
};
|
697
|
+
};
|
698
|
+
} & {
|
699
|
+
campaignId: string;
|
700
|
+
id: string;
|
701
|
+
value: number;
|
702
|
+
dailyRewardsRecordId: string;
|
703
|
+
})[];
|
704
|
+
} & {
|
705
|
+
id: string;
|
706
|
+
timestamp: bigint;
|
707
|
+
opportunityId: string;
|
708
|
+
total: number;
|
709
|
+
})[];
|
710
|
+
} & {
|
711
|
+
name: string;
|
712
|
+
apr: number;
|
713
|
+
tvl: number;
|
714
|
+
description: string;
|
715
|
+
id: string;
|
716
|
+
status: import("@package/databases").Status;
|
717
|
+
chainId: number;
|
718
|
+
action: import("@package/databases").OpportunityAction;
|
719
|
+
type: string;
|
720
|
+
depositUrl: string | null;
|
721
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
722
|
+
identifier: string;
|
723
|
+
howToSteps: string[];
|
724
|
+
explorerAddress: string | null;
|
725
|
+
mainProtocolId: string | null;
|
726
|
+
dailyRewards: number;
|
727
|
+
tags: string[];
|
728
|
+
lastCampaignCreatedAt: Date;
|
729
|
+
})[]>;
|
730
|
+
static countMany(query: GetOpportunitiesQueryModel): Promise<number>;
|
731
|
+
/**
|
732
|
+
* @dev Live campaigns here can be:
|
733
|
+
* 1. Opportunities with status LIVE
|
734
|
+
* 2. Opportunities with non-test campaigns that have endTimestamp > now
|
735
|
+
*
|
736
|
+
* @dev Excludes test campaigns
|
737
|
+
*/
|
738
|
+
static findLiveWithCampaigns(chainId: MerklChainId, take?: number): Promise<({
|
739
|
+
Chain: {
|
740
|
+
Explorer: {
|
741
|
+
id: string;
|
742
|
+
chainId: number;
|
743
|
+
type: import("@package/databases").ExplorerType;
|
744
|
+
url: string;
|
745
|
+
}[];
|
746
|
+
} & {
|
747
|
+
name: string;
|
748
|
+
id: number;
|
749
|
+
icon: string;
|
750
|
+
};
|
751
|
+
Campaigns: ({
|
752
|
+
CampaignStatus: {
|
753
|
+
campaignId: string;
|
754
|
+
error: string;
|
755
|
+
status: import("@package/databases").RunStatus;
|
756
|
+
details: import("@prisma/client/runtime/client").JsonValue;
|
757
|
+
computedUntil: bigint;
|
758
|
+
processingStarted: bigint;
|
759
|
+
}[];
|
760
|
+
Creator: {
|
761
|
+
address: string;
|
762
|
+
tags: string[];
|
763
|
+
creatorId: string | null;
|
764
|
+
};
|
765
|
+
ComputeChain: {
|
766
|
+
name: string;
|
767
|
+
id: number;
|
768
|
+
icon: string;
|
769
|
+
};
|
770
|
+
DistributionChain: {
|
771
|
+
Explorer: {
|
772
|
+
id: string;
|
773
|
+
chainId: number;
|
774
|
+
type: import("@package/databases").ExplorerType;
|
775
|
+
url: string;
|
776
|
+
}[];
|
777
|
+
} & {
|
778
|
+
name: string;
|
779
|
+
id: number;
|
780
|
+
icon: string;
|
781
|
+
};
|
782
|
+
RewardToken: {
|
783
|
+
symbol: string;
|
784
|
+
name: string | null;
|
785
|
+
decimals: number;
|
786
|
+
price: number | null;
|
787
|
+
address: string;
|
788
|
+
id: string;
|
789
|
+
chainId: number;
|
790
|
+
icon: string;
|
791
|
+
isNative: boolean;
|
792
|
+
isPoint: boolean;
|
793
|
+
isPreTGE: boolean;
|
794
|
+
isTest: boolean;
|
795
|
+
verified: boolean;
|
796
|
+
displaySymbol: string;
|
797
|
+
};
|
798
|
+
} & {
|
799
|
+
campaignId: string;
|
800
|
+
description: string | null;
|
801
|
+
id: string;
|
802
|
+
params: import("@prisma/client/runtime/client").JsonValue;
|
803
|
+
amount: string;
|
804
|
+
startTimestamp: bigint;
|
805
|
+
type: string;
|
806
|
+
computeChainId: number;
|
807
|
+
distributionChainId: number;
|
808
|
+
endTimestamp: bigint;
|
809
|
+
distributionType: import("@package/databases").DistributionType;
|
810
|
+
subType: number | null;
|
811
|
+
rewardTokenId: string;
|
812
|
+
opportunityId: string;
|
813
|
+
creatorAddress: string;
|
814
|
+
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
815
|
+
createdAt: Date;
|
816
|
+
rootCampaignId: string | null;
|
817
|
+
parentCampaignId: string | null;
|
818
|
+
})[];
|
819
|
+
Tokens: {
|
820
|
+
symbol: string;
|
821
|
+
name: string | null;
|
822
|
+
decimals: number;
|
823
|
+
price: number | null;
|
824
|
+
address: string;
|
825
|
+
id: string;
|
826
|
+
chainId: number;
|
827
|
+
icon: string;
|
828
|
+
isNative: boolean;
|
829
|
+
isPoint: boolean;
|
830
|
+
isPreTGE: boolean;
|
831
|
+
isTest: boolean;
|
832
|
+
verified: boolean;
|
833
|
+
displaySymbol: string;
|
834
|
+
}[];
|
835
|
+
Protocols: {
|
836
|
+
name: string;
|
837
|
+
description: string;
|
838
|
+
id: string;
|
839
|
+
url: string;
|
840
|
+
icon: string;
|
841
|
+
tags: string[];
|
842
|
+
}[];
|
843
|
+
MainProtocol: {
|
844
|
+
name: string;
|
845
|
+
description: string;
|
846
|
+
id: string;
|
847
|
+
url: string;
|
848
|
+
icon: string;
|
849
|
+
tags: string[];
|
850
|
+
} | null;
|
851
|
+
TvlRecords: ({
|
852
|
+
TvlBreakdown: {
|
853
|
+
value: number;
|
854
|
+
type: import("@package/databases").TvlType;
|
855
|
+
identifier: string;
|
856
|
+
}[];
|
857
|
+
} & {
|
858
|
+
id: string;
|
859
|
+
timestamp: bigint;
|
860
|
+
opportunityId: string;
|
861
|
+
total: number;
|
862
|
+
})[];
|
863
|
+
AprRecords: ({
|
864
|
+
AprBreakdown: {
|
865
|
+
value: number;
|
866
|
+
type: import("@package/databases").AprType;
|
867
|
+
identifier: string;
|
868
|
+
}[];
|
869
|
+
} & {
|
870
|
+
id: string;
|
871
|
+
timestamp: bigint;
|
872
|
+
opportunityId: string;
|
873
|
+
cumulated: number;
|
874
|
+
})[];
|
875
|
+
DailyRewardsRecords: ({
|
876
|
+
DailyRewardsBreakdown: ({
|
877
|
+
Campaign: {
|
878
|
+
campaignId: string;
|
879
|
+
amount: string;
|
880
|
+
startTimestamp: bigint;
|
881
|
+
endTimestamp: bigint;
|
882
|
+
CampaignStatus: {
|
883
|
+
campaignId: string;
|
884
|
+
error: string;
|
885
|
+
status: import("@package/databases").RunStatus;
|
886
|
+
details: import("@prisma/client/runtime/client").JsonValue;
|
887
|
+
computedUntil: bigint;
|
888
|
+
processingStarted: bigint;
|
889
|
+
}[];
|
890
|
+
distributionType: import("@package/databases").DistributionType;
|
891
|
+
RewardToken: {
|
892
|
+
symbol: string;
|
893
|
+
name: string | null;
|
894
|
+
decimals: number;
|
895
|
+
price: number | null;
|
896
|
+
address: string;
|
897
|
+
id: string;
|
898
|
+
chainId: number;
|
899
|
+
icon: string;
|
900
|
+
isNative: boolean;
|
901
|
+
isPoint: boolean;
|
902
|
+
isPreTGE: boolean;
|
903
|
+
isTest: boolean;
|
904
|
+
verified: boolean;
|
905
|
+
displaySymbol: string;
|
906
|
+
};
|
907
|
+
};
|
908
|
+
} & {
|
909
|
+
campaignId: string;
|
910
|
+
id: string;
|
911
|
+
value: number;
|
912
|
+
dailyRewardsRecordId: string;
|
913
|
+
})[];
|
914
|
+
} & {
|
915
|
+
id: string;
|
916
|
+
timestamp: bigint;
|
917
|
+
opportunityId: string;
|
918
|
+
total: number;
|
919
|
+
})[];
|
920
|
+
} & {
|
921
|
+
name: string;
|
922
|
+
apr: number;
|
923
|
+
tvl: number;
|
924
|
+
description: string;
|
925
|
+
id: string;
|
926
|
+
status: import("@package/databases").Status;
|
927
|
+
chainId: number;
|
928
|
+
action: import("@package/databases").OpportunityAction;
|
929
|
+
type: string;
|
930
|
+
depositUrl: string | null;
|
931
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
932
|
+
identifier: string;
|
933
|
+
howToSteps: string[];
|
934
|
+
explorerAddress: string | null;
|
935
|
+
mainProtocolId: string | null;
|
936
|
+
dailyRewards: number;
|
937
|
+
tags: string[];
|
938
|
+
lastCampaignCreatedAt: Date;
|
939
|
+
})[]>;
|
940
|
+
/**
|
941
|
+
* Updates Apr, Tvl and DailyRewards records
|
942
|
+
* @param opportunityId
|
943
|
+
* @param apr
|
944
|
+
* @param tvl
|
945
|
+
* @returns
|
946
|
+
*/
|
947
|
+
static updateDynamicData(opportunityId: string, apr: AprRecord["model"], tvl: TvlRecord["model"], dailyRewards: DailyRewardsRecord["model"]): Promise<{
|
948
|
+
aprRecord: {
|
949
|
+
id: string;
|
950
|
+
timestamp: bigint;
|
951
|
+
opportunityId: string;
|
952
|
+
cumulated: number;
|
953
|
+
};
|
954
|
+
tvlRecord: {
|
955
|
+
TvlBreakdown: {
|
956
|
+
id: string;
|
957
|
+
value: number;
|
958
|
+
type: import("@package/databases").TvlType;
|
959
|
+
identifier: string;
|
960
|
+
tvlRecordId: string;
|
961
|
+
}[];
|
962
|
+
} & {
|
963
|
+
id: string;
|
964
|
+
timestamp: bigint;
|
965
|
+
opportunityId: string;
|
966
|
+
total: number;
|
967
|
+
};
|
968
|
+
dailyRewardsRecord: {
|
969
|
+
DailyRewardsBreakdown: {
|
970
|
+
campaignId: string;
|
971
|
+
id: string;
|
972
|
+
value: number;
|
973
|
+
dailyRewardsRecordId: string;
|
974
|
+
}[];
|
975
|
+
} & {
|
976
|
+
id: string;
|
977
|
+
timestamp: bigint;
|
978
|
+
opportunityId: string;
|
979
|
+
total: number;
|
980
|
+
};
|
981
|
+
opportunity: {
|
982
|
+
name: string;
|
983
|
+
apr: number;
|
984
|
+
tvl: number;
|
985
|
+
description: string;
|
986
|
+
id: string;
|
987
|
+
status: import("@package/databases").Status;
|
988
|
+
chainId: number;
|
989
|
+
action: import("@package/databases").OpportunityAction;
|
990
|
+
type: string;
|
991
|
+
depositUrl: string | null;
|
992
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
993
|
+
identifier: string;
|
994
|
+
howToSteps: string[];
|
995
|
+
explorerAddress: string | null;
|
996
|
+
mainProtocolId: string | null;
|
997
|
+
dailyRewards: number;
|
998
|
+
tags: string[];
|
999
|
+
lastCampaignCreatedAt: Date;
|
1000
|
+
};
|
1001
|
+
}>;
|
1002
|
+
static updateStatus(id: string, status: Status): Promise<{
|
1003
|
+
name: string;
|
1004
|
+
apr: number;
|
1005
|
+
tvl: number;
|
1006
|
+
description: string;
|
1007
|
+
id: string;
|
1008
|
+
status: import("@package/databases").Status;
|
1009
|
+
chainId: number;
|
1010
|
+
action: import("@package/databases").OpportunityAction;
|
1011
|
+
type: string;
|
1012
|
+
depositUrl: string | null;
|
1013
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
1014
|
+
identifier: string;
|
1015
|
+
howToSteps: string[];
|
1016
|
+
explorerAddress: string | null;
|
1017
|
+
mainProtocolId: string | null;
|
1018
|
+
dailyRewards: number;
|
1019
|
+
tags: string[];
|
1020
|
+
lastCampaignCreatedAt: Date;
|
1021
|
+
}>;
|
1022
|
+
static update(id: string, data: Partial<Opportunity["raw"]>): Promise<{
|
1023
|
+
name: string;
|
1024
|
+
apr: number;
|
1025
|
+
tvl: number;
|
1026
|
+
description: string;
|
1027
|
+
id: string;
|
1028
|
+
status: import("@package/databases").Status;
|
1029
|
+
chainId: number;
|
1030
|
+
action: import("@package/databases").OpportunityAction;
|
1031
|
+
type: string;
|
1032
|
+
depositUrl: string | null;
|
1033
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
1034
|
+
identifier: string;
|
1035
|
+
howToSteps: string[];
|
1036
|
+
explorerAddress: string | null;
|
1037
|
+
mainProtocolId: string | null;
|
1038
|
+
dailyRewards: number;
|
1039
|
+
tags: string[];
|
1040
|
+
lastCampaignCreatedAt: Date;
|
1041
|
+
}>;
|
1042
|
+
static updateMany(ids: string[], data: Partial<Opportunity["raw"]>): Promise<Prisma.BatchPayload>;
|
1043
|
+
static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
|
1044
|
+
sum: string;
|
1045
|
+
}>;
|
1046
|
+
static aggregateMin(field: keyof Prisma.OpportunityMinAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
|
1047
|
+
min: string;
|
1048
|
+
}>;
|
1049
|
+
static aggregateMax(field: keyof Prisma.OpportunityMaxAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
|
1050
|
+
max: string;
|
1051
|
+
}>;
|
1052
|
+
}
|