Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions zylith/src/zylith.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ pub mod Zylith {
let actual_new_sqrt_price = self.pool.sqrt_price_x128.read();
let actual_new_tick = self.pool.tick.read();

// for testing after all thing good then remove
println!("amount :{} expected amount0 : {}", amount0, expected_amount0_delta);
println!("amount :{} expected amount1 : {}", amount1, expected_amount1_delta);
println!(
"amount :{} expected amount1 : {}", actual_new_sqrt_price, expected_new_sqrt_price,
);
Comment on lines +251 to +256
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Remove debugging output before merging to main.

These println! statements are temporary debugging hooks that should not be merged to the main branch. Additionally, line 255 has an incorrect label—it says "amount1" but prints actual_new_sqrt_price and expected_new_sqrt_price.

🔎 Proposed fix
-        //  for testing   after all thing good then remove
-        println!("amount :{} expected amount0 : {}", amount0, expected_amount0_delta);
-        println!("amount :{} expected amount1 : {}", amount1, expected_amount1_delta);
-        println!(
-            "amount :{} expected amount1 : {}", actual_new_sqrt_price, expected_new_sqrt_price,
-        );
-
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// for testing after all thing good then remove
println!("amount :{} expected amount0 : {}", amount0, expected_amount0_delta);
println!("amount :{} expected amount1 : {}", amount1, expected_amount1_delta);
println!(
"amount :{} expected amount1 : {}", actual_new_sqrt_price, expected_new_sqrt_price,
);
🤖 Prompt for AI Agents
In zylith/src/zylith.cairo around lines 251 to 256, remove the temporary
println! debugging statements; specifically delete the three println! lines and
ensure no stray debug output remains, and if logging is required later replace
with a proper debug log call — also correct the mislabeled third print (it
currently says "amount1" but prints
actual_new_sqrt_price/expected_new_sqrt_price) by removing it or fixing the
label if you choose to keep a formatted log.


// Compare deltas - the proof's expected values must match actual execution
assert(amount0 == expected_amount0_delta, 'AMOUNT0_DELTA_MISMATCH');
assert(amount1 == expected_amount1_delta, 'AMOUNT1_DELTA_MISMATCH');
Expand Down
Loading