Summary
A price snapshot should be recorded in the database after every confirmed buy, capturing the new supply and price so the price history endpoint has accurate data. An integration test should confirm a snapshot is created for each buy and that the snapshot values match the post-buy contract state.
Scope
- Execute a buy of 5 keys and assert one price snapshot is created
- Assert the snapshot
supply matches the post-buy supply
- Assert the snapshot
price matches get_price at the new supply
- Execute a second buy and assert two total snapshots exist for that creator
- Assert no snapshot is created when a buy fails
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
A price snapshot should be recorded in the database after every confirmed buy, capturing the new supply and price so the price history endpoint has accurate data. An integration test should confirm a snapshot is created for each buy and that the snapshot values match the post-buy contract state.
Scope
supplymatches the post-buy supplypricematchesget_priceat the new supplyAcceptance Criteria
supplymatches post-buy supplypricematches on-chain price at new supplyETA: 12 hours
Coordinate on Telegram