-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FuseController #318
base: l2-registry
Are you sure you want to change the base?
FuseController #318
Changes from all commits
1f29495
f1a6742
5b55181
1a76c96
90ba244
570323c
e139421
83d43da
650072a
30b473b
245d731
eaa6a02
aa23c1f
cdef50e
b27533e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.17; | ||
|
||
import "./IController.sol"; | ||
|
||
interface IControllerUpgradeTarget is IController { | ||
function upgradeFrom(bytes32 node, bytes calldata extraData) external; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.17; | ||
|
||
import "./IController.sol"; | ||
import "./IControllerUpgradeTarget.sol"; | ||
|
||
uint64 constant CAN_DO_EVERYTHING = 0; | ||
uint64 constant CANNOT_BURN_NAME = 1; | ||
uint64 constant CANNOT_BURN_FUSES = 2; | ||
uint64 constant CANNOT_TRANSFER = 4; | ||
uint64 constant CANNOT_SET_RESOLVER = 8; | ||
uint64 constant CANNOT_CREATE_SUBDOMAIN = 16; | ||
uint64 constant CANNOT_SET_RENEWAL_CONTROLLER = 32; | ||
uint64 constant PARENT_CANNOT_SET_EXPIRY = 64; | ||
uint64 constant PARENT_CANNOT_CONTROL = 128; | ||
|
||
interface IFuseController is IController { | ||
function expiryOf(bytes32 node) external view returns (uint64); | ||
|
||
function fusesOf(bytes32 node) external view returns (uint64); | ||
|
||
function renewalControllerOf(bytes32 node) external view returns (address); | ||
|
||
function upgrade(bytes32 node, bytes calldata extraData) external; | ||
|
||
function setUpgradeController( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this an upgrade target, rather than any kind of controller? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setUpgradeControllerTarget? It's a controller to upgrade to. |
||
IControllerUpgradeTarget _upgradeController | ||
) external; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this change? Requiring controllers to implement both methods complicates them, and many will have to implement
ownerOf
simply by calling the registry back to fetch their data from it anywy.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It saves an external call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what circumstances?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.