diff --git a/test/foundry/unit/concrete/erc1271/TestERC1271Account_IsValidSignature.t.sol b/test/foundry/unit/concrete/erc1271/TestERC1271Account_IsValidSignature.t.sol index e7142002..5eeddf77 100644 --- a/test/foundry/unit/concrete/erc1271/TestERC1271Account_IsValidSignature.t.sol +++ b/test/foundry/unit/concrete/erc1271/TestERC1271Account_IsValidSignature.t.sol @@ -49,12 +49,6 @@ contract TestERC1271Account_IsValidSignature is NexusTest_Base { (t.v, t.r, t.s) = vm.sign(ALICE.privateKey, hashToSign); bytes memory signature = abi.encodePacked(t.r, t.s, t.v); assertEq(ALICE_ACCOUNT.isValidSignature(t.contents, abi.encodePacked(address(validator), signature)), bytes4(0x1626ba7e)); - - unchecked { - uint256 vs = uint256(t.s) | (uint256(t.v - 27) << 255); - signature = abi.encodePacked(t.r, vs); - assertEq(ALICE_ACCOUNT.isValidSignature(t.contents, abi.encodePacked(address(validator), signature)), bytes4(0xffffffff)); - } } /// @notice Tests the validation of an EIP-712 signature using the mock validator. @@ -68,15 +62,6 @@ contract TestERC1271Account_IsValidSignature is NexusTest_Base { if (random() % 4 == 0) signature = erc6492Wrap(signature); bytes4 ret = ALICE_ACCOUNT.isValidSignature(toContentsHash(t.contents), abi.encodePacked(address(validator), signature)); assertEq(ret, bytes4(0x1626ba7e)); - - unchecked { - uint256 vs = uint256(t.s) | (uint256(t.v - 27) << 255); - signature = abi.encodePacked(t.r, vs, APP_DOMAIN_SEPARATOR, t.contents, contentsType, uint16(contentsType.length)); - assertEq( - ALICE_ACCOUNT.isValidSignature(toContentsHash(t.contents), abi.encodePacked(address(validator), signature)), - bytes4(0xffffffff) - ); - } } /// @notice Tests the failure of an EIP-712 signature validation due to a wrong signer. @@ -171,7 +156,7 @@ contract TestERC1271Account_IsValidSignature is NexusTest_Base { /// @return The ERC-1271 hash for personal sign. function toERC1271HashPersonalSign(bytes32 childHash, address account) internal view returns (bytes32) { AccountDomainStruct memory t; - (/*t.fields*/, t.name, t.version, t.chainId, t.verifyingContract, t.salt, /*t.extensions*/) = EIP712(account).eip712Domain(); + (/*t.fields*/, t.name, t.version, t.chainId, t.verifyingContract, t.salt, /*t.extensions*/) = EIP712(account).eip712Domain(); bytes32 domainSeparator = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), diff --git a/test/foundry/unit/concrete/modules/TestK1Validator.t.sol b/test/foundry/unit/concrete/modules/TestK1Validator.t.sol index 5763148d..47e5dad6 100644 --- a/test/foundry/unit/concrete/modules/TestK1Validator.t.sol +++ b/test/foundry/unit/concrete/modules/TestK1Validator.t.sol @@ -187,7 +187,7 @@ contract TestK1Validator is NexusTest_Base { function test_Version() public { string memory contractVersion = validator.version(); - assertEq(contractVersion, "1.0.0", "Contract version should be '1.0.0'"); + assertEq(contractVersion, "1.0.1", "Contract version should be '1.0.1'"); } /// @notice Tests the isModuleType function to return the correct module type @@ -383,7 +383,7 @@ contract TestK1Validator is NexusTest_Base { abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256("Nexus"), - keccak256("1.0.0"), + keccak256("1.0.1"), block.chainid, address(BOB_ACCOUNT) ) diff --git a/test/hardhat/smart-account/Nexus.Module.K1Validator.specs.ts b/test/hardhat/smart-account/Nexus.Module.K1Validator.specs.ts index 993238e2..68b4d7fc 100644 --- a/test/hardhat/smart-account/Nexus.Module.K1Validator.specs.ts +++ b/test/hardhat/smart-account/Nexus.Module.K1Validator.specs.ts @@ -79,7 +79,7 @@ describe("K1Validator module tests", () => { it("should get module version", async () => { const version = await k1Validator.version(); - expect(version).to.equal("1.0.0"); + expect(version).to.equal("1.0.1"); }); it("should check module type", async () => {