Skip to content

test(contract): add tests for token_address validation and get_pool_count sequencing (#1372, #1376) - #1392

Merged
cyber-punk112 merged 2 commits into
Web3Novalabs:mainfrom
Sarietgold:feat/issue-1372-1376-token-validation-and-pool-count-tests
Sep 24, 2026
Merged

cyber-punk112 merged 2 commits into
Web3Novalabs:mainfrom
Sarietgold:feat/issue-1372-1376-token-validation-and-pool-count-tests

Conversation

@Sarietgold

@Sarietgold Sarietgold commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR implements test suites and validation handling for Soroban smart contract issues #1372 and #1376.

Issue #1372: token_address validation in donate_with_token and refund_donation

  • Verified invalid/unregistered token address is rejected before transfer attempt in both donate_with_token and refund_donation.
  • Verified non-token contracts fail gracefully without state corruption.
  • Enforced token_address validation matching POOL_TOKEN_PREFIX on refund_donation.
  • Added tests verifying state integrity against callback/reentrancy.

Issue #1376: get_pool_count sequencing consistency

  • Verified initial get_pool_count returns 0.
  • Verified count increments by exactly 1 per create_pool and create_pool_for_school call.
  • Verified count matches highest valid pool_id usable with get_pool.
  • Verified count is unaffected by donation or pool closure.
  • Verified consistent count sequence across interleaved admin/school calls.

Closes #1372
Closes #1376
Closes #1374
Closes #1375

@drips-wave

drips-wave Bot commented Sep 24, 2026

Copy link
Copy Markdown

@Sarietgold 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

@cyber-punk112
cyber-punk112 merged commit c6a787b into Web3Novalabs:main Sep 24, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants