Skip to content

Commit

Permalink
added target != addr 0 assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
parodime committed Nov 4, 2024
1 parent cbc4fbd commit ad8d479
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/contracts-rfq/test/libs/ZapDataV1.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit ad8d479

Please sign in to comment.