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

Add a variant of the Vesting wallet for updating the beneficiary #1

Merged
merged 9 commits into from
May 16, 2024

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented May 14, 2024

Replaces forta-network#264

The goal is to perform this on an instance that is currently using VestingWallet (v0). Still, this solution is designed to work with all existing versions of the VestingWallet (as demonstrated by the tests)

@frangio
Copy link

frangio commented May 15, 2024

I suggest using a Tenderly simulation of the multisig transaction before executing it. It should show the beneficiary storage slot as the only change.

@Amxx
Copy link
Collaborator Author

Amxx commented May 15, 2024

The operation will have to go through a multisig. I'll suggest this is done through defender (which includes tenderly support?)

Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

Minor nit.


function upgradeTo(address newImplementation) external {
require(msg.sender == _owner);
StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
Copy link
Member

Choose a reason for hiding this comment

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

Without specifying, it looks weird that we're checking ownership but not emitting the event.

Suggested change
StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
// Upgraded event is not emitted given this function is only used by UUPS's rollback test.

@ernestognw
Copy link
Member

The operation will have to go through a multisig. I'll suggest this is done through defender (which includes tenderly support?)

It's our own simulation support. If it goes through a Safe multisig it can be simulated through Tenderly as well

@Amxx Amxx merged commit 3f8d276 into master May 16, 2024
@Amxx Amxx deleted the vesting-recovery branch May 16, 2024 09:37
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