@merkl/api 0.20.159 → 0.20.161

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.
@@ -646,6 +646,10 @@ const config = {
646
646
  "value": "debian-openssl-3.0.x",
647
647
  "native": true
648
648
  },
649
+ {
650
+ "fromEnvVar": null,
651
+ "value": "linux-arm64-openssl-3.0.x"
652
+ },
649
653
  {
650
654
  "fromEnvVar": null,
651
655
  "value": "linux-arm64-openssl-1.1.x"
@@ -682,8 +686,8 @@ const config = {
682
686
  }
683
687
  }
684
688
  },
685
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ngenerator drizzle {\n provider = \"drizzle-prisma-generator\"\n output = \".generated/drizzle/\" // Where to put generated Drizle tables\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_API_URL\")\n}\n\nmodel Campaign {\n id String @id\n ComputeChain Chain @relation(\"compute\", fields: [computeChainId], references: [id])\n computeChainId Int\n DistributionChain Chain @relation(\"distribution\", fields: [distributionChainId], references: [id])\n distributionChainId Int\n campaignId String\n type String\n distributionType DistributionType @default(DUTCH_AUCTION)\n subType Int?\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n startTimestamp BigInt\n endTimestamp BigInt\n params Json\n description String? // Can only be added manually for now\n RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n // Should probably be a 1 to 1 relation if we do not want to keep historic records\n CampaignStatus CampaignStatus[]\n CampaignEngineValues CampaignComputedValue[]\n UserComputedValue UserComputedValue[]\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n manualOverrides CampaignManualOverride[] @default([])\n\n createdAt DateTime @default(now())\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\n// SubTable of Campaigns that should be here as soon as the campaign is processed\nmodel CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt\n processingStarted BigInt\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// SubTable of Campaigns that will contain values populated by the Engine when it's running\nmodel CampaignComputedValue {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n averageBoost Float? // Average boost in case of boosting hook\n totalDistributedInUSD Float? // Used in case there is a distribution cap\n forfeitingBoost Float? // In case some rewards are forfeited, resulting boost for remaining users\n}\n\nmodel UserComputedValue {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n address String @db.Char(42)\n User User? @relation(fields: [address], references: [address])\n reason String\n boost Float?\n\n @@unique([campaignId, address, reason])\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\n // liveCampaigns Int @default(0)\n // dailyRewards Float @default(0)\n Explorer Explorer[]\n Campaigns Campaign[] @relation(\"compute\")\n Distribution Campaign[] @relation(\"distribution\")\n Token Token[]\n Opportunity Opportunity[]\n MerklRoot MerklRoot[]\n Blacklist Blacklist[]\n Dump Dump[]\n}\n\nmodel Explorer {\n id String @id\n type ExplorerType\n Chain Chain @relation(fields: [chainId], references: [id])\n url String\n chainId Int\n\n @@unique([type, chainId])\n}\n\nmodel Opportunity {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id]) // compute\n chainId Int // compute\n type String\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String // Override\n description String @default(\"\") // Override \n howToSteps String[] @default([]) // Override\n depositUrl String? // Override\n explorerAddress String? // Override\n status Status\n action OpportunityAction // Override\n Tokens Token[]\n Campaigns Campaign[]\n Protocols Protocol[]\n MainProtocol Protocol? @relation(name: \"main\", fields: [mainProtocolId], references: [id])\n mainProtocolId String?\n tvl Float @default(0)\n TvlRecords TVLRecord[]\n apr Float @default(0)\n AprRecords AprRecord[]\n dailyRewards Float @default(0)\n DailyRewardsRecords DailyRewardsRecord[]\n tags String[] @default([])\n lastCampaignCreatedAt DateTime @default(now())\n manualOverrides OpportunityManualOverride[] @default([])\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n // manualOverrides OpportunityManualOverride[] @default([])\n\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags String[] @default([])\n name String\n description String @default(\"\")\n url String\n icon String\n // liveCampaigns Int @default(0)\n // totalDailyRewards Float @default(0)\n MainOpportunities Opportunity[] @relation(name: \"main\")\n Opportunities Opportunity[]\n RewardBreakdown RewardBreakdown[]\n}\n\nmodel Token {\n id String @id()\n name String?\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n address String @db.Char(42)\n decimals Int\n symbol String\n displaySymbol String @default(\"\")\n icon String\n verified Boolean @default(false)\n isTest Boolean @default(false)\n isPoint Boolean @default(false)\n isPreTGE Boolean @default(false) // Pre-TGE tokens, used to display a warning in the UI\n isNative Boolean @default(false)\n price Float?\n Opportunity Opportunity[]\n Campaigns Campaign[]\n Reward Reward[]\n DumpTo Dump[] @relation(\"to\")\n DumpFrom Dump[] @relation(\"from\")\n\n @@unique([chainId, address])\n @@index([chainId], type: Hash)\n @@index([symbol, address])\n}\n\nmodel AprRecord {\n id String @id\n timestamp BigInt\n cumulated Float\n AprBreakdown AprBreakdown[]\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel AprBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type AprType\n value Float\n AprRecord AprRecord @relation(fields: [aprRecordId], references: [id])\n aprRecordId String\n\n @@index([aprRecordId], type: Hash)\n}\n\nmodel TVLRecord {\n id String @id\n timestamp BigInt\n total Float\n TvlBreakdown TVLBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel TVLBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type TvlType\n value Float // In case type is TOKEN, this is the raw amount of tokens\n\n TvlRecord TVLRecord @relation(fields: [tvlRecordId], references: [id])\n tvlRecordId String\n\n @@index([tvlRecordId], type: Hash)\n}\n\nmodel DailyRewardsRecord {\n id String @id\n timestamp BigInt\n total Float\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel DailyRewardsBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n value Float\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n DailyRewardsRecord DailyRewardsRecord @relation(fields: [dailyRewardsRecordId], references: [id])\n dailyRewardsRecordId String\n\n @@index([dailyRewardsRecordId], type: Hash)\n}\n\nmodel User {\n address String @id @db.Char(42)\n Rewards Reward[]\n Blacklist Blacklist[]\n CampaignsCreated Campaign[]\n UserComputedValue UserComputedValue[]\n tags String[]\n\n Creator Creator? @relation(fields: [creatorId], references: [id])\n creatorId String?\n}\n\nmodel Creator {\n id String @id\n icon String?\n name String\n Users User[]\n}\n\nmodel Reward {\n id String @id\n MerklRoot MerklRoot @relation(fields: [root], references: [root])\n root String\n User User @relation(fields: [recipient], references: [address])\n recipient String @db.Char(42)\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String @default(\"0\")\n claimed String @default(\"0\")\n pending String @default(\"0\")\n proofs String[]\n Breakdown RewardBreakdown[]\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n Reward Reward @relation(fields: [rewardId], references: [id], onDelete: Cascade)\n rewardId String\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n}\n\nmodel MerklRoot {\n root String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n epoch Int\n timestamp BigInt\n Rewards Reward[]\n\n @@index([chainId, root])\n}\n\nmodel PriceSource {\n id Int @id @default(autoincrement()) // This should hold in Int ids\n symbol String @unique() // Price Id\n method PriceSourceMethod\n args Json?\n}\n\n// priceId -> number\n\nmodel Blacklist {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n poolAddress String @db.Char(42)\n User User @relation(fields: [userAddress], references: [address])\n userAddress String @db.Char(42)\n arrestTimestamp BigInt\n arrestDetails Json\n\n @@unique([chainId, userAddress, poolAddress])\n @@index([userAddress], type: Hash)\n}\n\nmodel Dump {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n FromToken Token @relation(name: \"from\", fields: [fromTokenId], references: [id])\n fromTokenId String\n ToToken Token @relation(name: \"to\", fields: [toTokenId], references: [id])\n toTokenId String\n multisig String @db.Char(42)\n recipient String @db.Char(42)\n amountIn String @default(\"0\")\n amountOut String @default(\"0\")\n datetime DateTime\n timestamp Int\n\n @@unique([chainId, fromTokenId, toTokenId, timestamp])\n}\n\nmodel Logged {\n id String @id\n chainId Int\n type LoggedEntityType @default(UNKNOWN)\n address String? @db.Char(42)\n fetchAtBlock Int\n caughtFromAddress String @db.Char(42)\n entityData Json\n\n @@unique([chainId, address])\n}\n\n// enums\n\nenum LoggedEntityType {\n UNKNOWN\n EULER_VAULT\n UNISWAP_V4\n COMPOUND_v2\n}\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n LONG\n SHORT\n SWAP\n INVALID\n}\n\nenum Status {\n NONE // This would mean that no campaigns was ever created for this opportunity\n PAST\n LIVE\n SOON\n}\n\nenum ExplorerType {\n ETHERSCAN\n BLOCKSCOUT\n}\n\nenum AprType {\n CAMPAIGN\n TOKEN\n PROTOCOL\n}\n\nenum TvlType {\n TOKEN\n PROTOCOL\n}\n\nenum PriceSourceMethod {\n COINGECKO\n CONSTANT\n EQUAL_TO\n ERC4626\n DEXSCREENER\n INDEXCOOP\n DEFILLAMA\n}\n\nenum CampaignManualOverride {\n opportunityId\n creatorAddress\n}\n\nenum OpportunityManualOverride {\n name\n depositUrl\n explorerAddress\n action\n description\n howToSteps\n}\n\nenum DistributionType {\n DUTCH_AUCTION\n FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE // The fix reward value will lie in params.apr\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE\n FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT\n}\n",
686
- "inlineSchemaHash": "d3410f41eaf2293abbee10c5872826b9383f7f0d88b13001d206720081e1dd58",
689
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ngenerator drizzle {\n provider = \"drizzle-prisma-generator\"\n output = \".generated/drizzle/\" // Where to put generated Drizle tables\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_API_URL\")\n}\n\nmodel Campaign {\n id String @id\n ComputeChain Chain @relation(\"compute\", fields: [computeChainId], references: [id])\n computeChainId Int\n DistributionChain Chain @relation(\"distribution\", fields: [distributionChainId], references: [id])\n distributionChainId Int\n campaignId String\n type String\n distributionType DistributionType @default(DUTCH_AUCTION)\n subType Int?\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n startTimestamp BigInt\n endTimestamp BigInt\n params Json\n description String? // Can only be added manually for now\n RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n // Should probably be a 1 to 1 relation if we do not want to keep historic records\n CampaignStatus CampaignStatus[]\n CampaignEngineValues CampaignComputedValue[]\n UserComputedValue UserComputedValue[]\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n manualOverrides CampaignManualOverride[] @default([])\n\n createdAt DateTime @default(now())\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\n// SubTable of Campaigns that should be here as soon as the campaign is processed\nmodel CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt\n processingStarted BigInt\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// SubTable of Campaigns that will contain values populated by the Engine when it's running\nmodel CampaignComputedValue {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n averageBoost Float? // Average boost in case of boosting hook\n totalDistributedInUSD Float? // Used in case there is a distribution cap\n forfeitingBoost Float? // In case some rewards are forfeited, resulting boost for remaining users\n}\n\nmodel UserComputedValue {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n address String @db.Char(42)\n User User? @relation(fields: [address], references: [address])\n reason String\n boost Float?\n\n @@unique([campaignId, address, reason])\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\n // liveCampaigns Int @default(0)\n // dailyRewards Float @default(0)\n Explorer Explorer[]\n Campaigns Campaign[] @relation(\"compute\")\n Distribution Campaign[] @relation(\"distribution\")\n Token Token[]\n Opportunity Opportunity[]\n MerklRoot MerklRoot[]\n Blacklist Blacklist[]\n Dump Dump[]\n}\n\nmodel Explorer {\n id String @id\n type ExplorerType\n Chain Chain @relation(fields: [chainId], references: [id])\n url String\n chainId Int\n\n @@unique([type, chainId])\n}\n\nmodel Opportunity {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id]) // compute\n chainId Int // compute\n type String\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String // Override\n description String @default(\"\") // Override \n howToSteps String[] @default([]) // Override\n depositUrl String? // Override\n explorerAddress String? // Override\n status Status\n action OpportunityAction // Override\n Tokens Token[]\n Campaigns Campaign[]\n Protocols Protocol[]\n MainProtocol Protocol? @relation(name: \"main\", fields: [mainProtocolId], references: [id])\n mainProtocolId String?\n tvl Float @default(0)\n TvlRecords TVLRecord[]\n apr Float @default(0)\n AprRecords AprRecord[]\n dailyRewards Float @default(0)\n DailyRewardsRecords DailyRewardsRecord[]\n tags String[] @default([])\n lastCampaignCreatedAt DateTime @default(now())\n manualOverrides OpportunityManualOverride[] @default([])\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n // manualOverrides OpportunityManualOverride[] @default([])\n\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags String[] @default([])\n name String\n description String @default(\"\")\n url String\n icon String\n // liveCampaigns Int @default(0)\n // totalDailyRewards Float @default(0)\n MainOpportunities Opportunity[] @relation(name: \"main\")\n Opportunities Opportunity[]\n RewardBreakdown RewardBreakdown[]\n}\n\nmodel Token {\n id String @id()\n name String?\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n address String @db.Char(42)\n decimals Int\n symbol String\n displaySymbol String @default(\"\")\n icon String\n verified Boolean @default(false)\n isTest Boolean @default(false)\n isPoint Boolean @default(false)\n isPreTGE Boolean @default(false) // Pre-TGE tokens, used to display a warning in the UI\n isNative Boolean @default(false)\n price Float?\n Opportunity Opportunity[]\n Campaigns Campaign[]\n Reward Reward[]\n DumpTo Dump[] @relation(\"to\")\n DumpFrom Dump[] @relation(\"from\")\n\n @@unique([chainId, address])\n @@index([chainId], type: Hash)\n @@index([symbol, address])\n}\n\nmodel AprRecord {\n id String @id\n timestamp BigInt\n cumulated Float\n AprBreakdown AprBreakdown[]\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel AprBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type AprType\n value Float\n AprRecord AprRecord @relation(fields: [aprRecordId], references: [id])\n aprRecordId String\n\n @@index([aprRecordId], type: Hash)\n}\n\nmodel TVLRecord {\n id String @id\n timestamp BigInt\n total Float\n TvlBreakdown TVLBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel TVLBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type TvlType\n value Float // In case type is TOKEN, this is the raw amount of tokens\n\n TvlRecord TVLRecord @relation(fields: [tvlRecordId], references: [id])\n tvlRecordId String\n\n @@index([tvlRecordId], type: Hash)\n}\n\nmodel DailyRewardsRecord {\n id String @id\n timestamp BigInt\n total Float\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel DailyRewardsBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n value Float\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n DailyRewardsRecord DailyRewardsRecord @relation(fields: [dailyRewardsRecordId], references: [id])\n dailyRewardsRecordId String\n\n @@index([dailyRewardsRecordId], type: Hash)\n}\n\nmodel User {\n address String @id @db.Char(42)\n Rewards Reward[]\n Blacklist Blacklist[]\n CampaignsCreated Campaign[]\n UserComputedValue UserComputedValue[]\n tags String[]\n\n Creator Creator? @relation(fields: [creatorId], references: [id])\n creatorId String?\n}\n\nmodel Creator {\n id String @id\n icon String?\n name String\n Users User[]\n}\n\nmodel Reward {\n id String @id\n MerklRoot MerklRoot @relation(fields: [root], references: [root])\n root String\n User User @relation(fields: [recipient], references: [address])\n recipient String @db.Char(42)\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String @default(\"0\")\n claimed String @default(\"0\")\n pending String @default(\"0\")\n proofs String[]\n Breakdown RewardBreakdown[]\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n Reward Reward @relation(fields: [rewardId], references: [id], onDelete: Cascade)\n rewardId String\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n}\n\nmodel MerklRoot {\n root String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n epoch Int\n timestamp BigInt\n Rewards Reward[]\n\n @@index([chainId, root])\n}\n\nmodel PriceSource {\n id Int @id @default(autoincrement()) // This should hold in Int ids\n symbol String @unique() // Price Id\n method PriceSourceMethod\n args Json?\n}\n\n// priceId -> number\n\nmodel Blacklist {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n poolAddress String @db.Char(42)\n User User @relation(fields: [userAddress], references: [address])\n userAddress String @db.Char(42)\n arrestTimestamp BigInt\n arrestDetails Json\n\n @@unique([chainId, userAddress, poolAddress])\n @@index([userAddress], type: Hash)\n}\n\nmodel Dump {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n FromToken Token @relation(name: \"from\", fields: [fromTokenId], references: [id])\n fromTokenId String\n ToToken Token @relation(name: \"to\", fields: [toTokenId], references: [id])\n toTokenId String\n multisig String @db.Char(42)\n recipient String @db.Char(42)\n amountIn String @default(\"0\")\n amountOut String @default(\"0\")\n datetime DateTime\n timestamp Int\n\n @@unique([chainId, fromTokenId, toTokenId, timestamp])\n}\n\nmodel Logged {\n id String @id\n chainId Int\n type LoggedEntityType @default(UNKNOWN)\n address String? @db.Char(42)\n fetchAtBlock Int\n caughtFromAddress String @db.Char(42)\n entityData Json\n\n @@unique([chainId, address])\n}\n\n// enums\n\nenum LoggedEntityType {\n UNKNOWN\n EULER_VAULT\n UNISWAP_V4\n COMPOUND_v2\n}\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n LONG\n SHORT\n SWAP\n INVALID\n}\n\nenum Status {\n NONE // This would mean that no campaigns was ever created for this opportunity\n PAST\n LIVE\n SOON\n}\n\nenum ExplorerType {\n ETHERSCAN\n BLOCKSCOUT\n}\n\nenum AprType {\n CAMPAIGN\n TOKEN\n PROTOCOL\n}\n\nenum TvlType {\n TOKEN\n PROTOCOL\n}\n\nenum PriceSourceMethod {\n COINGECKO\n CONSTANT\n EQUAL_TO\n ERC4626\n DEXSCREENER\n INDEXCOOP\n DEFILLAMA\n}\n\nenum CampaignManualOverride {\n opportunityId\n creatorAddress\n}\n\nenum OpportunityManualOverride {\n name\n depositUrl\n explorerAddress\n action\n description\n howToSteps\n}\n\nenum DistributionType {\n DUTCH_AUCTION\n FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE // The fix reward value will lie in params.apr\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE\n FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT\n}\n",
690
+ "inlineSchemaHash": "128803fa840308e6fc6f9597b3c41096b399201a166aba9be52fb70d7c7558bb",
687
691
  "copyEngine": true
688
692
  }
689
693
  config.dirname = '/'
@@ -647,6 +647,10 @@ const config = {
647
647
  "value": "debian-openssl-3.0.x",
648
648
  "native": true
649
649
  },
650
+ {
651
+ "fromEnvVar": null,
652
+ "value": "linux-arm64-openssl-3.0.x"
653
+ },
650
654
  {
651
655
  "fromEnvVar": null,
652
656
  "value": "linux-arm64-openssl-1.1.x"
@@ -683,8 +687,8 @@ const config = {
683
687
  }
684
688
  }
685
689
  },
686
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ngenerator drizzle {\n provider = \"drizzle-prisma-generator\"\n output = \".generated/drizzle/\" // Where to put generated Drizle tables\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_API_URL\")\n}\n\nmodel Campaign {\n id String @id\n ComputeChain Chain @relation(\"compute\", fields: [computeChainId], references: [id])\n computeChainId Int\n DistributionChain Chain @relation(\"distribution\", fields: [distributionChainId], references: [id])\n distributionChainId Int\n campaignId String\n type String\n distributionType DistributionType @default(DUTCH_AUCTION)\n subType Int?\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n startTimestamp BigInt\n endTimestamp BigInt\n params Json\n description String? // Can only be added manually for now\n RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n // Should probably be a 1 to 1 relation if we do not want to keep historic records\n CampaignStatus CampaignStatus[]\n CampaignEngineValues CampaignComputedValue[]\n UserComputedValue UserComputedValue[]\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n manualOverrides CampaignManualOverride[] @default([])\n\n createdAt DateTime @default(now())\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\n// SubTable of Campaigns that should be here as soon as the campaign is processed\nmodel CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt\n processingStarted BigInt\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// SubTable of Campaigns that will contain values populated by the Engine when it's running\nmodel CampaignComputedValue {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n averageBoost Float? // Average boost in case of boosting hook\n totalDistributedInUSD Float? // Used in case there is a distribution cap\n forfeitingBoost Float? // In case some rewards are forfeited, resulting boost for remaining users\n}\n\nmodel UserComputedValue {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n address String @db.Char(42)\n User User? @relation(fields: [address], references: [address])\n reason String\n boost Float?\n\n @@unique([campaignId, address, reason])\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\n // liveCampaigns Int @default(0)\n // dailyRewards Float @default(0)\n Explorer Explorer[]\n Campaigns Campaign[] @relation(\"compute\")\n Distribution Campaign[] @relation(\"distribution\")\n Token Token[]\n Opportunity Opportunity[]\n MerklRoot MerklRoot[]\n Blacklist Blacklist[]\n Dump Dump[]\n}\n\nmodel Explorer {\n id String @id\n type ExplorerType\n Chain Chain @relation(fields: [chainId], references: [id])\n url String\n chainId Int\n\n @@unique([type, chainId])\n}\n\nmodel Opportunity {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id]) // compute\n chainId Int // compute\n type String\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String // Override\n description String @default(\"\") // Override \n howToSteps String[] @default([]) // Override\n depositUrl String? // Override\n explorerAddress String? // Override\n status Status\n action OpportunityAction // Override\n Tokens Token[]\n Campaigns Campaign[]\n Protocols Protocol[]\n MainProtocol Protocol? @relation(name: \"main\", fields: [mainProtocolId], references: [id])\n mainProtocolId String?\n tvl Float @default(0)\n TvlRecords TVLRecord[]\n apr Float @default(0)\n AprRecords AprRecord[]\n dailyRewards Float @default(0)\n DailyRewardsRecords DailyRewardsRecord[]\n tags String[] @default([])\n lastCampaignCreatedAt DateTime @default(now())\n manualOverrides OpportunityManualOverride[] @default([])\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n // manualOverrides OpportunityManualOverride[] @default([])\n\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags String[] @default([])\n name String\n description String @default(\"\")\n url String\n icon String\n // liveCampaigns Int @default(0)\n // totalDailyRewards Float @default(0)\n MainOpportunities Opportunity[] @relation(name: \"main\")\n Opportunities Opportunity[]\n RewardBreakdown RewardBreakdown[]\n}\n\nmodel Token {\n id String @id()\n name String?\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n address String @db.Char(42)\n decimals Int\n symbol String\n displaySymbol String @default(\"\")\n icon String\n verified Boolean @default(false)\n isTest Boolean @default(false)\n isPoint Boolean @default(false)\n isPreTGE Boolean @default(false) // Pre-TGE tokens, used to display a warning in the UI\n isNative Boolean @default(false)\n price Float?\n Opportunity Opportunity[]\n Campaigns Campaign[]\n Reward Reward[]\n DumpTo Dump[] @relation(\"to\")\n DumpFrom Dump[] @relation(\"from\")\n\n @@unique([chainId, address])\n @@index([chainId], type: Hash)\n @@index([symbol, address])\n}\n\nmodel AprRecord {\n id String @id\n timestamp BigInt\n cumulated Float\n AprBreakdown AprBreakdown[]\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel AprBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type AprType\n value Float\n AprRecord AprRecord @relation(fields: [aprRecordId], references: [id])\n aprRecordId String\n\n @@index([aprRecordId], type: Hash)\n}\n\nmodel TVLRecord {\n id String @id\n timestamp BigInt\n total Float\n TvlBreakdown TVLBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel TVLBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type TvlType\n value Float // In case type is TOKEN, this is the raw amount of tokens\n\n TvlRecord TVLRecord @relation(fields: [tvlRecordId], references: [id])\n tvlRecordId String\n\n @@index([tvlRecordId], type: Hash)\n}\n\nmodel DailyRewardsRecord {\n id String @id\n timestamp BigInt\n total Float\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel DailyRewardsBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n value Float\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n DailyRewardsRecord DailyRewardsRecord @relation(fields: [dailyRewardsRecordId], references: [id])\n dailyRewardsRecordId String\n\n @@index([dailyRewardsRecordId], type: Hash)\n}\n\nmodel User {\n address String @id @db.Char(42)\n Rewards Reward[]\n Blacklist Blacklist[]\n CampaignsCreated Campaign[]\n UserComputedValue UserComputedValue[]\n tags String[]\n\n Creator Creator? @relation(fields: [creatorId], references: [id])\n creatorId String?\n}\n\nmodel Creator {\n id String @id\n icon String?\n name String\n Users User[]\n}\n\nmodel Reward {\n id String @id\n MerklRoot MerklRoot @relation(fields: [root], references: [root])\n root String\n User User @relation(fields: [recipient], references: [address])\n recipient String @db.Char(42)\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String @default(\"0\")\n claimed String @default(\"0\")\n pending String @default(\"0\")\n proofs String[]\n Breakdown RewardBreakdown[]\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n Reward Reward @relation(fields: [rewardId], references: [id], onDelete: Cascade)\n rewardId String\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n}\n\nmodel MerklRoot {\n root String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n epoch Int\n timestamp BigInt\n Rewards Reward[]\n\n @@index([chainId, root])\n}\n\nmodel PriceSource {\n id Int @id @default(autoincrement()) // This should hold in Int ids\n symbol String @unique() // Price Id\n method PriceSourceMethod\n args Json?\n}\n\n// priceId -> number\n\nmodel Blacklist {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n poolAddress String @db.Char(42)\n User User @relation(fields: [userAddress], references: [address])\n userAddress String @db.Char(42)\n arrestTimestamp BigInt\n arrestDetails Json\n\n @@unique([chainId, userAddress, poolAddress])\n @@index([userAddress], type: Hash)\n}\n\nmodel Dump {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n FromToken Token @relation(name: \"from\", fields: [fromTokenId], references: [id])\n fromTokenId String\n ToToken Token @relation(name: \"to\", fields: [toTokenId], references: [id])\n toTokenId String\n multisig String @db.Char(42)\n recipient String @db.Char(42)\n amountIn String @default(\"0\")\n amountOut String @default(\"0\")\n datetime DateTime\n timestamp Int\n\n @@unique([chainId, fromTokenId, toTokenId, timestamp])\n}\n\nmodel Logged {\n id String @id\n chainId Int\n type LoggedEntityType @default(UNKNOWN)\n address String? @db.Char(42)\n fetchAtBlock Int\n caughtFromAddress String @db.Char(42)\n entityData Json\n\n @@unique([chainId, address])\n}\n\n// enums\n\nenum LoggedEntityType {\n UNKNOWN\n EULER_VAULT\n UNISWAP_V4\n COMPOUND_v2\n}\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n LONG\n SHORT\n SWAP\n INVALID\n}\n\nenum Status {\n NONE // This would mean that no campaigns was ever created for this opportunity\n PAST\n LIVE\n SOON\n}\n\nenum ExplorerType {\n ETHERSCAN\n BLOCKSCOUT\n}\n\nenum AprType {\n CAMPAIGN\n TOKEN\n PROTOCOL\n}\n\nenum TvlType {\n TOKEN\n PROTOCOL\n}\n\nenum PriceSourceMethod {\n COINGECKO\n CONSTANT\n EQUAL_TO\n ERC4626\n DEXSCREENER\n INDEXCOOP\n DEFILLAMA\n}\n\nenum CampaignManualOverride {\n opportunityId\n creatorAddress\n}\n\nenum OpportunityManualOverride {\n name\n depositUrl\n explorerAddress\n action\n description\n howToSteps\n}\n\nenum DistributionType {\n DUTCH_AUCTION\n FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE // The fix reward value will lie in params.apr\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE\n FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT\n}\n",
687
- "inlineSchemaHash": "d3410f41eaf2293abbee10c5872826b9383f7f0d88b13001d206720081e1dd58",
690
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ngenerator drizzle {\n provider = \"drizzle-prisma-generator\"\n output = \".generated/drizzle/\" // Where to put generated Drizle tables\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_API_URL\")\n}\n\nmodel Campaign {\n id String @id\n ComputeChain Chain @relation(\"compute\", fields: [computeChainId], references: [id])\n computeChainId Int\n DistributionChain Chain @relation(\"distribution\", fields: [distributionChainId], references: [id])\n distributionChainId Int\n campaignId String\n type String\n distributionType DistributionType @default(DUTCH_AUCTION)\n subType Int?\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n startTimestamp BigInt\n endTimestamp BigInt\n params Json\n description String? // Can only be added manually for now\n RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n // Should probably be a 1 to 1 relation if we do not want to keep historic records\n CampaignStatus CampaignStatus[]\n CampaignEngineValues CampaignComputedValue[]\n UserComputedValue UserComputedValue[]\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n manualOverrides CampaignManualOverride[] @default([])\n\n createdAt DateTime @default(now())\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\n// SubTable of Campaigns that should be here as soon as the campaign is processed\nmodel CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt\n processingStarted BigInt\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// SubTable of Campaigns that will contain values populated by the Engine when it's running\nmodel CampaignComputedValue {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n averageBoost Float? // Average boost in case of boosting hook\n totalDistributedInUSD Float? // Used in case there is a distribution cap\n forfeitingBoost Float? // In case some rewards are forfeited, resulting boost for remaining users\n}\n\nmodel UserComputedValue {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n address String @db.Char(42)\n User User? @relation(fields: [address], references: [address])\n reason String\n boost Float?\n\n @@unique([campaignId, address, reason])\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\n // liveCampaigns Int @default(0)\n // dailyRewards Float @default(0)\n Explorer Explorer[]\n Campaigns Campaign[] @relation(\"compute\")\n Distribution Campaign[] @relation(\"distribution\")\n Token Token[]\n Opportunity Opportunity[]\n MerklRoot MerklRoot[]\n Blacklist Blacklist[]\n Dump Dump[]\n}\n\nmodel Explorer {\n id String @id\n type ExplorerType\n Chain Chain @relation(fields: [chainId], references: [id])\n url String\n chainId Int\n\n @@unique([type, chainId])\n}\n\nmodel Opportunity {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id]) // compute\n chainId Int // compute\n type String\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String // Override\n description String @default(\"\") // Override \n howToSteps String[] @default([]) // Override\n depositUrl String? // Override\n explorerAddress String? // Override\n status Status\n action OpportunityAction // Override\n Tokens Token[]\n Campaigns Campaign[]\n Protocols Protocol[]\n MainProtocol Protocol? @relation(name: \"main\", fields: [mainProtocolId], references: [id])\n mainProtocolId String?\n tvl Float @default(0)\n TvlRecords TVLRecord[]\n apr Float @default(0)\n AprRecords AprRecord[]\n dailyRewards Float @default(0)\n DailyRewardsRecords DailyRewardsRecord[]\n tags String[] @default([])\n lastCampaignCreatedAt DateTime @default(now())\n manualOverrides OpportunityManualOverride[] @default([])\n\n // Fields should be automatically parsable and overriden periodically UNLESS\n // they are manually overridden, in which case they should be kept as is\n // manualOverrides OpportunityManualOverride[] @default([])\n\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags String[] @default([])\n name String\n description String @default(\"\")\n url String\n icon String\n // liveCampaigns Int @default(0)\n // totalDailyRewards Float @default(0)\n MainOpportunities Opportunity[] @relation(name: \"main\")\n Opportunities Opportunity[]\n RewardBreakdown RewardBreakdown[]\n}\n\nmodel Token {\n id String @id()\n name String?\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n address String @db.Char(42)\n decimals Int\n symbol String\n displaySymbol String @default(\"\")\n icon String\n verified Boolean @default(false)\n isTest Boolean @default(false)\n isPoint Boolean @default(false)\n isPreTGE Boolean @default(false) // Pre-TGE tokens, used to display a warning in the UI\n isNative Boolean @default(false)\n price Float?\n Opportunity Opportunity[]\n Campaigns Campaign[]\n Reward Reward[]\n DumpTo Dump[] @relation(\"to\")\n DumpFrom Dump[] @relation(\"from\")\n\n @@unique([chainId, address])\n @@index([chainId], type: Hash)\n @@index([symbol, address])\n}\n\nmodel AprRecord {\n id String @id\n timestamp BigInt\n cumulated Float\n AprBreakdown AprBreakdown[]\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel AprBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type AprType\n value Float\n AprRecord AprRecord @relation(fields: [aprRecordId], references: [id])\n aprRecordId String\n\n @@index([aprRecordId], type: Hash)\n}\n\nmodel TVLRecord {\n id String @id\n timestamp BigInt\n total Float\n TvlBreakdown TVLBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel TVLBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n identifier String\n type TvlType\n value Float // In case type is TOKEN, this is the raw amount of tokens\n\n TvlRecord TVLRecord @relation(fields: [tvlRecordId], references: [id])\n tvlRecordId String\n\n @@index([tvlRecordId], type: Hash)\n}\n\nmodel DailyRewardsRecord {\n id String @id\n timestamp BigInt\n total Float\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n\n Opportunity Opportunity @relation(fields: [opportunityId], references: [id])\n opportunityId String\n\n @@unique([opportunityId, timestamp])\n @@index([opportunityId, timestamp(sort: Desc)])\n}\n\nmodel DailyRewardsBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n value Float\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n DailyRewardsRecord DailyRewardsRecord @relation(fields: [dailyRewardsRecordId], references: [id])\n dailyRewardsRecordId String\n\n @@index([dailyRewardsRecordId], type: Hash)\n}\n\nmodel User {\n address String @id @db.Char(42)\n Rewards Reward[]\n Blacklist Blacklist[]\n CampaignsCreated Campaign[]\n UserComputedValue UserComputedValue[]\n tags String[]\n\n Creator Creator? @relation(fields: [creatorId], references: [id])\n creatorId String?\n}\n\nmodel Creator {\n id String @id\n icon String?\n name String\n Users User[]\n}\n\nmodel Reward {\n id String @id\n MerklRoot MerklRoot @relation(fields: [root], references: [root])\n root String\n User User @relation(fields: [recipient], references: [address])\n recipient String @db.Char(42)\n RewardToken Token @relation(fields: [rewardTokenId], references: [id])\n rewardTokenId String\n amount String @default(\"0\")\n claimed String @default(\"0\")\n pending String @default(\"0\")\n proofs String[]\n Breakdown RewardBreakdown[]\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id String @id @default(dbgenerated(\"gen_random_uuid()\")) @db.Uuid\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n Reward Reward @relation(fields: [rewardId], references: [id], onDelete: Cascade)\n rewardId String\n campaignId String\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n // Hidden index on ((CAST(amount AS INTEGER) + CAST(pending AS INTEGER)));\n\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n}\n\nmodel MerklRoot {\n root String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n epoch Int\n timestamp BigInt\n Rewards Reward[]\n\n @@index([chainId, root])\n}\n\nmodel PriceSource {\n id Int @id @default(autoincrement()) // This should hold in Int ids\n symbol String @unique() // Price Id\n method PriceSourceMethod\n args Json?\n}\n\n// priceId -> number\n\nmodel Blacklist {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n poolAddress String @db.Char(42)\n User User @relation(fields: [userAddress], references: [address])\n userAddress String @db.Char(42)\n arrestTimestamp BigInt\n arrestDetails Json\n\n @@unique([chainId, userAddress, poolAddress])\n @@index([userAddress], type: Hash)\n}\n\nmodel Dump {\n id String @id\n Chain Chain @relation(fields: [chainId], references: [id])\n chainId Int\n FromToken Token @relation(name: \"from\", fields: [fromTokenId], references: [id])\n fromTokenId String\n ToToken Token @relation(name: \"to\", fields: [toTokenId], references: [id])\n toTokenId String\n multisig String @db.Char(42)\n recipient String @db.Char(42)\n amountIn String @default(\"0\")\n amountOut String @default(\"0\")\n datetime DateTime\n timestamp Int\n\n @@unique([chainId, fromTokenId, toTokenId, timestamp])\n}\n\nmodel Logged {\n id String @id\n chainId Int\n type LoggedEntityType @default(UNKNOWN)\n address String? @db.Char(42)\n fetchAtBlock Int\n caughtFromAddress String @db.Char(42)\n entityData Json\n\n @@unique([chainId, address])\n}\n\n// enums\n\nenum LoggedEntityType {\n UNKNOWN\n EULER_VAULT\n UNISWAP_V4\n COMPOUND_v2\n}\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n LONG\n SHORT\n SWAP\n INVALID\n}\n\nenum Status {\n NONE // This would mean that no campaigns was ever created for this opportunity\n PAST\n LIVE\n SOON\n}\n\nenum ExplorerType {\n ETHERSCAN\n BLOCKSCOUT\n}\n\nenum AprType {\n CAMPAIGN\n TOKEN\n PROTOCOL\n}\n\nenum TvlType {\n TOKEN\n PROTOCOL\n}\n\nenum PriceSourceMethod {\n COINGECKO\n CONSTANT\n EQUAL_TO\n ERC4626\n DEXSCREENER\n INDEXCOOP\n DEFILLAMA\n}\n\nenum CampaignManualOverride {\n opportunityId\n creatorAddress\n}\n\nenum OpportunityManualOverride {\n name\n depositUrl\n explorerAddress\n action\n description\n howToSteps\n}\n\nenum DistributionType {\n DUTCH_AUCTION\n FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE // The fix reward value will lie in params.apr\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE\n FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT\n FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT\n}\n",
691
+ "inlineSchemaHash": "128803fa840308e6fc6f9597b3c41096b399201a166aba9be52fb70d7c7558bb",
688
692
  "copyEngine": true
689
693
  }
690
694
 
@@ -726,6 +730,10 @@ Object.assign(exports, Prisma)
726
730
  path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node");
727
731
  path.join(process.cwd(), "database/api/.generated/libquery_engine-debian-openssl-3.0.x.so.node")
728
732
 
733
+ // file annotations for bundling tools to include these files
734
+ path.join(__dirname, "libquery_engine-linux-arm64-openssl-3.0.x.so.node");
735
+ path.join(process.cwd(), "database/api/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node")
736
+
729
737
  // file annotations for bundling tools to include these files
730
738
  path.join(__dirname, "libquery_engine-linux-arm64-openssl-1.1.x.so.node");
731
739
  path.join(process.cwd(), "database/api/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node")
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-6c199480066f0501c21e9f8a1ac17ca6881a91e9f9933ca8ec2ed6fa3afea20b",
2
+ "name": "prisma-client-0f113b3f625675710bdc6fd40aab2046e45453d1504ba98c3a39ae5af81205c5",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -1,6 +1,6 @@
1
1
  generator client {
2
2
  provider = "prisma-client-js"
3
- binaryTargets = ["native", "linux-arm64-openssl-1.1.x", "linux-musl-arm64-openssl-3.0.x"]
3
+ binaryTargets = ["native", "linux-arm64-openssl-3.0.x", "linux-arm64-openssl-1.1.x", "linux-musl-arm64-openssl-3.0.x"]
4
4
  output = ".generated/"
5
5
  previewFeatures = ["fullTextSearchPostgres", "relationJoins"]
6
6
  }
@@ -373,6 +373,10 @@ const config = {
373
373
  "value": "debian-openssl-3.0.x",
374
374
  "native": true
375
375
  },
376
+ {
377
+ "fromEnvVar": null,
378
+ "value": "linux-arm64-openssl-3.0.x"
379
+ },
376
380
  {
377
381
  "fromEnvVar": null,
378
382
  "value": "linux-arm64-openssl-1.1.x"
@@ -409,8 +413,8 @@ const config = {
409
413
  }
410
414
  }
411
415
  },
412
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_ENGINE_URL\")\n}\n\nmodel TempLeaves {\n chainId Int\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason])\n @@index([chainId])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Leaves {\n chainId Int\n root String\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason, root])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Proofs {\n chainId Int\n root String\n recipient String @db.Char(42)\n rewardToken String @db.Char(42)\n proof String[]\n\n @@id([chainId, root, recipient, rewardToken])\n @@index([chainId])\n @@index([recipient])\n @@index([rewardToken])\n @@index([root])\n}\n\nmodel MerklRoots {\n chainId Int\n epoch Int\n timestamp Int\n root String\n\n @@id([chainId, root])\n @@index([chainId])\n @@index([epoch])\n @@index([root])\n}\n\nmodel Campaigns {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n\n @@id([chainId, campaignId])\n @@index([chainId])\n @@index([rewardToken])\n @@index([startTimestamp])\n @@index([endTimestamp])\n @@index([campaignType])\n @@index([mainParameter])\n}\n\nmodel CampaignsToProcess {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n lastProcessedTimestamp Int\n processUntilTimestamp Int\n jobIndex Int\n\n @@id([chainId, jobIndex])\n @@index([chainId])\n @@index([jobIndex])\n}\n\nmodel Claims {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n}\n\nmodel ClaimsOverTime {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason, timestamp])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n @@index([timestamp])\n}\n\nmodel ALMs {\n chainId Int\n campaignId String // hash ID of the distrib\n name String\n type String\n address String @db.Char(42)\n target String @db.Char(42)\n owner String @db.Char(42)\n underlyingPool String @db.Char(42)\n\n @@id([chainId, campaignId, address])\n}\n\nmodel ERC20Holders {\n chainId Int\n token String @db.Char(42)\n holders String[] @db.Char(42)\n blockNumber Int\n\n @@id([chainId, token])\n}\n\nmodel Tokens {\n chainId Int\n address String @db.Char(42)\n symbol String\n decimals Int\n\n @@id([chainId, address])\n}\n\nmodel StateSave {\n id String\n blockNumber Int\n state Json\n\n @@id([id, blockNumber])\n}\n\nmodel CampaignCreators {\n address String @db.Char(42)\n tags String @default(\"\")\n\n @@id([address])\n}\n",
413
- "inlineSchemaHash": "b519af2486dd44b05596114a38f56177f3be66eb51fd0a83cca0339b3315d52e",
416
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_ENGINE_URL\")\n}\n\nmodel TempLeaves {\n chainId Int\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason])\n @@index([chainId])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Leaves {\n chainId Int\n root String\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason, root])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Proofs {\n chainId Int\n root String\n recipient String @db.Char(42)\n rewardToken String @db.Char(42)\n proof String[]\n\n @@id([chainId, root, recipient, rewardToken])\n @@index([chainId])\n @@index([recipient])\n @@index([rewardToken])\n @@index([root])\n}\n\nmodel MerklRoots {\n chainId Int\n epoch Int\n timestamp Int\n root String\n\n @@id([chainId, root])\n @@index([chainId])\n @@index([epoch])\n @@index([root])\n}\n\nmodel Campaigns {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n\n @@id([chainId, campaignId])\n @@index([chainId])\n @@index([rewardToken])\n @@index([startTimestamp])\n @@index([endTimestamp])\n @@index([campaignType])\n @@index([mainParameter])\n}\n\nmodel CampaignsToProcess {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n lastProcessedTimestamp Int\n processUntilTimestamp Int\n jobIndex Int\n\n @@id([chainId, jobIndex])\n @@index([chainId])\n @@index([jobIndex])\n}\n\nmodel Claims {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n}\n\nmodel ClaimsOverTime {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason, timestamp])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n @@index([timestamp])\n}\n\nmodel ALMs {\n chainId Int\n campaignId String // hash ID of the distrib\n name String\n type String\n address String @db.Char(42)\n target String @db.Char(42)\n owner String @db.Char(42)\n underlyingPool String @db.Char(42)\n\n @@id([chainId, campaignId, address])\n}\n\nmodel ERC20Holders {\n chainId Int\n token String @db.Char(42)\n holders String[] @db.Char(42)\n blockNumber Int\n\n @@id([chainId, token])\n}\n\nmodel Tokens {\n chainId Int\n address String @db.Char(42)\n symbol String\n decimals Int\n\n @@id([chainId, address])\n}\n\nmodel StateSave {\n id String\n blockNumber Int\n state Json\n\n @@id([id, blockNumber])\n}\n\nmodel CampaignCreators {\n address String @db.Char(42)\n tags String @default(\"\")\n\n @@id([address])\n}\n",
417
+ "inlineSchemaHash": "2c0796c9d1180ec6f684ae06e37ce87a5caaa036e24a9fbc215dfbb9caa8abb4",
414
418
  "copyEngine": true
415
419
  }
416
420
  config.dirname = '/'
@@ -374,6 +374,10 @@ const config = {
374
374
  "value": "debian-openssl-3.0.x",
375
375
  "native": true
376
376
  },
377
+ {
378
+ "fromEnvVar": null,
379
+ "value": "linux-arm64-openssl-3.0.x"
380
+ },
377
381
  {
378
382
  "fromEnvVar": null,
379
383
  "value": "linux-arm64-openssl-1.1.x"
@@ -410,8 +414,8 @@ const config = {
410
414
  }
411
415
  }
412
416
  },
413
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_ENGINE_URL\")\n}\n\nmodel TempLeaves {\n chainId Int\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason])\n @@index([chainId])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Leaves {\n chainId Int\n root String\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason, root])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Proofs {\n chainId Int\n root String\n recipient String @db.Char(42)\n rewardToken String @db.Char(42)\n proof String[]\n\n @@id([chainId, root, recipient, rewardToken])\n @@index([chainId])\n @@index([recipient])\n @@index([rewardToken])\n @@index([root])\n}\n\nmodel MerklRoots {\n chainId Int\n epoch Int\n timestamp Int\n root String\n\n @@id([chainId, root])\n @@index([chainId])\n @@index([epoch])\n @@index([root])\n}\n\nmodel Campaigns {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n\n @@id([chainId, campaignId])\n @@index([chainId])\n @@index([rewardToken])\n @@index([startTimestamp])\n @@index([endTimestamp])\n @@index([campaignType])\n @@index([mainParameter])\n}\n\nmodel CampaignsToProcess {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n lastProcessedTimestamp Int\n processUntilTimestamp Int\n jobIndex Int\n\n @@id([chainId, jobIndex])\n @@index([chainId])\n @@index([jobIndex])\n}\n\nmodel Claims {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n}\n\nmodel ClaimsOverTime {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason, timestamp])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n @@index([timestamp])\n}\n\nmodel ALMs {\n chainId Int\n campaignId String // hash ID of the distrib\n name String\n type String\n address String @db.Char(42)\n target String @db.Char(42)\n owner String @db.Char(42)\n underlyingPool String @db.Char(42)\n\n @@id([chainId, campaignId, address])\n}\n\nmodel ERC20Holders {\n chainId Int\n token String @db.Char(42)\n holders String[] @db.Char(42)\n blockNumber Int\n\n @@id([chainId, token])\n}\n\nmodel Tokens {\n chainId Int\n address String @db.Char(42)\n symbol String\n decimals Int\n\n @@id([chainId, address])\n}\n\nmodel StateSave {\n id String\n blockNumber Int\n state Json\n\n @@id([id, blockNumber])\n}\n\nmodel CampaignCreators {\n address String @db.Char(42)\n tags String @default(\"\")\n\n @@id([address])\n}\n",
414
- "inlineSchemaHash": "b519af2486dd44b05596114a38f56177f3be66eb51fd0a83cca0339b3315d52e",
417
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"native\", \"linux-arm64-openssl-3.0.x\", \"linux-arm64-openssl-1.1.x\", \"linux-musl-arm64-openssl-3.0.x\"]\n output = \".generated/\"\n previewFeatures = [\"fullTextSearchPostgres\", \"relationJoins\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_ENGINE_URL\")\n}\n\nmodel TempLeaves {\n chainId Int\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason])\n @@index([chainId])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Leaves {\n chainId Int\n root String\n campaignId String\n recipient String @db.Char(42)\n reason String\n rewardToken String @db.Char(42)\n amount String @default(\"0\")\n lastProcessedTimestamp Int\n\n @@id([chainId, campaignId, recipient, reason, root])\n @@index([campaignId])\n @@index([recipient])\n @@index([reason])\n @@index([rewardToken])\n}\n\nmodel Proofs {\n chainId Int\n root String\n recipient String @db.Char(42)\n rewardToken String @db.Char(42)\n proof String[]\n\n @@id([chainId, root, recipient, rewardToken])\n @@index([chainId])\n @@index([recipient])\n @@index([rewardToken])\n @@index([root])\n}\n\nmodel MerklRoots {\n chainId Int\n epoch Int\n timestamp Int\n root String\n\n @@id([chainId, root])\n @@index([chainId])\n @@index([epoch])\n @@index([root])\n}\n\nmodel Campaigns {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n\n @@id([chainId, campaignId])\n @@index([chainId])\n @@index([rewardToken])\n @@index([startTimestamp])\n @@index([endTimestamp])\n @@index([campaignType])\n @@index([mainParameter])\n}\n\nmodel CampaignsToProcess {\n chainId Int // Chain of the campaign\n computeChainId Int @default(0) // Chain where the compute is done. 0 means it's the same as chainId\n index Int // Index of the campaign\n campaignId String // hash ID of the distrib\n creator String @db.Char(42) // Address of the creator\n campaignType Int // Type of campaign --> univ3, token, univ4\n campaignSubType Int // Subtype of campaign --> UniswapV3, PancakeSwapV3\n rewardToken String // Address of reward token\n amount String\n startTimestamp Int\n endTimestamp Int\n\n // Will be useful for table joins\n mainParameter String @db.Char(42) // TODO: confirm it'll always be an address\n\n // Config of the distrib\n // A JSON with all the configuration specific to the distribution type\n campaignParameters Json\n lastProcessedTimestamp Int\n processUntilTimestamp Int\n jobIndex Int\n\n @@id([chainId, jobIndex])\n @@index([chainId])\n @@index([jobIndex])\n}\n\nmodel Claims {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n}\n\nmodel ClaimsOverTime {\n chainId Int\n recipient String @db.Char(42)\n campaignId String\n rewardToken String @db.Char(42)\n reason String\n root String\n claimed String @default(\"0\")\n timestamp Int\n\n @@id([chainId, recipient, campaignId, rewardToken, reason, timestamp])\n @@index([chainId])\n @@index([recipient])\n @@index([campaignId])\n @@index([timestamp])\n}\n\nmodel ALMs {\n chainId Int\n campaignId String // hash ID of the distrib\n name String\n type String\n address String @db.Char(42)\n target String @db.Char(42)\n owner String @db.Char(42)\n underlyingPool String @db.Char(42)\n\n @@id([chainId, campaignId, address])\n}\n\nmodel ERC20Holders {\n chainId Int\n token String @db.Char(42)\n holders String[] @db.Char(42)\n blockNumber Int\n\n @@id([chainId, token])\n}\n\nmodel Tokens {\n chainId Int\n address String @db.Char(42)\n symbol String\n decimals Int\n\n @@id([chainId, address])\n}\n\nmodel StateSave {\n id String\n blockNumber Int\n state Json\n\n @@id([id, blockNumber])\n}\n\nmodel CampaignCreators {\n address String @db.Char(42)\n tags String @default(\"\")\n\n @@id([address])\n}\n",
418
+ "inlineSchemaHash": "2c0796c9d1180ec6f684ae06e37ce87a5caaa036e24a9fbc215dfbb9caa8abb4",
415
419
  "copyEngine": true
416
420
  }
417
421
 
@@ -453,6 +457,10 @@ Object.assign(exports, Prisma)
453
457
  path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node");
454
458
  path.join(process.cwd(), "database/engine/.generated/libquery_engine-debian-openssl-3.0.x.so.node")
455
459
 
460
+ // file annotations for bundling tools to include these files
461
+ path.join(__dirname, "libquery_engine-linux-arm64-openssl-3.0.x.so.node");
462
+ path.join(process.cwd(), "database/engine/.generated/libquery_engine-linux-arm64-openssl-3.0.x.so.node")
463
+
456
464
  // file annotations for bundling tools to include these files
457
465
  path.join(__dirname, "libquery_engine-linux-arm64-openssl-1.1.x.so.node");
458
466
  path.join(process.cwd(), "database/engine/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node")
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-51b9ec87759dff31d413f785232a1d6d4706a32454eed7815c3ef23c6004ff93",
2
+ "name": "prisma-client-585c2a1f10b84cec55b2c6fec54c2c23decacd3da4a5401989e8251ff484a675",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -1,6 +1,6 @@
1
1
  generator client {
2
2
  provider = "prisma-client-js"
3
- binaryTargets = ["native", "linux-arm64-openssl-1.1.x", "linux-musl-arm64-openssl-3.0.x"]
3
+ binaryTargets = ["native", "linux-arm64-openssl-3.0.x", "linux-arm64-openssl-1.1.x", "linux-musl-arm64-openssl-3.0.x"]
4
4
  output = ".generated/"
5
5
  previewFeatures = ["fullTextSearchPostgres", "relationJoins"]
6
6
  }
@@ -2665,9 +2665,7 @@ declare const eden: {
2665
2665
  }>>;
2666
2666
  distributed: {
2667
2667
  get: (options: {
2668
- headers: {
2669
- authorization: string;
2670
- };
2668
+ headers?: Record<string, unknown> | undefined;
2671
2669
  query: {
2672
2670
  since: Date;
2673
2671
  };
@@ -2677,9 +2675,7 @@ declare const eden: {
2677
2675
  }>>;
2678
2676
  "by-chains": {
2679
2677
  get: (options: {
2680
- headers: {
2681
- authorization: string;
2682
- };
2678
+ headers?: Record<string, unknown> | undefined;
2683
2679
  query: {
2684
2680
  since: Date;
2685
2681
  };
@@ -2691,9 +2687,7 @@ declare const eden: {
2691
2687
  };
2692
2688
  "by-types": {
2693
2689
  get: (options: {
2694
- headers: {
2695
- authorization: string;
2696
- };
2690
+ headers?: Record<string, unknown> | undefined;
2697
2691
  query: {
2698
2692
  since: Date;
2699
2693
  };
@@ -2705,9 +2699,7 @@ declare const eden: {
2705
2699
  };
2706
2700
  "by-protocols": {
2707
2701
  get: (options: {
2708
- headers: {
2709
- authorization: string;
2710
- };
2702
+ headers?: Record<string, unknown> | undefined;
2711
2703
  query: {
2712
2704
  since: Date;
2713
2705
  };
@@ -8702,9 +8694,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8702
8694
  query: {
8703
8695
  since: Date;
8704
8696
  };
8705
- headers: {
8706
- authorization: string;
8707
- };
8697
+ headers: unknown;
8708
8698
  response: {
8709
8699
  200: number;
8710
8700
  };
@@ -8723,9 +8713,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8723
8713
  query: {
8724
8714
  since: Date;
8725
8715
  };
8726
- headers: {
8727
- authorization: string;
8728
- };
8716
+ headers: unknown;
8729
8717
  response: {
8730
8718
  [x: string]: any;
8731
8719
  200: any;
@@ -8746,9 +8734,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8746
8734
  query: {
8747
8735
  since: Date;
8748
8736
  };
8749
- headers: {
8750
- authorization: string;
8751
- };
8737
+ headers: unknown;
8752
8738
  response: {
8753
8739
  [x: string]: any;
8754
8740
  200: any;
@@ -8769,9 +8755,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8769
8755
  query: {
8770
8756
  since: Date;
8771
8757
  };
8772
- headers: {
8773
- authorization: string;
8774
- };
8758
+ headers: unknown;
8775
8759
  response: {
8776
8760
  [x: string]: any;
8777
8761
  200: any;
@@ -14481,9 +14465,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
14481
14465
  }>>;
14482
14466
  distributed: {
14483
14467
  get: (options: {
14484
- headers: {
14485
- authorization: string;
14486
- };
14468
+ headers?: Record<string, unknown> | undefined;
14487
14469
  query: {
14488
14470
  since: Date;
14489
14471
  };
@@ -14493,9 +14475,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
14493
14475
  }>>;
14494
14476
  "by-chains": {
14495
14477
  get: (options: {
14496
- headers: {
14497
- authorization: string;
14498
- };
14478
+ headers?: Record<string, unknown> | undefined;
14499
14479
  query: {
14500
14480
  since: Date;
14501
14481
  };
@@ -14507,9 +14487,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
14507
14487
  };
14508
14488
  "by-types": {
14509
14489
  get: (options: {
14510
- headers: {
14511
- authorization: string;
14512
- };
14490
+ headers?: Record<string, unknown> | undefined;
14513
14491
  query: {
14514
14492
  since: Date;
14515
14493
  };
@@ -14521,9 +14499,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
14521
14499
  };
14522
14500
  "by-protocols": {
14523
14501
  get: (options: {
14524
- headers: {
14525
- authorization: string;
14526
- };
14502
+ headers?: Record<string, unknown> | undefined;
14527
14503
  query: {
14528
14504
  since: Date;
14529
14505
  };
@@ -33,8 +33,7 @@ export class LendleTVLBuilder {
33
33
  if (!underlyingToken.decimals || !underlyingToken.price) {
34
34
  throw new Error(`Missing decimals or price for token ${underlyingToken.address}`);
35
35
  }
36
- const totalAssets = bigIntToNumber(underlyingPerShare, 18) *
37
- bigIntToNumber(totalSupply, campaign.campaignParameters.decimalsTargetToken);
36
+ const totalAssets = bigIntToNumber(BigInt(underlyingPerShare) * BigInt(totalSupply), campaign.campaignParameters.decimalsTargetToken + underlyingToken.decimals);
38
37
  const tvl = totalAssets * underlyingToken.price;
39
38
  tvls.push({
40
39
  campaign,
@@ -3414,9 +3414,7 @@ declare const app: Elysia<"", false, {
3414
3414
  query: {
3415
3415
  since: Date;
3416
3416
  };
3417
- headers: {
3418
- authorization: string;
3419
- };
3417
+ headers: unknown;
3420
3418
  response: {
3421
3419
  200: number;
3422
3420
  };
@@ -3435,9 +3433,7 @@ declare const app: Elysia<"", false, {
3435
3433
  query: {
3436
3434
  since: Date;
3437
3435
  };
3438
- headers: {
3439
- authorization: string;
3440
- };
3436
+ headers: unknown;
3441
3437
  response: {
3442
3438
  [x: string]: any;
3443
3439
  200: any;
@@ -3458,9 +3454,7 @@ declare const app: Elysia<"", false, {
3458
3454
  query: {
3459
3455
  since: Date;
3460
3456
  };
3461
- headers: {
3462
- authorization: string;
3463
- };
3457
+ headers: unknown;
3464
3458
  response: {
3465
3459
  [x: string]: any;
3466
3460
  200: any;
@@ -3481,9 +3475,7 @@ declare const app: Elysia<"", false, {
3481
3475
  query: {
3482
3476
  since: Date;
3483
3477
  };
3484
- headers: {
3485
- authorization: string;
3486
- };
3478
+ headers: unknown;
3487
3479
  response: {
3488
3480
  [x: string]: any;
3489
3481
  200: any;
@@ -532,9 +532,9 @@ const RoninInterfaceCampaigns = {
532
532
  url: "https://app.roninchain.com/liquidity/v3/0x90f31f1907a4d1443a6aacdc91ac2312f91bafa7",
533
533
  forwarders: [],
534
534
  isOutOfRangeIncentivized: false,
535
- weightFees: 1500,
536
- weightToken0: 5500,
537
- weightToken1: 3000,
535
+ weightFees: 3000,
536
+ weightToken0: 4500,
537
+ weightToken1: 2500,
538
538
  },
539
539
  [roninCampaigns.Katana_AXS_RON_Ronin]: {
540
540
  campaignType: Campaign.CLAMM,
@@ -546,9 +546,9 @@ const RoninInterfaceCampaigns = {
546
546
  url: "https://app.roninchain.com/liquidity/v3/0x3230b903e8a5d6e46b5a5028470dd33e7b673722",
547
547
  forwarders: [],
548
548
  isOutOfRangeIncentivized: false,
549
- weightFees: 2000,
550
- weightToken0: 500,
551
- weightToken1: 7500,
549
+ weightFees: 3000,
550
+ weightToken0: 2500,
551
+ weightToken1: 4500,
552
552
  },
553
553
  [roninCampaigns.Katana_USDC_RON_Ronin]: {
554
554
  campaignType: Campaign.CLAMM,
@@ -574,9 +574,9 @@ const RoninInterfaceCampaigns = {
574
574
  url: "https://app.roninchain.com/liquidity/v3/0x0fbe1a7f0f006a4a4d817b2aa922889612758ce8",
575
575
  forwarders: [],
576
576
  isOutOfRangeIncentivized: false,
577
- weightFees: 1000,
578
- weightToken0: 6500,
579
- weightToken1: 2500,
577
+ weightFees: 8500,
578
+ weightToken0: 500,
579
+ weightToken1: 1000,
580
580
  },
581
581
  [roninCampaigns.Supply_WETH_Compound_Ronin]: {
582
582
  campaignType: Campaign.COMPOUND_V3,
@@ -337,9 +337,7 @@ export declare const RewardController: Elysia<"/rewards", false, {
337
337
  query: {
338
338
  since: Date;
339
339
  };
340
- headers: {
341
- authorization: string;
342
- };
340
+ headers: unknown;
343
341
  response: {
344
342
  200: number;
345
343
  };
@@ -358,9 +356,7 @@ export declare const RewardController: Elysia<"/rewards", false, {
358
356
  query: {
359
357
  since: Date;
360
358
  };
361
- headers: {
362
- authorization: string;
363
- };
359
+ headers: unknown;
364
360
  response: {
365
361
  [x: string]: any;
366
362
  200: any;
@@ -381,9 +377,7 @@ export declare const RewardController: Elysia<"/rewards", false, {
381
377
  query: {
382
378
  since: Date;
383
379
  };
384
- headers: {
385
- authorization: string;
386
- };
380
+ headers: unknown;
387
381
  response: {
388
382
  [x: string]: any;
389
383
  200: any;
@@ -404,9 +398,7 @@ export declare const RewardController: Elysia<"/rewards", false, {
404
398
  query: {
405
399
  since: Date;
406
400
  };
407
- headers: {
408
- authorization: string;
409
- };
401
+ headers: unknown;
410
402
  response: {
411
403
  [x: string]: any;
412
404
  200: any;
@@ -425,9 +417,7 @@ export declare const RewardController: Elysia<"/rewards", false, {
425
417
  resolve: {};
426
418
  schema: {
427
419
  body: unknown;
428
- headers: {
429
- authorization: string;
430
- };
420
+ headers: unknown;
431
421
  query: {
432
422
  since: Date;
433
423
  };
@@ -126,7 +126,6 @@ export const RewardController = new Elysia({ prefix: "/rewards", detail: { tags:
126
126
  })
127
127
  .guard({
128
128
  query: t.Object({ since: t.Date() }),
129
- headers: AuthorizationHeadersDto,
130
129
  detail: { hide: true },
131
130
  })
132
131
  .get("/total/distributed", async ({ query }) => await RewardService.getTotalDistributed(query.since.getTime() / 1000))