Skip to content

Commit

Permalink
Correct the registry domain separator and refactor test suite (#7)
Browse files Browse the repository at this point in the history
* Test internal variable initialization in registry constructor tests
* Improvements to domain separator test
* Improvements to the RegisteryKeys tests
* Naming improvements to registerKeysOnBehalf tests
* Update test imports and remove duplicated import
* Refactor signature test helpers for test simplicity
* Simplify mock contract for ERC1271 signatures
* Remove redundant test and add missing ones for register on behalf
* Minor cleanup to increment nonce test
* Update the EIP712Domain separator to match the spec
* Simplify Announcer test names
* Use `vm.expectRevert("")` instead of `vm.expectRevert()`
  • Loading branch information
apbendi authored Feb 5, 2024
1 parent 7e34641 commit 471d3be
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 341 deletions.
2 changes: 1 addition & 1 deletion src/ERC6538Registry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ contract ERC6538Registry {
return keccak256(
abi.encode(
keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address registryContract)"
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
),
keccak256("ERC6538Registry"),
keccak256("1.0"),
Expand Down
4 changes: 2 additions & 2 deletions test/ERC5564Announcer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract ERC5564AnnouncerTest is Test, Deploy {
}

contract Announce is ERC5564AnnouncerTest {
function testFuzz_EmitsAnnouncementEventForAnyCaller(
function testFuzz_EmitsAnnouncementEvent(
uint256 schemeId,
address stealthAddress,
address caller,
Expand All @@ -38,7 +38,7 @@ contract Announce is ERC5564AnnouncerTest {
/// forge-config: default.fuzz.runs = 1
/// forge-config: ci.fuzz.runs = 1
/// forge-config: lite.fuzz.runs = 1
function testFuzz_AlwaysSucceedsForAnyCallerThatCallsTheAnnounceFunction(
function testFuzz_AlwaysSucceeds(
uint256 schemeId,
address stealthAddress,
address caller,
Expand Down
Loading

0 comments on commit 471d3be

Please sign in to comment.