Skip to content

fix(investment_vault): persistent TTL extension and carbon-credit tests - #496

Open
adams813 wants to merge 1 commit into
Heliobond:mainfrom
adams813:fix/vault-ttl-carbon-tests-317-318
Open

fix(investment_vault): persistent TTL extension and carbon-credit tests#496
adams813 wants to merge 1 commit into
Heliobond:mainfrom
adams813:fix/vault-ttl-carbon-tests-317-318

Conversation

@adams813

Copy link
Copy Markdown

Summary

Linked issue

Closes #317
Closes #364
Closes #318
Closes #360

Type of change

  • Bug fix
  • Tests
  • Docs / chore

Test plan

  • test_persistent_key_survives_n_idle_ledgers — key remains readable after N untouched ledgers
  • test_persistent_write_reextends_ttl_after_decay — rewrite restores target TTL
  • Carbon-credit success paths: calculate, issue, transfer, balance, set price
  • Carbon-credit failure paths: unknown project, zero credits, non-positive amount, insufficient balance, missing from auth, oracle unset / non-positive price
  • CI: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test --all, WASM size, gas budgets

Checklist

  • Tied to accepted issues (Closes #…)
  • New behaviour is covered by tests
  • No secrets committed
  • Docs updated where relevant (docs/STORAGE.md, adr/002-storage-patterns.md)

Made with Cursor

…n credits

Soroban does not auto-extend persistent TTL on write, so idle yield, queue,
insurance, and carbon-credit keys could archive. Route every persistent
write through set_persistent, document the 30-day rent policy, and add
unit tests for carbon-credit calculation, issuance, transfer, and balance.

Closes Heliobond#317
Closes Heliobond#364
Closes Heliobond#318
Closes Heliobond#360

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@adams813 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Carbon credit feature (~140 lines) has essentially no test coverage Most persistent storage keys in investment_vault never get a TTL extension

2 participants