-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
531a49a
commit 6aac792
Showing
56 changed files
with
1,612 additions
and
2,182 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 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,53 @@ | ||
// 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); | ||
EmailRecoveryModule emailRecoveryModule = | ||
new EmailRecoveryModule(address(emailRecoveryManager)); | ||
|
||
return (address(emailRecoveryManager), address(emailRecoveryModule)); | ||
} | ||
|
||
function deployHandler(address emailRecoveryManager) external returns (address) { | ||
EmailRecoverySubjectHandler emailRecoveryHandler = new EmailRecoverySubjectHandler(); | ||
|
||
return (address(emailRecoveryHandler)); | ||
} | ||
|
||
function deployAll( | ||
address verifier, | ||
address dkimRegistry, | ||
address emailAuthImpl | ||
) | ||
external | ||
returns (address, address, address) | ||
{ | ||
EmailRecoverySubjectHandler emailRecoveryHandler = new EmailRecoverySubjectHandler(); | ||
EmailRecoveryManager emailRecoveryManager = new EmailRecoveryManager( | ||
verifier, dkimRegistry, emailAuthImpl, address(emailRecoveryHandler) | ||
); | ||
EmailRecoveryModule emailRecoveryModule = | ||
new EmailRecoveryModule(address(emailRecoveryManager)); | ||
|
||
return ( | ||
address(emailRecoveryManager), | ||
address(emailRecoveryModule), | ||
address(emailRecoveryHandler) | ||
); | ||
} | ||
} |
Oops, something went wrong.