@merkl/api 0.10.144 → 0.10.145
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/database/api/.generated/edge.js +3 -2
- package/dist/database/api/.generated/index.js +3 -2
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +1 -1
- package/dist/database/engine/.generated/edge.js +3 -2
- package/dist/database/engine/.generated/index.js +3 -2
- package/dist/database/engine/.generated/package.json +1 -1
- package/dist/database/engine/.generated/schema.prisma +1 -1
- package/dist/src/modules/v4/router.js +2 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +4 -2
@@ -558,6 +558,7 @@ const config = {
|
|
558
558
|
],
|
559
559
|
"previewFeatures": [
|
560
560
|
"fullTextSearchPostgres",
|
561
|
+
"tracing",
|
561
562
|
"relationJoins"
|
562
563
|
],
|
563
564
|
"sourceFilePath": "/home/runner/work/merkl-api/merkl-api/database/api/schema.prisma",
|
@@ -583,8 +584,8 @@ const config = {
|
|
583
584
|
}
|
584
585
|
}
|
585
586
|
},
|
586
|
-
"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_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 CampaignType\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 RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n CampaignStatus CampaignStatus[]\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\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 CampaignType\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String\n status Status\n action OpportunityAction\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\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags ProtocolTag[]\n name String\n description String @default(\"\")\n url String\n icon String\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 icon String\n verified 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 Int @id @default(autoincrement())\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 Int @id @default(autoincrement())\n identifier String\n type TvlType\n value Float\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 Int @id @default(autoincrement())\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 tags String[]\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 proofs String[]\n Breakdown RewardBreakdown[]\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id Int @id @default(autoincrement())\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n auxiliaryData1 String?\n auxiliaryData2 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\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n @@index([amount(sort: Desc)])\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())\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 CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt @default(0)\n processingStarted BigInt @default(0)\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// enums\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum CampaignType {\n INVALID\n ERC20\n CLAMM\n ERC20_SNAPSHOT\n JSON_AIRDROP\n SILO\n RADIANT\n MORPHO\n DOLOMITE\n BADGER\n COMPOUND\n AJNA\n EULER\n UNISWAP_V4\n}\n\nenum ProtocolTag {\n AMM\n ALM\n DEX\n LENDING\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n INVALID\n}\n\nenum Status {\n NONE\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",
|
587
|
-
"inlineSchemaHash": "
|
587
|
+
"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\", \"tracing\"]\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 CampaignType\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 RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n CampaignStatus CampaignStatus[]\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\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 CampaignType\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String\n status Status\n action OpportunityAction\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\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags ProtocolTag[]\n name String\n description String @default(\"\")\n url String\n icon String\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 icon String\n verified 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 Int @id @default(autoincrement())\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 Int @id @default(autoincrement())\n identifier String\n type TvlType\n value Float\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 Int @id @default(autoincrement())\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 tags String[]\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 proofs String[]\n Breakdown RewardBreakdown[]\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id Int @id @default(autoincrement())\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n auxiliaryData1 String?\n auxiliaryData2 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\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n @@index([amount(sort: Desc)])\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())\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 CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt @default(0)\n processingStarted BigInt @default(0)\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// enums\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum CampaignType {\n INVALID\n ERC20\n CLAMM\n ERC20_SNAPSHOT\n JSON_AIRDROP\n SILO\n RADIANT\n MORPHO\n DOLOMITE\n BADGER\n COMPOUND\n AJNA\n EULER\n UNISWAP_V4\n}\n\nenum ProtocolTag {\n AMM\n ALM\n DEX\n LENDING\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n INVALID\n}\n\nenum Status {\n NONE\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",
|
588
|
+
"inlineSchemaHash": "3aa6c07271bc09d5c825edde5800f9571a702d8e6bf30900de1634c0f880b777",
|
588
589
|
"copyEngine": true
|
589
590
|
}
|
590
591
|
config.dirname = '/'
|
@@ -559,6 +559,7 @@ const config = {
|
|
559
559
|
],
|
560
560
|
"previewFeatures": [
|
561
561
|
"fullTextSearchPostgres",
|
562
|
+
"tracing",
|
562
563
|
"relationJoins"
|
563
564
|
],
|
564
565
|
"sourceFilePath": "/home/runner/work/merkl-api/merkl-api/database/api/schema.prisma",
|
@@ -584,8 +585,8 @@ const config = {
|
|
584
585
|
}
|
585
586
|
}
|
586
587
|
},
|
587
|
-
"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_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 CampaignType\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 RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n CampaignStatus CampaignStatus[]\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\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 CampaignType\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String\n status Status\n action OpportunityAction\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\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags ProtocolTag[]\n name String\n description String @default(\"\")\n url String\n icon String\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 icon String\n verified 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 Int @id @default(autoincrement())\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 Int @id @default(autoincrement())\n identifier String\n type TvlType\n value Float\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 Int @id @default(autoincrement())\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 tags String[]\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 proofs String[]\n Breakdown RewardBreakdown[]\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id Int @id @default(autoincrement())\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n auxiliaryData1 String?\n auxiliaryData2 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\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n @@index([amount(sort: Desc)])\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())\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 CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt @default(0)\n processingStarted BigInt @default(0)\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// enums\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum CampaignType {\n INVALID\n ERC20\n CLAMM\n ERC20_SNAPSHOT\n JSON_AIRDROP\n SILO\n RADIANT\n MORPHO\n DOLOMITE\n BADGER\n COMPOUND\n AJNA\n EULER\n UNISWAP_V4\n}\n\nenum ProtocolTag {\n AMM\n ALM\n DEX\n LENDING\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n INVALID\n}\n\nenum Status {\n NONE\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",
|
588
|
-
"inlineSchemaHash": "
|
588
|
+
"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\", \"tracing\"]\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 CampaignType\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 RewardBreakdown RewardBreakdown[]\n DailyRewardsBreakdown DailyRewardsBreakdown[]\n Creator User @relation(fields: [creatorAddress], references: [address])\n creatorAddress String @db.Char(42)\n CampaignStatus CampaignStatus[]\n\n @@unique([distributionChainId, campaignId])\n @@index([opportunityId], type: Hash)\n}\n\nmodel Chain {\n id Int @id\n name String\n icon String\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 CampaignType\n identifier String // eg. 0xUniswapPool - formerly mainParameter\n name String\n status Status\n action OpportunityAction\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\n @@unique([chainId, type, identifier])\n}\n\nmodel Protocol {\n id String @id\n tags ProtocolTag[]\n name String\n description String @default(\"\")\n url String\n icon String\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 icon String\n verified 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 Int @id @default(autoincrement())\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 Int @id @default(autoincrement())\n identifier String\n type TvlType\n value Float\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 Int @id @default(autoincrement())\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 tags String[]\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 proofs String[]\n Breakdown RewardBreakdown[]\n\n @@unique([root, recipient, rewardTokenId])\n @@index([root], type: Hash)\n @@index([recipient, rewardTokenId])\n}\n\nmodel RewardBreakdown {\n id Int @id @default(autoincrement())\n Protocol Protocol? @relation(fields: [protocolId], references: [id])\n protocolId String?\n reason String\n amount String\n claimed String\n pending String\n auxiliaryData1 String?\n auxiliaryData2 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\n @@unique([rewardId, campaignId, reason])\n @@index([rewardId], type: Hash)\n @@index([campaignId], type: Hash)\n @@index([amount(sort: Desc)])\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())\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 CampaignStatus {\n campaignId String @id\n Campaign Campaign @relation(fields: [campaignId], references: [id])\n computedUntil BigInt @default(0)\n processingStarted BigInt @default(0)\n status RunStatus @default(SUCCESS)\n error String @default(\"\")\n details Json @default(\"{}\")\n}\n\n// enums\n\nenum RunStatus {\n PROCESSING\n SUCCESS\n FAILED\n SKIPPED\n}\n\nenum CampaignType {\n INVALID\n ERC20\n CLAMM\n ERC20_SNAPSHOT\n JSON_AIRDROP\n SILO\n RADIANT\n MORPHO\n DOLOMITE\n BADGER\n COMPOUND\n AJNA\n EULER\n UNISWAP_V4\n}\n\nenum ProtocolTag {\n AMM\n ALM\n DEX\n LENDING\n}\n\nenum OpportunityAction {\n POOL\n HOLD\n DROP\n LEND\n BORROW\n INVALID\n}\n\nenum Status {\n NONE\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",
|
589
|
+
"inlineSchemaHash": "3aa6c07271bc09d5c825edde5800f9571a702d8e6bf30900de1634c0f880b777",
|
589
590
|
"copyEngine": true
|
590
591
|
}
|
591
592
|
|
@@ -2,7 +2,7 @@ generator client {
|
|
2
2
|
provider = "prisma-client-js"
|
3
3
|
binaryTargets = ["native", "linux-arm64-openssl-1.1.x", "linux-musl-arm64-openssl-3.0.x"]
|
4
4
|
output = ".generated/"
|
5
|
-
previewFeatures = ["fullTextSearchPostgres", "relationJoins"]
|
5
|
+
previewFeatures = ["fullTextSearchPostgres", "relationJoins", "tracing"]
|
6
6
|
}
|
7
7
|
|
8
8
|
datasource db {
|
@@ -387,6 +387,7 @@ const config = {
|
|
387
387
|
],
|
388
388
|
"previewFeatures": [
|
389
389
|
"fullTextSearchPostgres",
|
390
|
+
"tracing",
|
390
391
|
"relationJoins"
|
391
392
|
],
|
392
393
|
"sourceFilePath": "/home/runner/work/merkl-api/merkl-api/database/engine/schema.prisma",
|
@@ -412,8 +413,8 @@ const config = {
|
|
412
413
|
}
|
413
414
|
}
|
414
415
|
},
|
415
|
-
"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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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",
|
416
|
-
"inlineSchemaHash": "
|
416
|
+
"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\", \"tracing\"]\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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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": "0a40645bd7a36811126c932c1c844530e8d804c150ee8ea76a46d593ababa40b",
|
417
418
|
"copyEngine": true
|
418
419
|
}
|
419
420
|
config.dirname = '/'
|
@@ -388,6 +388,7 @@ const config = {
|
|
388
388
|
],
|
389
389
|
"previewFeatures": [
|
390
390
|
"fullTextSearchPostgres",
|
391
|
+
"tracing",
|
391
392
|
"relationJoins"
|
392
393
|
],
|
393
394
|
"sourceFilePath": "/home/runner/work/merkl-api/merkl-api/database/engine/schema.prisma",
|
@@ -413,8 +414,8 @@ const config = {
|
|
413
414
|
}
|
414
415
|
}
|
415
416
|
},
|
416
|
-
"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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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": "
|
417
|
+
"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\", \"tracing\"]\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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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 auxiliaryData1 Decimal @default(0) @db.Decimal(8, 6) // Average Boost\n auxiliaryData2 Decimal @default(0) @db.Decimal(8, 6)\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": "0a40645bd7a36811126c932c1c844530e8d804c150ee8ea76a46d593ababa40b",
|
418
419
|
"copyEngine": true
|
419
420
|
}
|
420
421
|
|
@@ -2,7 +2,7 @@ generator client {
|
|
2
2
|
provider = "prisma-client-js"
|
3
3
|
binaryTargets = ["native", "linux-arm64-openssl-1.1.x", "linux-musl-arm64-openssl-3.0.x"]
|
4
4
|
output = ".generated/"
|
5
|
-
previewFeatures = ["fullTextSearchPostgres", "relationJoins"]
|
5
|
+
previewFeatures = ["fullTextSearchPostgres", "relationJoins", "tracing"]
|
6
6
|
}
|
7
7
|
|
8
8
|
datasource db {
|
@@ -12,6 +12,7 @@ import bigintToString from "../../utils/bigintToString";
|
|
12
12
|
import { opentelemetry } from "@elysiajs/opentelemetry";
|
13
13
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
14
14
|
import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-node";
|
15
|
+
import { PrismaInstrumentation } from "@prisma/instrumentation";
|
15
16
|
import Elysia from "elysia";
|
16
17
|
import { DynamicDataController } from "./dynamicData";
|
17
18
|
import { InteractionController } from "./interaction/interaction.controller";
|
@@ -31,6 +32,7 @@ export const v4 = new Elysia({ tags: ["v4"], prefix: "/v4" })
|
|
31
32
|
},
|
32
33
|
})),
|
33
34
|
],
|
35
|
+
instrumentations: [new PrismaInstrumentation()],
|
34
36
|
})
|
35
37
|
: new Elysia() // not optimal
|
36
38
|
)
|