Skip to content

feat: add tests for issues #471, #472, #475, #477#493

Merged
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
privexlabs:feat/issues-471-472-475-477
Jun 27, 2026
Merged

feat: add tests for issues #471, #472, #475, #477#493
Chucks1093 merged 2 commits into
accesslayerorg:mainfrom
privexlabs:feat/issues-471-472-475-477

Conversation

@privexlabs

Copy link
Copy Markdown
Contributor

Summary

Resolves four test-coverage issues across the creator-keys contract.

Changes

Test plan

  • cargo test -p creator-keys passes with no failures
  • test_protocol_fee_recipient_updated_event_old_recipient_field confirms old address
  • test_protocol_fee_recipient_updated_event_new_recipient_field confirms new address
  • test_get_buyback_quote_returns_zero_for_zero_amount confirms zero return
  • test_setup_holders_produces_correct_balances confirms per-wallet balances
  • test_locked_allocation_sets_total_supply_immediately confirms supply at registration
  • test_buy_quote_reflects_locked_supply confirms price reflects locked supply

Closes #477
Closes #475
Closes #471
Closes #472

…cesslayerorg#475, accesslayerorg#477

accesslayerorg#477 — Add field-level tests for ProtocolFeeRecipientUpdated event
- New protocol_fee_recipient_updated_event.rs with three tests asserting
  old_recipient field, new_recipient field, and exactly-one-event-per-call

accesslayerorg#475 — Change get_buyback_quote to return 0 for amount=0; add tests
- get_buyback_quote now short-circuits with Ok(0) when amount is zero
  instead of returning NotPositiveAmount (view functions should not reject
  zero-valued reads)
- buyback itself keeps its validate_buyback_amount guard unchanged
- Updated test_buyback_zero_amount_reverts to cover only the operation path
- New get_buyback_quote_zero_amount.rs with three tests: returns zero,
  does not change supply, does not change holder balance

accesslayerorg#471 — Add setup_holders fixture helper and confirmation tests
- New setup_holders helper in contract_test_env/mod.rs: registers N wallets
  with varied key balances in one call and returns final total supply
- New setup_holders_helper.rs with two confirmation tests

accesslayerorg#472 — Add regression tests for locked allocation bonding-curve supply
- New locked_allocation_bonding_curve_supply.rs with three tests: supply
  equals locked amount immediately, buy quote reflects that supply via the
  bonding curve, creator without allocation starts at zero supply
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

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

Reformats protocol_fee_recipient_updated_event.rs,
get_buyback_quote_zero_amount.rs, locked_allocation_bonding_curve_supply.rs,
and setup_holders_helper.rs to match the project's rustfmt configuration.
@Chucks1093 Chucks1093 merged commit 0a846be into accesslayerorg:main Jun 27, 2026
1 check 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