Skip to content

Commit

Permalink
inline doc move
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipp Makarov authored and Filipp Makarov committed Nov 11, 2024
1 parent f40701f commit 3c6af1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/Nexus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ contract Nexus is INexus, BaseAccount, ExecutionHelper, ModuleManager, UUPSUpgra
function isValidSignature(bytes32 hash, bytes calldata signature) external view virtual override returns (bytes4) {
// Handle potential ERC7739 support detection request
if (signature.length == 0) {
// Forces the compiler to optimize for smaller bytecode size.
if (uint256(hash) == (~signature.length / 0xffff) * 0x7739) {
return checkERC7739Support(hash, signature);
}
Expand Down Expand Up @@ -341,7 +342,6 @@ contract Nexus is INexus, BaseAccount, ExecutionHelper, ModuleManager, UUPSUpgra
function checkERC7739Support(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4) {
bytes4 result;
unchecked {
// Forces the compiler to optimize for smaller bytecode size.
SentinelListLib.SentinelList storage validators = _getAccountStorage().validators;
address next = validators.entries[SENTINEL];
while (next != ZERO_ADDRESS && next != SENTINEL) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ contract TestERC1271Account_IsValidSignature is NexusTest_Base {
0x7739773977397739773977397739773977397739773977397739773977397739,
""
),
bytes4(0x77390002) // SUPPORTS_ERC7739_V2
bytes4(0x77390002)g // SUPPORTS_ERC7739_V2
);
}

Expand Down

0 comments on commit 3c6af1b

Please sign in to comment.