From ad8d47995860d9826630326e8c357d5b4f8c9c01 Mon Sep 17 00:00:00 2001 From: parodime Date: Mon, 4 Nov 2024 09:45:06 -0500 Subject: [PATCH] added target != addr 0 assumptions --- packages/contracts-rfq/test/libs/ZapDataV1.t.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/contracts-rfq/test/libs/ZapDataV1.t.sol b/packages/contracts-rfq/test/libs/ZapDataV1.t.sol index 209b8bf58b..31bcee2149 100644 --- a/packages/contracts-rfq/test/libs/ZapDataV1.t.sol +++ b/packages/contracts-rfq/test/libs/ZapDataV1.t.sol @@ -38,6 +38,7 @@ contract ZapDataV1Test is Test { view { vm.assume(prefix.length + 32 + postfix.length < type(uint16).max); + vm.assume(target != address(0)); // We don't know the amount at the time of encoding, so we provide a placeholder. uint16 amountPosition = uint16(prefix.length); @@ -57,6 +58,7 @@ contract ZapDataV1Test is Test { function test_roundtrip_noAmount(address target, uint256 amount, bytes memory payload) public view { vm.assume(payload.length < type(uint16).max); + vm.assume(target != address(0)); uint16 amountPosition = type(uint16).max; bytes memory zapData = harness.encodeV1(amountPosition, target, payload);