-
Notifications
You must be signed in to change notification settings - Fork 10
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
Showing
19 changed files
with
2,513 additions
and
2,544 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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,46 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity =0.8.19; | ||
|
||
import {IBaseOpenfortFactory} from "../../interfaces/IBaseOpenfortFactory.sol"; | ||
|
||
/** | ||
* @title BaseOpenfortFactory (Non-upgradeable) | ||
* @notice Contract to create an on-chain factory to deploy new OpenfortAccounts. | ||
* It inherits from: | ||
* - IBaseOpenfortFactory | ||
*/ | ||
abstract contract BaseOpenfortFactory is IBaseOpenfortFactory { | ||
address public entrypointContract; | ||
address public accountImplementation; | ||
uint256 public recoveryPeriod; | ||
uint256 public securityPeriod; | ||
uint256 public securityWindow; | ||
uint256 public lockPeriod; | ||
address public openfortGuardian; | ||
|
||
error InsecurePeriod(); | ||
|
||
constructor( | ||
address _entrypoint, | ||
address _accountImplementation, | ||
uint256 _recoveryPeriod, | ||
uint256 _securityPeriod, | ||
uint256 _securityWindow, | ||
uint256 _lockPeriod, | ||
address _openfortGuardian | ||
) { | ||
if (_entrypoint == address(0) || _accountImplementation == address(0) || _openfortGuardian == address(0)) { | ||
revert ZeroAddressNotAllowed(); | ||
} | ||
if (_lockPeriod < _recoveryPeriod || _recoveryPeriod < _securityPeriod + _securityWindow) { | ||
revert InsecurePeriod(); | ||
} | ||
entrypointContract = _entrypoint; | ||
accountImplementation = _accountImplementation; | ||
recoveryPeriod = _recoveryPeriod; | ||
securityPeriod = _securityPeriod; | ||
securityWindow = _securityWindow; | ||
lockPeriod = _lockPeriod; | ||
openfortGuardian = _openfortGuardian; | ||
} | ||
} |
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 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
Oops, something went wrong.