Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
leekt committed May 7, 2024
1 parent d59b4cb commit 2ee49e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/signer/MultiChainSigner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ struct ECDSAValidatorStorage {
address owner;
}

bytes constant DUMMY_ECDSA_SIG = hex"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";
bytes constant DUMMY_ECDSA_SIG =
hex"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";

contract MultiChainSigner is SignerBase {
mapping(address => uint256) public usedIds;
Expand Down Expand Up @@ -76,7 +77,7 @@ contract MultiChainSigner is SignerBase {
if (keccak256(ecdsaSig) == keccak256(DUMMY_ECDSA_SIG)) {
(bytes32 dummyUserOpHash, bytes32[] memory proof) = abi.decode(sig[97:], (bytes32, bytes32[]));
require(MerkleProofLib.verify(proof, merkleRoot, dummyUserOpHash), "hash is not in proof");
// otherwise, use real userOpHash
// otherwise, use real userOpHash
} else {
bytes32[] memory proof = abi.decode(sig[97:], (bytes32[]));
require(MerkleProofLib.verify(proof, merkleRoot, userOpHash), "hash is not in proof");
Expand Down
5 changes: 3 additions & 2 deletions src/validator/MultiChainValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ struct ECDSAValidatorStorage {
address owner;
}

bytes constant DUMMY_ECDSA_SIG = hex"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";
bytes constant DUMMY_ECDSA_SIG =
hex"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";

contract MultiChainValidator is IValidator, IHook {
event OwnerRegistered(address indexed kernel, address indexed owner);
Expand Down Expand Up @@ -75,7 +76,7 @@ contract MultiChainValidator is IValidator, IHook {
if (keccak256(ecdsaSig) == keccak256(DUMMY_ECDSA_SIG)) {
(bytes32 dummyUserOpHash, bytes32[] memory proof) = abi.decode(sig[97:], (bytes32, bytes32[]));
require(MerkleProofLib.verify(proof, merkleRoot, dummyUserOpHash), "hash is not in proof");
// otherwise, use real userOpHash
// otherwise, use real userOpHash
} else {
bytes32[] memory proof = abi.decode(sig[97:], (bytes32[]));
require(MerkleProofLib.verify(proof, merkleRoot, userOpHash), "hash is not in proof");
Expand Down

0 comments on commit 2ee49e4

Please sign in to comment.