-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from zkemail/generic-validator-module
Add generic validator recovery module and update zk email contracts to use it
- Loading branch information
Showing
57 changed files
with
3,648 additions
and
3,914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.25; | ||
|
||
import { EmailRecoveryManager } from "./EmailRecoveryManager.sol"; | ||
import { EmailRecoveryModule } from "./modules/EmailRecoveryModule.sol"; | ||
import { EmailRecoverySubjectHandler } from "./handlers/EmailRecoverySubjectHandler.sol"; | ||
|
||
contract EmailRecoveryFactory { | ||
function deployModuleAndManager( | ||
address verifier, | ||
address dkimRegistry, | ||
address emailAuthImpl, | ||
address emailRecoveryHandler | ||
) | ||
external | ||
returns (address, address) | ||
{ | ||
EmailRecoveryManager emailRecoveryManager = | ||
new EmailRecoveryManager(verifier, dkimRegistry, emailAuthImpl, emailRecoveryHandler); | ||
address manager = address(emailRecoveryManager); | ||
|
||
EmailRecoveryModule emailRecoveryModule = new EmailRecoveryModule(manager); | ||
address module = address(emailRecoveryModule); | ||
|
||
emailRecoveryManager.initialize(module); | ||
|
||
return (manager, module); | ||
} | ||
} |
Oops, something went wrong.