Skip to content

dd contributor guide for deterministic quote tests#188

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
nayt9:contract
Apr 25, 2026
Merged

dd contributor guide for deterministic quote tests#188
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
nayt9:contract

Conversation

@nayt9

@nayt9 nayt9 commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Adds 4 new quote monotonicity tests and comprehensive contributor documentation for CI, storage invariants, and testing best practices.

Changes
Tests (
buy_quote_monotonicity.rs
)
Added 4 tests verifying quote stability under the fixed price model:

test_buy_quote_monotonic_with_zero_creator_fee - 50/50 fee split edge case
test_buy_quote_monotonic_with_zero_protocol_fee - 100% creator fee edge case
test_buy_quote_stable_across_50_sequential_purchases - High-volume stability test
test_buy_quote_multiple_creators_independent_monotonicity - Multi-creator independence
All tests verify that quotes remain constant after purchases (fixed price model).

Documentation
ci-contract-checks.md

  • CI pipeline guide, local verification, troubleshooting
    storage-key-invariants.md
  • Storage model, key invariants, common pitfalls
    deterministic-quote-tests.md
  • Quote testing guide with patterns and examples
    Updated CONTRIBUTING.md - Added links to new documentation
    Key Fixes
    Fee configs now sum to 10,000 bps (100%) with protocol ≤ 5,000 bps (50%)
    Tests use total_amount for payments, not just price
    Tests reflect global price model (shared across creators)
    Test Results
    test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
    Verification
    cargo test --test buy_quote_monotonicity
    cargo fmt --all -- --check
    cargo clippy --workspace --all-targets

closes #149
closes #151
closes #155
closes #176

@drips-wave

drips-wave Bot commented Apr 25, 2026

Copy link
Copy Markdown

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

@Chucks1093
Chucks1093 merged commit 052e4ae into accesslayerorg:main Apr 25, 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