Skip to content
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

Make SFC and NodeDriver(Auth) upgradable #96

Merged
merged 9 commits into from
Nov 11, 2024
Merged

Make SFC and NodeDriver(Auth) upgradable #96

merged 9 commits into from
Nov 11, 2024

Conversation

Mike-CZ
Copy link
Collaborator

@Mike-CZ Mike-CZ commented Nov 7, 2024

This PR makes SFC, NodeDriver and NodeDriverAuth upgradable via UUPS. It also removes custom Ownable and Initializable packages and uses the OpenZeppelin instead.

It's up to discussion wether to make NodeDriverAuth also upgradable. At current stage, NodeDriverAuth is being freshly deployed and called migrateTo method at upgrade. This sets the NodeDriver's backend to new NodeDriverAuth and the old implementation is abandoned.

migrateTo method was removed, although it allowed to switch NodeDriver's implementation of Auth contract, the SFC contract itself has no way to change its Auth contract implementation, so it's not doable anyway.

@Mike-CZ Mike-CZ requested a review from thaarok November 7, 2024 10:34
@Mike-CZ Mike-CZ changed the title Make SFC upgradable Make SFC and NodeDriver upgradable Nov 10, 2024
@Mike-CZ Mike-CZ requested a review from jmpike November 10, 2024 08:27
@Mike-CZ Mike-CZ marked this pull request as ready for review November 10, 2024 08:27
thaarok
thaarok previously approved these changes Nov 11, 2024
Copy link
Collaborator

@thaarok thaarok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, seem matching with recommended UUPS upgradable pattern.

contracts/sfc/ConstantsManager.sol Outdated Show resolved Hide resolved
contracts/sfc/NodeDriverAuth.sol Outdated Show resolved Hide resolved
@Mike-CZ Mike-CZ changed the title Make SFC and NodeDriver upgradable Make SFC and NodeDriver(Auth) upgradable Nov 11, 2024
@Mike-CZ Mike-CZ requested a review from thaarok November 11, 2024 09:10
Copy link
Collaborator

@jmpike jmpike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks.

@jmpike jmpike merged commit 8c700e0 into main Nov 11, 2024
2 checks passed
@jmpike jmpike deleted the mike/uups branch November 11, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants