diff --git a/src/ERC6538Registry.sol b/src/ERC6538Registry.sol index fc0a8b1..8a0ac53 100644 --- a/src/ERC6538Registry.sol +++ b/src/ERC6538Registry.sol @@ -85,7 +85,10 @@ contract ERC6538Registry { DOMAIN_SEPARATOR(), keccak256( abi.encode( - ERC6538REGISTRY_ENTRY_TYPE_HASH, schemeId, stealthMetaAddress, nonceOf[registrant]++ + ERC6538REGISTRY_ENTRY_TYPE_HASH, + schemeId, + keccak256(stealthMetaAddress), + nonceOf[registrant]++ ) ) ) diff --git a/test/ERC6538Registry.t.sol b/test/ERC6538Registry.t.sol index 81abcc3..6ee507c 100644 --- a/test/ERC6538Registry.t.sol +++ b/test/ERC6538Registry.t.sol @@ -43,7 +43,12 @@ contract ERC6538RegistryTest is Test, Deploy { uint256 _nonce ) public view returns (bytes memory _signature) { bytes32 _dataHash = keccak256( - abi.encode(registry.ERC6538REGISTRY_ENTRY_TYPE_HASH(), _schemeId, _stealthMetaAddress, _nonce) + abi.encode( + registry.ERC6538REGISTRY_ENTRY_TYPE_HASH(), + _schemeId, + keccak256(_stealthMetaAddress), + _nonce + ) ); bytes32 _hash = keccak256(abi.encodePacked("\x19\x01", registry.DOMAIN_SEPARATOR(), _dataHash)); (uint8 v, bytes32 r, bytes32 s) = vm.sign(_registrantPrivateKey, _hash);