-
Notifications
You must be signed in to change notification settings - Fork 380
Open
Description
Summary
Users currently need to call Gnosis RPC and inspect smart contracts to calculate storage costs. The Bee node has this information (via /chainstate) but doesn't expose it in a user-friendly way with calculations.
Additionally, when stamp purchases fail (e.g., duration too short), users get unhelpful error messages.
Current Behavior
/chainstatereturns rawcurrentPrice(PLUR per chunk per block), but no calculations- Stamp purchase failures return generic errors without explaining why or what's needed
Expected Behavior
1. Storage price calculations endpoint
Extend /chainstate or add new endpoint that provides:
- Current storage price (PLUR per chunk per block) - already in chainstate
- Calculator: given amount + depth → expected duration
- Calculator: given duration + depth → required amount
- Calculator: given duration + depth → total cost to pay
2. Meaningful stamp purchase errors
When a stamp purchase fails due to constraints, return a clear error explaining:
- Why it failed (e.g., "duration less than minimum 24 hours")
- What's required (e.g., "use amount of at least XXX for 24h minimum")
- Include current price context so user can adjust
Use Case
Developers and users want to purchase stamps without needing to:
- Query Gnosis RPC directly
- Understand PLUR/chunk/block calculations manually
- Guess why their purchase failed
This would significantly improve the stamp purchasing UX.
Metadata
Metadata
Assignees
Labels
No labels