Skip to content

265 368 371 372 contract tests and smoke tests#500

Merged
Olowodarey merged 3 commits intoArena1X:mainfrom
Xoulomon:265-368-371-372-contract-tests-and-smoke-tests
Mar 30, 2026
Merged

265 368 371 372 contract tests and smoke tests#500
Olowodarey merged 3 commits intoArena1X:mainfrom
Xoulomon:265-368-371-372-contract-tests-and-smoke-tests

Conversation

@Xoulomon
Copy link
Copy Markdown

Contract Tests & Smoke Tests Implementation

Changes

#368 - Price Calculation Edge Case Tests

  • Add test_calculate_price_large_reserves
  • Add test_calculate_price_small_reserves
  • Add test_calculate_price_very_high
  • Add test_calculate_price_very_low

#371 - LP Token Edge Case Tests

  • Add test_calculate_lp_tokens_proportional
  • Add test_calculate_lp_tokens_after_fees
  • Add test_calculate_lp_tokens_large_pool
  • Add test_calculate_lp_tokens_small_deposit

#372 - LP Token Validation Tests

  • Add test_calculate_lp_tokens_zero_deposit_fails
  • Add test_calculate_lp_tokens_negative_deposit_fails
  • Add test_calculate_lp_tokens_overflow_protection
  • Add test_calculate_lp_tokens_multiple_deposits

#265 - Testnet Deployment Script & Smoke Tests

  • Create contract/scripts/smoke_test.sh with 9-step end-to-end validation
  • Add contract/Makefile with build, test, smoke-test targets
  • Update contract/README.md with smoke test documentation

#266 - Season Entity & Migrations

  • Add participant_count field to Season entity
  • Create migration for participant_count column

Test Results

  • All 19 liquidity tests passing ✅

Closes #265
Closes #368
Closes #371
Closes #372

…d LP token edge case tests

- Add test_calculate_price_large_reserves for large reserve handling
- Add test_calculate_price_small_reserves for small reserve handling
- Add test_calculate_price_very_high for high price scenarios
- Add test_calculate_price_very_low for low price scenarios
- Add test_calculate_lp_tokens_proportional for proportional deposits
- Add test_calculate_lp_tokens_after_fees for fee impact
- Add test_calculate_lp_tokens_large_pool for large pool deposits
- Add test_calculate_lp_tokens_small_deposit for small deposit handling
- Add test_calculate_lp_tokens_zero_deposit_fails for validation
- Add test_calculate_lp_tokens_negative_deposit_fails for validation
- Add test_calculate_lp_tokens_overflow_protection for overflow handling
- Add test_calculate_lp_tokens_multiple_deposits for sequential deposits

All 19 tests pass successfully.
- Create contract/scripts/smoke_test.sh for end-to-end testnet validation
- Implement 9-step smoke test flow:
  1. Fund test wallets via Friendbot
  2. Build contract WASM
  3. Deploy contract to testnet
  4. Initialize contract with admin config
  5. Create market with YES/NO outcomes
  6. Submit predictions from two users
  7. Resolve market with winning outcome
  8. Claim payouts for winners
  9. Verify final balances
- Add contract/Makefile with build, test, smoke-test, and clean targets
- Update contract/README.md with smoke test documentation
- Script outputs clear ✅ PASS/❌ FAIL messages at each step
- Supports custom network settings via environment variables
…igration

- Add participant_count column to seasons table (defaults to 0)
- Update Season entity with participant_count field
- Create migration 1775300000000-AddParticipantCountToSeasons
- Maintains existing is_active index for efficient queries
- Supports tracking season participation metrics
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview, Comment Mar 30, 2026 5:31am

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

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

@Olowodarey Olowodarey merged commit a99fb75 into Arena1X:main Mar 30, 2026
6 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

3 participants