Skip to content

fixed issues - #416

Merged
chizzy192 merged 2 commits into
StellarState:devfrom
Benalex8797:feature/issue-implementation
Aug 28, 2026
Merged

fixed issues#416
chizzy192 merged 2 commits into
StellarState:devfrom
Benalex8797:feature/issue-implementation

Conversation

@Benalex8797

@Benalex8797 Benalex8797 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

closes #81
closes #85
closes #90
closes #98

SUMMARY:

14 new tests, all present and correct. Here's the complete summary of what was done for issue #85:

No code changes were needed — the initialize function already had all the correct guards (AlreadyInit, InvalidFeeBps, InvalidAddress, require_auth). The issue was about test coverage.

14 new unit tests added to test.rs, organized into three groups:

First-init boundary validation (4 tests):

test_reinit_guard_first_init_zero_fee_succeeds — 0 bps is valid
test_reinit_guard_first_init_max_fee_succeeds — 10000 bps is valid
test_reinit_guard_first_init_fee_above_max_rejected — 10001 bps → InvalidFeeBps, contract stays uninitialized
test_reinit_guard_zero_address_admin_rejected — zero StrKey address → InvalidAddress
Re-initialization guard (6 tests):

Same admin + same fee → AlreadyInit
Same admin + different fee → AlreadyInit, original fee preserved
Different admin → AlreadyInit, original admin preserved
Different admin + zero fee → AlreadyInit
Invalid fee on re-init → AlreadyInit wins (checked before InvalidFeeBps)
test_reinit_guard_config_fully_immutable_after_rejection — all six Config fields unchanged
State corruption / NotInit coverage (4 tests):

test_reinit_guard_repeated_attempts_do_not_corrupt_state — 6 consecutive re-init attempts, all AlreadyInit, config intact
test_reinit_guard_ops_before_init_return_not_init — 7 entry points all return NotInit on uninitialized contract
test_reinit_guard_record_payment_not_init — focused record_payment before init
test_reinit_guard_update_fee_not_init — focused update_platform_fee_bps before init

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

@chizzy192
chizzy192 merged commit 0d65b7f into StellarState:dev Aug 28, 2026
2 of 7 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