Skip to content
Merged
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
12 changes: 10 additions & 2 deletions test/src/concrete/Flow.signedContext.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ contract FlowSignedContextTest is FlowTest {
uint256 fuzzedKeyAlice,
uint256 fuzzedKeyBob
) public {
vm.assume(fuzzedKeyBob != fuzzedKeyAlice);
(IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow();

uint256 aliceKey = boundPrivateKey(fuzzedKeyAlice);
uint256 bobKey = boundPrivateKey(fuzzedKeyBob);
// `boundPrivateKey` is not injective over the full uint256 domain, so
// distinct fuzz inputs can fold onto the same key. The bad-signature
// assertion below only holds when the two keys actually differ, so
// constrain the bounded keys (not the raw inputs).
vm.assume(aliceKey != bobKey);

SignedContextV1[] memory signedContexts = new SignedContextV1[](2);

Expand Down Expand Up @@ -55,11 +59,15 @@ contract FlowSignedContextTest is FlowTest {
uint256 fuzzedKeyAlice,
uint256 fuzzedKeyBob
) public {
vm.assume(fuzzedKeyBob != fuzzedKeyAlice);
(IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow();

uint256 aliceKey = boundPrivateKey(fuzzedKeyAlice);
uint256 bobKey = boundPrivateKey(fuzzedKeyBob);
// `boundPrivateKey` is not injective over the full uint256 domain, so
// distinct fuzz inputs can fold onto the same key. The bad-signature
// assertion below only holds when the two keys actually differ, so
// constrain the bounded keys (not the raw inputs).
vm.assume(aliceKey != bobKey);

SignedContextV1[] memory signedContext = new SignedContextV1[](1);
signedContext[0] = vm.signContext(aliceKey, aliceKey, context0);
Expand Down
Loading