Skip to content

Commit

Permalink
avoid assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Jul 22, 2024
1 parent d0fdca7 commit 89e9504
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions contracts/abstraction/identity/IdentityP256.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ contract IdentityP256Implementation is IERC1271 {
function isValidSignature(bytes32 h, bytes calldata signature) external view returns (bytes4 magicValue) {
// parse signature
if (signature.length < 0x40) return bytes4(0);
bytes32 r;
bytes32 s;
assembly ("memory-safe") {
r := calldataload(add(signature.offset, 0x00))
s := calldataload(add(signature.offset, 0x20))
}
bytes32 r = bytes32(signature[0x00:0x20]);
bytes32 s = bytes32(signature[0x20:0x40]);

// fetch and decode immutable public key for the clone
(bytes32 qx, bytes32 qy) = abi.decode(publicKey(), (bytes32, bytes32));
Expand Down

0 comments on commit 89e9504

Please sign in to comment.