diff --git a/test/Attestation.t.sol b/test/Attestation.t.sol index 24503e6..449b700 100644 --- a/test/Attestation.t.sol +++ b/test/Attestation.t.sol @@ -23,11 +23,11 @@ contract AttestationTest is BaseTest { for (uint256 i; i < types.length; i++) { typesEnc[i] = ModuleType.wrap(types[i]); } - request = AttestationRequest({ moduleAddr: module, expirationTime: expirationTime, data: data, moduleTypes: typesEnc }); + request = AttestationRequest({ moduleAddress: module, expirationTime: expirationTime, data: data, moduleTypes: typesEnc }); } function mockRevocation(address module) internal pure returns (RevocationRequest memory request) { - request = RevocationRequest({ moduleAddr: module }); + request = RevocationRequest({ moduleAddress: module }); } function test_WhenAttestingWithNoAttestationData() public prankWithAccount(attester1) { @@ -41,7 +41,7 @@ contract AttestationTest is BaseTest { assertEq(record.time, block.timestamp); assertEq(record.expirationTime, request.expirationTime); - assertEq(record.moduleAddr, request.moduleAddr); + assertEq(record.moduleAddress, request.moduleAddress); assertEq(record.attester, attester1.addr); } @@ -59,7 +59,7 @@ contract AttestationTest is BaseTest { assertEq(record.time, block.timestamp); assertEq(record.expirationTime, requests[0].expirationTime); - assertEq(record.moduleAddr, requests[0].moduleAddr); + assertEq(record.moduleAddress, requests[0].moduleAddress); assertEq(record.attester, attester1.addr); } @@ -143,12 +143,12 @@ contract AttestationTest is BaseTest { assertEq(record[0].time, block.timestamp); assertEq(record[0].expirationTime, requests[0].expirationTime); - assertEq(record[0].moduleAddr, requests[0].moduleAddr); + assertEq(record[0].moduleAddress, requests[0].moduleAddress); assertEq(record[0].attester, attester1.addr); assertEq(record[1].time, block.timestamp); assertEq(record[1].expirationTime, requests[0].expirationTime); - assertEq(record[1].moduleAddr, requests[0].moduleAddr); + assertEq(record[1].moduleAddress, requests[0].moduleAddress); assertEq(record[1].attester, attester2.addr); } @@ -164,10 +164,10 @@ contract AttestationTest is BaseTest { assertEq(record.time, block.timestamp); assertEq(record.expirationTime, request.expirationTime); assertEq(record.revocationTime, 0); - assertEq(record.moduleAddr, request.moduleAddr); + assertEq(record.moduleAddress, request.moduleAddress); assertEq(record.attester, attester1.addr); - RevocationRequest memory revocation = RevocationRequest({ moduleAddr: module }); + RevocationRequest memory revocation = RevocationRequest({ moduleAddress: module }); vm.warp(block.timestamp + 100); registry.revoke(revocation); @@ -183,7 +183,7 @@ contract AttestationTest is BaseTest { assertEq(record.expirationTime, request.expirationTime); // ensure revocation time is reset assertEq(record.revocationTime, 0); - assertEq(record.moduleAddr, request.moduleAddr); + assertEq(record.moduleAddress, request.moduleAddress); assertEq(record.attester, attester1.addr); } @@ -303,7 +303,7 @@ contract AttestationTest is BaseTest { assertEq(record.time, block.timestamp); assertEq(record.expirationTime, request.expirationTime); - assertEq(record.moduleAddr, request.moduleAddr); + assertEq(record.moduleAddress, request.moduleAddress); assertEq(record.attester, attester.addr); assertEq(nonceAfter, nonceBefore + 1); assertEq(PackedModuleTypes.unwrap(record.moduleTypes), 2 ** 1 + 2 ** 2); @@ -347,7 +347,7 @@ contract AttestationTest is BaseTest { assertEq(record.time, block.timestamp); assertEq(record.expirationTime, requests[0].expirationTime); - assertEq(record.moduleAddr, requests[0].moduleAddr); + assertEq(record.moduleAddress, requests[0].moduleAddress); assertEq(record.attester, attester1.addr); assertEq(nonceAfter, nonceBefore + 1); } @@ -389,7 +389,7 @@ contract AttestationTest is BaseTest { assertEq(record.time, block.timestamp); assertEq(record.expirationTime, request.expirationTime); - assertEq(record.moduleAddr, request.moduleAddr); + assertEq(record.moduleAddress, request.moduleAddress); assertEq(record.attester, address(erc1271AttesterTrue)); } @@ -406,7 +406,7 @@ contract AttestationTest is BaseTest { assertEq(record.time, block.timestamp); assertEq(record.expirationTime, requests[0].expirationTime); - assertEq(record.moduleAddr, requests[0].moduleAddr); + assertEq(record.moduleAddress, requests[0].moduleAddress); assertEq(record.attester, address(erc1271AttesterTrue)); } diff --git a/test/Base.t.sol b/test/Base.t.sol index 4f0701c..f0652c1 100644 --- a/test/Base.t.sol +++ b/test/Base.t.sol @@ -101,7 +101,7 @@ contract BaseTest is Test { registry.registerModule(differentResolverUID, address(module3), "", ""); AttestationRequest memory req = AttestationRequest({ - moduleAddr: address(module1), + moduleAddress: address(module1), expirationTime: uint48(block.timestamp + 100_000), data: "0x", moduleTypes: new ModuleType[](0) diff --git a/test/Factory.t.sol b/test/Factory.t.sol index 66248b8..7dad39a 100644 --- a/test/Factory.t.sol +++ b/test/Factory.t.sol @@ -23,10 +23,10 @@ contract FactoryTest is BaseTest { bytes32 salt = 0x05a40beaf368eb6b2bc5665901a885c044c19346fc828ba80a35fe4cc30d0000; vm.startPrank(address(0x05a40beAF368EB6b2bc5665901a885C044C19346)); - address moduleAddr = registry.calcModuleAddress(salt, type(MockModuleFoo).creationCode); + address moduleAddress = registry.calcModuleAddress(salt, type(MockModuleFoo).creationCode); address deployedAddr = registry.deployModule(salt, defaultResolverUID, type(MockModuleFoo).creationCode, "", ""); vm.stopPrank(); - assertTrue(moduleAddr == deployedAddr); + assertTrue(moduleAddress == deployedAddr); } } diff --git a/test/ModuleRegistration.t.sol b/test/ModuleRegistration.t.sol index 89f61d2..b7f4deb 100644 --- a/test/ModuleRegistration.t.sol +++ b/test/ModuleRegistration.t.sol @@ -22,8 +22,8 @@ contract ModuleRegistrationTest is BaseTest { bytes memory bytecode = type(MockModule).creationCode; - address moduleAddr = registry.deployModule(salt, defaultResolverUID, bytecode, "", ""); - ModuleRecord memory record = registry.findModule(moduleAddr); + address moduleAddress = registry.deployModule(salt, defaultResolverUID, bytecode, "", ""); + ModuleRecord memory record = registry.findModule(moduleAddress); assertTrue(record.resolverUID == defaultResolverUID); } @@ -33,10 +33,10 @@ contract ModuleRegistrationTest is BaseTest { bytes memory bytecode = type(MockModuleWithArgs).creationCode; bytes memory initCode = abi.encodePacked(bytecode, abi.encode(313_131)); - address moduleAddr = registry.deployModule(salt, defaultResolverUID, initCode, "", ""); + address moduleAddress = registry.deployModule(salt, defaultResolverUID, initCode, "", ""); address moduleAddrCalc = registry.calcModuleAddress(salt, initCode); - assertTrue(moduleAddr == moduleAddrCalc); + assertTrue(moduleAddress == moduleAddrCalc); } function test_WhenRegisteringAModuleOnAnInvalidResolverUID() external prankWithAccount(moduleDev1) { diff --git a/test/invariance/Handler.t.sol b/test/invariance/Handler.t.sol index bba1994..2959e22 100644 --- a/test/invariance/Handler.t.sol +++ b/test/invariance/Handler.t.sol @@ -62,11 +62,18 @@ contract Handler is CommonBase, StdCheats, StdUtils { SchemaRecord memory record = REGISTRY.findSchema(uid); } - function handle_registerModule(uint256 randomResolverNr, address moduleAddr, bytes calldata bytecode, bytes calldata metadata) public { - vm.etch(moduleAddr, bytecode); + function handle_registerModule( + uint256 randomResolverNr, + address moduleAddress, + bytes calldata bytecode, + bytes calldata metadata + ) + public + { + vm.etch(moduleAddress, bytecode); ResolverUID uid = _pickRandomResolverUID(randomResolverNr); - REGISTRY.registerModule(uid, moduleAddr, metadata, ""); + REGISTRY.registerModule(uid, moduleAddress, metadata, ""); } function _pickTypes() private pure returns (ModuleType[] memory ret) { @@ -88,7 +95,7 @@ contract Handler is CommonBase, StdCheats, StdUtils { bound(request.expirationTime, block.timestamp + 1, type(uint48).max); request.moduleTypes = _pickTypes(); - handle_registerModule(randResolve, request.moduleAddr, bytecode, metadata); + handle_registerModule(randResolve, request.moduleAddress, bytecode, metadata); SchemaUID uid = _pickRandomSchemaUID(randomSchemaUID); REGISTRY.attest(uid, request); @@ -106,7 +113,7 @@ contract Handler is CommonBase, StdCheats, StdUtils { // for (uint256 i = 0; i < requests.length; i++) { // bound(requests[i].expirationTime, block.timestamp + 1, type(uint48).max); // requests[i].moduleTypes = _pickTypes(); - // handle_registerModule(randResolve, requests[i].moduleAddr, bytecode, metadata); + // handle_registerModule(randResolve, requests[i].moduleAddress, bytecode, metadata); // } // SchemaUID uid = _pickRandomSchemaUID(randomSchemaUID); diff --git a/test/invariance/invariant_ImmutableData.t.sol b/test/invariance/invariant_ImmutableData.t.sol index 345c021..b1aa50c 100644 --- a/test/invariance/invariant_ImmutableData.t.sol +++ b/test/invariance/invariant_ImmutableData.t.sol @@ -37,7 +37,7 @@ contract ImmutableData is BaseTest { function invariant_attestation_immutable() public { AttestationRecord memory record = registry.findAttestation(address(module1), invarAttester.addr); assertTrue(record.dataPointer == defaultDataRef); - assertEq(record.moduleAddr, address(module1)); + assertEq(record.moduleAddress, address(module1)); assertEq(record.attester, invarAttester.addr); assertTrue(record.attester != address(0)); }