Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
322676e
Add wsteth constants (actual values tbd)
PintoPirate Nov 10, 2025
aac9c9f
Fix tests
PintoPirate Nov 10, 2025
49f6b4d
pintowsteth token seeder
PintoPirate Nov 10, 2025
d94298b
Add wsteth addrs
PintoPirate Nov 19, 2025
a8b70ff
Update pintowsteth address
PintoPirate Nov 20, 2025
52dee1c
Merge branch 'main' into pp/whitelist-wsteth
PintoPirate Dec 31, 2025
6f52cf4
Merge branch 'main' into pp/whitelist-wsteth
PintoPirate Jan 2, 2026
fa7c983
Update abi folder structure
PintoPirate Jan 14, 2026
0bb8555
Refactor v0 blueprint files and rename tables
PintoPirate Jan 14, 2026
983ad04
Add referral address to table
PintoPirate Jan 14, 2026
b227ab3
Update cutover script
PintoPirate Jan 14, 2026
e1ae64c
Add blueprint version columns
PintoPirate Jan 16, 2026
4e290fb
npm audit fix
PintoPirate Jan 16, 2026
296b89f
Rename order type to remove v0
PintoPirate Jan 16, 2026
fdde25f
Parse multiple blueprint types
PintoPirate Jan 16, 2026
c6addd4
checksum address
PintoPirate Jan 19, 2026
1bc9e62
Merge branch 'pp/whitelist-wsteth' into pp/blueprint-upgrade
PintoPirate Jan 19, 2026
52ae85f
Track referral recipients in tractor
PintoPirate Jan 20, 2026
711601c
Update indexing table names
PintoPirate Jan 20, 2026
e88dc6a
Update indexing table schema and cutover scripts
PintoPirate Jan 20, 2026
fa6edf7
Update deploy blocks and cleanup abis
PintoPirate Jan 20, 2026
f9abf8f
Fix issue preventing looping task execution
PintoPirate Jan 20, 2026
3c173d3
Convert up order parsing accepts version
PintoPirate Jan 20, 2026
29142ee
Add missing column to indexing tables
PintoPirate Jan 20, 2026
b87eda9
update api doc with new enum
PintoPirate Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions docker/indexing-cutover-queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ commit;
-- Tractor migration (indexing_ -> actual)
-- Column names need to be explicit if new properties are added (since the order will differ between the env)
begin;
truncate table tractor_snapshot_sow_v0, tractor_snapshot_convert_up_v0, tractor_execution_sow_v0, tractor_execution_convert_up_v0, tractor_order_sow_v0, tractor_order_convert_up_v0, tractor_execution, tractor_order;
truncate table tractor_snapshot_sow, tractor_snapshot_convert_up, tractor_execution_sow, tractor_execution_convert_up, tractor_order_sow, tractor_order_convert_up, tractor_execution, tractor_order;
insert into tractor_order ("blueprintHash", "orderType", "publisher", "data", "operatorPasteInstrs", "maxNonce", "startTime", "endTime", "signature", "publishedTimestamp", "publishedBlock", "beanTip", "cancelled", "lastExecutableSeason", "createdAt", "updatedAt") select "blueprintHash", "orderType"::text::public."enum_tractor_order_orderType", "publisher", "data", "operatorPasteInstrs", "maxNonce", "startTime", "endTime", "signature", "publishedTimestamp", "publishedBlock", "beanTip", "cancelled", "lastExecutableSeason", "createdAt", "updatedAt" from indexing_tractor_order;
insert into tractor_execution select * from indexing_tractor_execution;
insert into tractor_order_sow_v0 select * from indexing_tractor_order_sow_v0;
insert into tractor_order_convert_up_v0 ("blueprintHash", "lastExecutedTimestamp", "beansLeftToConvert", "orderComplete", "amountFunded", "cascadeAmountFunded", "sourceTokenIndices", "totalBeanAmountToConvert", "minBeansConvertPerExecution", "maxBeansConvertPerExecution", "capAmountToBonusCapacity", "minTimeBetweenConverts", "minConvertBonusCapacity", "maxGrownStalkPerBdv", "grownStalkPerBdvBonusBid", "maxPriceToConvertUp", "minPriceToConvertUp", "seedDifference", "maxGrownStalkPerBdvPenalty", "slippageRatio", "lowStalkDeposits", "createdAt", "updatedAt") select "blueprintHash", "lastExecutedTimestamp", "beansLeftToConvert", "orderComplete", "amountFunded", "cascadeAmountFunded", "sourceTokenIndices", "totalBeanAmountToConvert", "minBeansConvertPerExecution", "maxBeansConvertPerExecution", "capAmountToBonusCapacity", "minTimeBetweenConverts", "minConvertBonusCapacity", "maxGrownStalkPerBdv", "grownStalkPerBdvBonusBid", "maxPriceToConvertUp", "minPriceToConvertUp", "seedDifference", "maxGrownStalkPerBdvPenalty", "slippageRatio", "lowStalkDeposits"::text::public."enum_tractor_order_convert_up_v0_lowStalkDeposits", "createdAt", "updatedAt" from indexing_tractor_order_convert_up_v0;
insert into tractor_execution_sow_v0 ("id", "blueprintHash", "index", "beans", "pods", "placeInLine", "usedTokenIndices", "usedGrownStalkPerBdv", "createdAt", "updatedAt") select "id", "blueprintHash", "index", "beans", "pods", "placeInLine", "usedTokenIndices", "usedGrownStalkPerBdv", "createdAt", "updatedAt" from indexing_tractor_execution_sow_v0;
insert into tractor_execution_convert_up_v0 ("id", "blueprintHash", "usedTokenIndices", "tokenFromAmounts", "tokenToAmounts", "beansConverted", "beanPriceBefore", "beanPriceAfter", "gsBonusStalk", "gsBonusBdv", "gsPenaltyStalk", "gsPenaltyBdv", "createdAt", "updatedAt") select "id", "blueprintHash", "usedTokenIndices", "tokenFromAmounts", "tokenToAmounts", "beansConverted", "beanPriceBefore", "beanPriceAfter", "gsBonusStalk", "gsBonusBdv", "gsPenaltyStalk", "gsPenaltyBdv", "createdAt", "updatedAt" from indexing_tractor_execution_convert_up_v0;
insert into tractor_snapshot_sow_v0 ("id", "snapshotTimestamp", "snapshotBlock", "totalPintoSown", "totalPodsMinted", "totalCascadeFundedBelowTemp", "totalCascadeFundedAnyTemp", "totalTipsPaid", "currentMaxTip", "totalExecutions", "createdAt", "updatedAt", "season", "maxSowThisSeason", "uniquePublishers") select "id", "snapshotTimestamp", "snapshotBlock", "totalPintoSown", "totalPodsMinted", "totalCascadeFundedBelowTemp", "totalCascadeFundedAnyTemp", "totalTipsPaid", "currentMaxTip", "totalExecutions", "createdAt", "updatedAt", "season", "maxSowThisSeason", "uniquePublishers" from indexing_tractor_snapshot_sow_v0;
insert into tractor_snapshot_convert_up_v0 ("id", "snapshotTimestamp", "snapshotBlock", "season", "totalBeansConverted", "totalGsBonusStalk", "totalGsBonusBdv", "totalGsPenaltyStalk", "totalGsPenaltyBdv", "totalCascadeFunded", "totalCascadeFundedExecutable", "totalTipsPaid", "currentMaxTip", "totalExecutions", "uniquePublishers", "createdAt", "updatedAt") select "id", "snapshotTimestamp", "snapshotBlock", "season", "totalBeansConverted", "totalGsBonusStalk", "totalGsBonusBdv", "totalGsPenaltyStalk", "totalGsPenaltyBdv", "totalCascadeFunded", "totalCascadeFundedExecutable", "totalTipsPaid", "currentMaxTip", "totalExecutions", "uniquePublishers", "createdAt", "updatedAt" from indexing_tractor_snapshot_convert_up_v0;
insert into tractor_execution ("id", "blueprintHash", "nonce", "operator", "gasCostUsd", "tipUsd", "executedTimestamp", "executedBlock", "executedTxn", "createdAt", "updatedAt") select "id", "blueprintHash", "nonce", "operator", "gasCostUsd", "tipUsd", "executedTimestamp", "executedBlock", "executedTxn", "createdAt", "updatedAt" from indexing_tractor_execution;
insert into tractor_order_sow ("blueprintHash", "pintoSownCounter", "lastExecutedSeason", "orderComplete", "amountFunded", "cascadeAmountFunded", "sourceTokenIndices", "totalAmountToSow", "minAmountToSowPerSeason", "maxAmountToSowPerSeason", "minTemp", "maxPodlineLength", "maxGrownStalkPerBdv", "runBlocksAfterSunrise", "slippageRatio", "createdAt", "updatedAt", "blueprintVersion", "referralAddress") select "blueprintHash", "pintoSownCounter", "lastExecutedSeason", "orderComplete", "amountFunded", "cascadeAmountFunded", "sourceTokenIndices", "totalAmountToSow", "minAmountToSowPerSeason", "maxAmountToSowPerSeason", "minTemp", "maxPodlineLength", "maxGrownStalkPerBdv", "runBlocksAfterSunrise", "slippageRatio", "createdAt", "updatedAt", "blueprintVersion", "referralAddress" from indexing_tractor_order_sow;
insert into tractor_order_convert_up ("blueprintHash", "lastExecutedTimestamp", "beansLeftToConvert", "orderComplete", "amountFunded", "cascadeAmountFunded", "sourceTokenIndices", "totalBeanAmountToConvert", "minBeansConvertPerExecution", "maxBeansConvertPerExecution", "capAmountToBonusCapacity", "minTimeBetweenConverts", "minConvertBonusCapacity", "maxGrownStalkPerBdv", "grownStalkPerBdvBonusBid", "maxPriceToConvertUp", "minPriceToConvertUp", "seedDifference", "maxGrownStalkPerBdvPenalty", "slippageRatio", "lowStalkDeposits", "createdAt", "updatedAt") select "blueprintHash", "lastExecutedTimestamp", "beansLeftToConvert", "orderComplete", "amountFunded", "cascadeAmountFunded", "sourceTokenIndices", "totalBeanAmountToConvert", "minBeansConvertPerExecution", "maxBeansConvertPerExecution", "capAmountToBonusCapacity", "minTimeBetweenConverts", "minConvertBonusCapacity", "maxGrownStalkPerBdv", "grownStalkPerBdvBonusBid", "maxPriceToConvertUp", "minPriceToConvertUp", "seedDifference", "maxGrownStalkPerBdvPenalty", "slippageRatio", "lowStalkDeposits"::text::public."enum_tractor_order_convert_up_lowStalkDeposits", "createdAt", "updatedAt" from indexing_tractor_order_convert_up;
insert into tractor_execution_sow ("id", "blueprintHash", "index", "beans", "pods", "placeInLine", "usedTokenIndices", "usedGrownStalkPerBdv", "referrer", "referrerPods", "referrerPlaceInLine", "refereePods", "refereePlaceInLine", "createdAt", "updatedAt") select "id", "blueprintHash", "index", "beans", "pods", "placeInLine", "usedTokenIndices", "usedGrownStalkPerBdv", "referrer", "referrerPods", "referrerPlaceInLine", "refereePods", "refereePlaceInLine", "createdAt", "updatedAt" from indexing_tractor_execution_sow;
insert into tractor_execution_convert_up ("id", "blueprintHash", "usedTokenIndices", "tokenFromAmounts", "tokenToAmounts", "beansConverted", "beanPriceBefore", "beanPriceAfter", "gsBonusStalk", "gsBonusBdv", "gsPenaltyStalk", "gsPenaltyBdv", "createdAt", "updatedAt") select "id", "blueprintHash", "usedTokenIndices", "tokenFromAmounts", "tokenToAmounts", "beansConverted", "beanPriceBefore", "beanPriceAfter", "gsBonusStalk", "gsBonusBdv", "gsPenaltyStalk", "gsPenaltyBdv", "createdAt", "updatedAt" from indexing_tractor_execution_convert_up;
insert into tractor_snapshot_sow ("id", "snapshotTimestamp", "snapshotBlock", "totalPintoSown", "totalPodsMinted", "totalCascadeFundedBelowTemp", "totalCascadeFundedAnyTemp", "totalTipsPaid", "currentMaxTip", "totalExecutions", "createdAt", "updatedAt", "season", "maxSowThisSeason", "uniquePublishers") select "id", "snapshotTimestamp", "snapshotBlock", "totalPintoSown", "totalPodsMinted", "totalCascadeFundedBelowTemp", "totalCascadeFundedAnyTemp", "totalTipsPaid", "currentMaxTip", "totalExecutions", "createdAt", "updatedAt", "season", "maxSowThisSeason", "uniquePublishers" from indexing_tractor_snapshot_sow;
insert into tractor_snapshot_convert_up ("id", "snapshotTimestamp", "snapshotBlock", "season", "totalBeansConverted", "totalGsBonusStalk", "totalGsBonusBdv", "totalGsPenaltyStalk", "totalGsPenaltyBdv", "totalCascadeFunded", "totalCascadeFundedExecutable", "totalTipsPaid", "currentMaxTip", "totalExecutions", "uniquePublishers", "createdAt", "updatedAt") select "id", "snapshotTimestamp", "snapshotBlock", "season", "totalBeansConverted", "totalGsBonusStalk", "totalGsBonusBdv", "totalGsPenaltyStalk", "totalGsPenaltyBdv", "totalCascadeFunded", "totalCascadeFundedExecutable", "totalTipsPaid", "currentMaxTip", "totalExecutions", "uniquePublishers", "createdAt", "updatedAt" from indexing_tractor_snapshot_convert_up;
update "ApiMeta" set "lastTractorUpdate" = (select "lastTractorUpdate" from "indexing_ApiMeta");
commit;

Expand Down Expand Up @@ -62,15 +62,15 @@ commit;

-- Tractor cleanup
begin;
drop table if exists indexing_tractor_snapshot_sow_v0;
drop table if exists indexing_tractor_snapshot_convert_up_v0;
drop table if exists indexing_tractor_execution_sow_v0;
drop table if exists indexing_tractor_execution_convert_up_v0;
drop table if exists indexing_tractor_order_sow_v0;
drop table if exists indexing_tractor_order_convert_up_v0;
drop table if exists indexing_tractor_snapshot_sow;
drop table if exists indexing_tractor_snapshot_convert_up;
drop table if exists indexing_tractor_execution_sow;
drop table if exists indexing_tractor_execution_convert_up;
drop table if exists indexing_tractor_order_sow;
drop table if exists indexing_tractor_order_convert_up;
drop table if exists indexing_tractor_execution;
drop table if exists indexing_tractor_order;
drop type if exists "enum_indexing_tractor_order_orderType";
drop type if exists "enum_indexing_tractor_order_convert_up_v0_lowStalkDeposits";
drop type if exists "enum_indexing_tractor_order_convert_up_lowStalkDeposits";
update "indexing_ApiMeta" set "lastTractorUpdate" = null;
commit;
61 changes: 31 additions & 30 deletions docs/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,8 @@ paths:
type: string
description: Type of the tractor order
enum:
- SOW_V0
- SOW
- CONVERT_UP
- KNOWN
- UNKNOWN
blueprintHash:
Expand Down Expand Up @@ -1086,7 +1087,7 @@ paths:
orderType:
type: string
description: Type of the order
example: "SOW_V0"
example: "SOW"
publisher:
type: string
description: Address of the publisher
Expand Down Expand Up @@ -1323,8 +1324,8 @@ paths:
type: string
description: Type of the tractor order
enum:
- SOW_V0
- CONVERT_UP_V0
- SOW
- CONVERT_UP
betweenTimes:
type: array
description: Date range for snapshot time filtering
Expand Down Expand Up @@ -1377,37 +1378,37 @@ paths:
description: Season number of this snapshot
totalPintoSown:
type: string
description: (SOW_V0) Cumulative amount of Pinto sown at snapshot time
description: (SOW) Cumulative amount of Pinto sown at snapshot time
totalPodsMinted:
type: string
description: (SOW_V0) Cumulative number of pods minted at snapshot time
description: (SOW) Cumulative number of pods minted at snapshot time
totalCascadeFundedBelowTemp:
type: string
description: (SOW_V0) Total funded amount that can be executed at the current temperature
description: (SOW) Total funded amount that can be executed at the current temperature
totalCascadeFundedAnyTemp:
type: string
description: (SOW_V0) Total funded amount that can be executed at any temperature
description: (SOW) Total funded amount that can be executed at any temperature
totalBeansConverted:
type: string
description: (CONVERT_UP_V0) Cumulative amount of Beans converted at snapshot time
description: (CONVERT_UP) Cumulative amount of Beans converted at snapshot time
totalGsBonusStalk:
type: string
description: (CONVERT_UP_V0) Total Grown Stalk bonus received from conversions
description: (CONVERT_UP) Total Grown Stalk bonus received from conversions
totalGsBonusBdv:
type: string
description: (CONVERT_UP_V0) Total BDV associated with Grown Stalk bonuses
description: (CONVERT_UP) Total BDV associated with Grown Stalk bonuses
totalGsPenaltyStalk:
type: string
description: (CONVERT_UP_V0) Total Grown Stalk penalty from conversions
description: (CONVERT_UP) Total Grown Stalk penalty from conversions
totalGsPenaltyBdv:
type: string
description: (CONVERT_UP_V0) Total BDV associated with Grown Stalk penalties
description: (CONVERT_UP) Total BDV associated with Grown Stalk penalties
totalCascadeFunded:
type: string
description: (CONVERT_UP_V0) Total amount funded in cascade
description: (CONVERT_UP) Total amount funded in cascade
totalCascadeFundedExecutable:
type: string
description: (CONVERT_UP_V0) Total funded amount that is currently executable
description: (CONVERT_UP) Total funded amount that is currently executable
totalTipsPaid:
type: string
description: Cumulative tips paid to this order type at snapshot time
Expand Down Expand Up @@ -1463,8 +1464,8 @@ paths:
items:
type: string
enum:
- SOW_V0
- CONVERT_UP_V0
- SOW
- CONVERT_UP
betweenTimes:
type: array
description: Date range for snapshot time filtering
Expand Down Expand Up @@ -1520,37 +1521,37 @@ paths:
description: Season number of this snapshot
totalPintoSown:
type: string
description: (SOW_V0) Cumulative amount of Pinto sown at snapshot time
description: (SOW) Cumulative amount of Pinto sown at snapshot time
totalPodsMinted:
type: string
description: (SOW_V0) Cumulative number of pods minted at snapshot time
description: (SOW) Cumulative number of pods minted at snapshot time
totalCascadeFundedBelowTemp:
type: string
description: (SOW_V0) Total funded amount that can be executed at the current temperature
description: (SOW) Total funded amount that can be executed at the current temperature
totalCascadeFundedAnyTemp:
type: string
description: (SOW_V0) Total funded amount that can be executed at any temperature
description: (SOW) Total funded amount that can be executed at any temperature
totalBeansConverted:
type: string
description: (CONVERT_UP_V0) Cumulative amount of Beans converted at snapshot time
description: (CONVERT_UP) Cumulative amount of Beans converted at snapshot time
totalGsBonusStalk:
type: string
description: (CONVERT_UP_V0) Total Grown Stalk bonus received from conversions
description: (CONVERT_UP) Total Grown Stalk bonus received from conversions
totalGsBonusBdv:
type: string
description: (CONVERT_UP_V0) Total BDV associated with Grown Stalk bonuses
description: (CONVERT_UP) Total BDV associated with Grown Stalk bonuses
totalGsPenaltyStalk:
type: string
description: (CONVERT_UP_V0) Total Grown Stalk penalty from conversions
description: (CONVERT_UP) Total Grown Stalk penalty from conversions
totalGsPenaltyBdv:
type: string
description: (CONVERT_UP_V0) Total BDV associated with Grown Stalk penalties
description: (CONVERT_UP) Total BDV associated with Grown Stalk penalties
totalCascadeFunded:
type: string
description: (CONVERT_UP_V0) Total amount funded in cascade
description: (CONVERT_UP) Total amount funded in cascade
totalCascadeFundedExecutable:
type: string
description: (CONVERT_UP_V0) Total funded amount that is currently executable
description: (CONVERT_UP) Total funded amount that is currently executable
totalTipsPaid:
type: string
description: Cumulative tips paid to this order type at snapshot time
Expand All @@ -1566,7 +1567,7 @@ paths:
example:
lastUpdated: 29374836
snapshots:
SOW_V0:
SOW:
- id: 172
snapshotTimestamp: "2025-04-23T23:00:01.000Z"
snapshotBlock: 29329927
Expand All @@ -1579,7 +1580,7 @@ paths:
currentMaxTip: "910000"
totalExecutions: 71
uniquePublishers: 4
CONVERT_UP_V0:
CONVERT_UP:
- snapshotTimestamp: "2025-11-06T09:00:01.000Z"
snapshotBlock: 37815127
season: 8426
Expand Down
Loading