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

feat: update admin #56

Merged
merged 2 commits into from
Jun 5, 2024
Merged

feat: update admin #56

merged 2 commits into from
Jun 5, 2024

Conversation

irisdv
Copy link
Collaborator

@irisdv irisdv commented Jun 5, 2024

First part of #37

@irisdv irisdv requested a review from Th0rgal June 5, 2024 10:11
@irisdv irisdv added the 🔥 Ready for review Pull Request needs a label Jun 5, 2024
assert(get_caller_address() == self._admin_address.read(), 'you are not admin');
self._admin_address.write(new_admin);
self.ownable.initializer(new_admin);
Copy link
Member

Choose a reason for hiding this comment

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

_admin_address can be written to zero after this call so we can remove the variable in part 2

Copy link
Collaborator Author

@irisdv irisdv Jun 5, 2024

Choose a reason for hiding this comment

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

So if I do this I should update all the assert checks in the admin functions in this PR, otherwise we won't be able to upgrade the contract.

@irisdv irisdv requested a review from Th0rgal June 5, 2024 13:00
Copy link
Member

@Th0rgal Th0rgal left a comment

Choose a reason for hiding this comment

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

lgtm

@Th0rgal Th0rgal merged commit f440c3b into testnet Jun 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥 Ready for review Pull Request needs a
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants