-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update VerifiableFactory with ProxyAdmin logic
- Loading branch information
1 parent
016c335
commit e2b97ba
Showing
9 changed files
with
178 additions
and
152 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
Submodule clones-with-immutable-args
deleted from
595072
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ | ||
@ensdomains/evm-verifier/=lib/evmgateway/evm-verifier/contracts/ | ||
clones-with-immutable-args/=lib/clones-with-immutable-args/src/ | ||
@ensdomains/evm-verifier/=lib/evmgateway/evm-verifier/contracts/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
contract RegistryProxy { | ||
uint256 public nonce; // slot 0 | ||
address public registry; // slot 1 | ||
address public admin; // slot 2 | ||
|
||
modifier onlyAdmin() { | ||
require(msg.sender == admin, "Caller is not the admin"); | ||
_; | ||
} | ||
|
||
function initialize(uint256 _nonce, address _admin) external { | ||
require(nonce == 0, "Already initialized"); | ||
nonce = _nonce; | ||
admin = _admin; // set the admin (ProxyAdmin contract address) | ||
} | ||
|
||
function updateRegistry(address newRegistry) external onlyAdmin { | ||
registry = newRegistry; | ||
} | ||
} |
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.
Oops, something went wrong.