Repository navigation
Extract the repeated TTL-extension boilerplate in the contract into storage helpers #236
Description
Activity
- addedgood first issueGood for newcomersGood for newcomerscontractsSoroban smart contract (contracts/)Soroban smart contract (contracts/)refactorCode structure improvementsCode structure improvements
on Aug 27, 2026 - addedStellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
on Aug 29, 2026 gorrettivibes-coder commented
on Aug 29, 2026 ContributorMore actions@gorrettivibes-coder has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
Hello maintainer please kindly assign this to me so I can see issues to solve this wave at all and I will deliver
ℹ️ Repo Maintainers: To accept this application, review their application or assign @gorrettivibes-coder to this issue.
Adeyemiadigun commented
on Aug 29, 2026 ContributorMore actions@Adeyemiadigun has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
Hi Maintainer, reviewed the issue in detail. Full stack background with solid experience refactoring Soroban smart contracts, optimizing state management, and cleaning up storage TTL patterns.
Repeating the storage set and TTL extension boilerplate across multiple functions creates unnecessary maintenance overhead and risks oversights like the missing instance extension currently present in cancel_circle. I plan to extract these patterns into clean helper functions (load_circle, save_circle, and bump_instance) within a new contracts/sharibo/src/storage.rs module, centralize the TTL constants, update lib.rs, and ensure all tests pass successfully.
No blockers on my end — I'm ready to submit a PR shortly. Please assign!
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Adeyemiadigun to this issue.
dotmantissa commented
on Aug 30, 2026 ContributorMore actions@dotmantissa has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
Please, assign this issue to me.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @dotmantissa to this issue.
Dantama022 commented
on Aug 30, 2026 ContributorMore actions@Dantama022 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
i would love to work on this
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Dantama022 to this issue.
Congratulations, @Dantama022! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.
🧑💻 @Dantama022: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
- added a commit that references this issue
on Sep 30, 2026
Context
This five-line incantation appears in
create_circle,fund,claim, andcancel_circleincontracts/sharibo/src/lib.rs:Four copies means four chances to forget one — and
cancel_circlealready does forget the instanceextension, which is arguably a bug in its own right.
Where to build it
contracts/sharibo/src/storage.rs(new, or wherever the module split lands) —load_circle,save_circle,bump_instance.contracts/sharibo/src/lib.rs— replace the four copies.What to do
fn load_circle(env: &Env, id: u64) -> Circlethat panics withCircleNotFound, replacing four identicalunwrap_or_elseblocks.fn save_circle(env: &Env, id: u64, circle: &Circle)that sets and extends the persistent TTL.fn bump_instance(env: &Env).cancel_circleshould also bump instance TTL, and note the answer in a comment.Acceptance criteria
LEDGER_THRESHOLDandLEDGER_EXTEND_TOare referenced in exactly one module.cargo testpasses, includinginstance_ttl_extended_after_create_fund_claim.