Skip to content

Latest commit

Β 

History

History
120 lines (101 loc) Β· 4.24 KB

File metadata and controls

120 lines (101 loc) Β· 4.24 KB

πŸš€ PYTHPREDICT COMPLETE TEST SUITE

======================================== PYTHPREDICT TEST SUITE

πŸ”§ Initializing test environment...

πŸ“‚ Loading wallets... πŸ’° Funding alice... πŸ’° Funding bob... πŸ’° Funding charlie... πŸ’° Funding dave... πŸ’° Funding eve... βœ… Created token mint: 3nKY314X2rqJmvyTabh6wixgN9S6q4HsREh6wBWpGe16

βœ… Minted 1000 tokens to alice βœ… Minted 1000 tokens to bob βœ… Minted 500 tokens to charlie βœ… Minted 500 tokens to dave βœ… Minted 500 tokens to eve

πŸ’° Total token supply: 3,500 tokens ✨ Environment ready!

πŸ“‹ Section 1: Core Functionality Tests

βœ… Market 'coreTestMarket' created: A7P52Np3... βœ” Should create a market with correct parameters (456ms) βœ” Should place bets with correct fee calculation (452ms) βœ” Should update odds correctly after multiple bets (928ms)

⏳ Waiting for market to reach settlement time... βœ… Market 'coreTestMarket' resolved. Winner: UNKNOWN βœ” Should resolve market and determine winner correctly (12358ms) βœ” Should distribute winnings correctly to winners (910ms) ⚠️ Attempt 1 failed, retrying in 1000ms... ⚠️ Attempt 2 failed, retrying in 2000ms... βœ” Should prevent double claiming (3032ms) πŸ”¬ Section 2: Edge Cases and Precision Tests βœ… Market 'edgeTestMarket' created: P9XM7yYp... βœ” Should handle minimum bet amounts (602ms) πŸ“Š Token Conservation Check: Initial: 3500.00 Current: 3500.00 Deviation: 0.000000 βœ” Should maintain token conservation (934ms) βœ… Market 'emptyMarket' created: 5ALc3Gmi... βœ… Market 'emptyMarket' resolved. Winner: NO βœ… Successfully resolved empty market βœ” Should handle market with no bets (17927ms) ⚑ Section 3: Multi-Market Stress Test

πŸ”₯ Creating multiple markets concurrently... βœ… Market 'stress3' created: 7ycovG4i... βœ… Market 'stress1' created: FttQJDRG... βœ… Market 'stress2' created: 8khjM6ua... βœ… Created 3 markets βœ… Placed 9 bets βœ” Should handle multiple concurrent markets (4618ms) 🌐 Section 4: Live BTC Price Market

🌐 Fetching live BTC price from Pyth Network... Raw price: 11882901963831, exponent: -8, final: $118829.02 βœ… Live BTC Price: $118829.02 Confidence: Β±$34.50 βœ” Should fetch real BTC price from Pyth Network (1057ms) βœ… Market 'liveBtcMarket' created: 3ZbTzbck... πŸ“ˆ Market created at price: $118829.01 βœ” Should create market with live BTC price (309ms)

🎲 Placing strategic bets: alice: $50 on YES - Momentum trader - expects continuation bob: $75 on NO - Mean reversion - expects stability charlie: $25 on YES - Following Alice

πŸ“Š Market Sentiment: YES (price will move): 50.0% NO (price stays same): 50.0% βœ” Should place bets based on market sentiment (1378ms)

⏱️ Monitoring BTC price for 20 seconds... πŸ“ Starting price: $118829.02 Raw price: 11883066624765, exponent: -8, final: $118830.67 [5s] $118830.67 (+1.65 | +0.001%) Raw price: 11883010157971, exponent: -8, final: $118830.10 [10s] $118830.10 (+1.08 | +0.001%) Raw price: 11883036702392, exponent: -8, final: $118830.37 [15s] $118830.37 (+1.35 | +0.001%) Raw price: 11883042034601, exponent: -8, final: $118830.42

πŸ“ Final price: $118830.42 πŸ“ˆ Total change: +$1.40 βœ… Market 'liveBtcMarket' resolved. Winner: UNKNOWN πŸ† Winner: YES (price moved) βœ” Should monitor price and resolve with actual movement (22988ms)

πŸ’° Processing payouts based on price movement: alice: +$99.00 βœ… charlie: +$49.50 βœ… bob: Correctly rejected claim ❌

πŸ“Š Summary: Price moved β†’ YES wins Total payouts: $148.50 βœ” Should distribute winnings based on actual price movement (1391ms)

============================================================ πŸ“Š TEST SUITE FINAL REPORT

πŸ“ˆ Test Results: Total Tests: 15 Passed: 15 (100.0%) Failed: 0

πŸ’° Token Conservation: Initial Supply: 3500.00 tokens User Balances: 2922.18 tokens

βœ… EXCELLENT: All critical tests passed!