Skip to content

Commit 55728f9

Browse files
committed
chore: removed unnecessary invariant tests
1 parent 9f3af18 commit 55728f9

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

test/PolyswapTest.t.sol

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -516,45 +516,4 @@ contract PolyswapTest is Test {
516516
appData: bytes32(0x053e648e24f8653eb9cffe71f170227d25f8fd69c135bcf2125ae24f4d210b9b)
517517
});
518518
}
519-
520-
// // ===== INVARIANT TESTS =====
521-
522-
// /**
523-
// * @dev Invariant: Valid orders should always produce valid GPv2Orders
524-
// */
525-
// function invariantValidOrderProducesValidGPv2Order() public {
526-
// mockPolymarket.setOrderStatus(TEST_ORDER_HASH, false, 100);
527-
528-
// PolyswapOrder.Data memory order = _createTestOrder();
529-
// GPv2Order.Data memory gpv2Order = PolyswapOrder.orderFor(order, Trading(address(mockPolymarket)));
530-
531-
// // Invariant checks
532-
// assertTrue(address(gpv2Order.sellToken) != address(0), "Sell token should not be zero");
533-
// assertTrue(address(gpv2Order.buyToken) != address(0), "Buy token should not be zero");
534-
// assertTrue(gpv2Order.sellAmount > 0, "Sell amount should be positive");
535-
// assertTrue(gpv2Order.buyAmount > 0, "Buy amount should be positive");
536-
// assertTrue(gpv2Order.validTo > block.timestamp, "Order should not be expired");
537-
// assertEq(gpv2Order.kind, GPv2Order.KIND_SELL, "Should be sell order");
538-
// assertFalse(gpv2Order.partiallyFillable, "Should not be partially fillable");
539-
// }
540-
541-
// /**
542-
// * @dev Invariant: Fulfilled Polymarket orders should always allow order execution
543-
// */
544-
// function invariantFulfilledPolymarketOrderAllowsExecution() public {
545-
// // Setup fulfilled Polymarket order
546-
// mockPolymarket.setOrderStatus(TEST_ORDER_HASH, true, 0);
547-
548-
// PolyswapOrder.Data memory order = _createTestOrder();
549-
550-
// // Should not revert
551-
// GPv2Order.Data memory gpv2Order =
552-
// polyswap.getTradeableOrder(address(testSafe), address(this), bytes32(0), abi.encode(order), bytes(""));
553-
554-
// // Invariant: returned order should match input parameters
555-
// assertEq(address(gpv2Order.sellToken), address(order.sellToken));
556-
// assertEq(address(gpv2Order.buyToken), address(order.buyToken));
557-
// assertEq(gpv2Order.sellAmount, order.sellAmount);
558-
// assertEq(gpv2Order.buyAmount, order.minBuyAmount);
559-
// }
560519
}

0 commit comments

Comments
 (0)