diff --git a/test/concrete/flow1155/FlowSignedContextTest.sol b/test/concrete/flow1155/FlowSignedContextTest.sol index d2969b06..9e68f9a4 100644 --- a/test/concrete/flow1155/FlowSignedContextTest.sol +++ b/test/concrete/flow1155/FlowSignedContextTest.sol @@ -63,56 +63,4 @@ contract FlowSignedContextTest is SignContextAbstractTest, FlowUtilsAbstractTest vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, 0)); erc1155Flow.flow(evaluable, new uint256[](0), signedContexts1); } - - /// Should validate a signed context - function testValidateSignedContexts( - string memory uri, - uint256[] memory context0, - uint256[] memory context1, - uint256[] memory callerContext, - uint256[] memory writes, - uint256 fuzzedKeyAlice, - uint256 fuzzedKeyBob - ) public { - vm.assume(callerContext.length <= type(uint256).max); - vm.assume(writes.length <= type(uint256).max); - - vm.assume(fuzzedKeyBob != fuzzedKeyAlice); - (IFlowERC1155V5 erc1155Flow, EvaluableV2 memory evaluable) = deployIFlowERC1155V5(uri); - - // Ensure the fuzzed key is within the valid range for secp256k1 - uint256 aliceKey = (fuzzedKeyAlice % (SECP256K1_ORDER - 1)) + 1; - uint256 bobKey = (fuzzedKeyBob % (SECP256K1_ORDER - 1)) + 1; - - SignedContextV1[] memory signedContexts = new SignedContextV1[](2); - signedContexts[0] = signContext(aliceKey, context0); - signedContexts[1] = signContext(aliceKey, context1); - - uint256[] memory stack = generateFlowERC1155Stack( - new ERC1155Transfer[](0), - new ERC721Transfer[](0), - new ERC20Transfer[](0), - new ERC1155SupplyChange[](0), - new ERC1155SupplyChange[](0) - ); - interpreterEval2MockCall(stack, writes); - erc1155Flow.flow(evaluable, callerContext, signedContexts); - - // With bad signature in second signed context - SignedContextV1[] memory signedContexts1 = new SignedContextV1[](2); - signedContexts[0] = signContext(aliceKey, context0); - signedContexts[1] = signContext(bobKey, context1); - - uint256[] memory stack1 = generateFlowERC1155Stack( - new ERC1155Transfer[](0), - new ERC721Transfer[](0), - new ERC20Transfer[](0), - new ERC1155SupplyChange[](0), - new ERC1155SupplyChange[](0) - ); - interpreterEval2MockCall(stack1, writes); - - vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, 0)); - erc1155Flow.flow(evaluable, callerContext, signedContexts1); - } }