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

Consider implementing two-step procedure for updating protocol addresses #73

Open
hats-bug-reporter bot opened this issue Nov 9, 2023 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@hats-bug-reporter
Copy link

Github username: @saidqayoumsadat
Submission hash (on-chain): 0x01084ca89022df2e567180e61d19471e12a796e4ee32eeda9c6cd4ed1cdac698
Severity: low

Description:
Description

A copy-paste error or a typo may end up bricking protocol functionality, or sending tokens to an address with no known private key. Consider implementing a two-step procedure for updating protocol addresses, where the recipient is set as pending, and must 'accept' the assignment by making an affirmative call. A straight forward way of doing this would be to have the target contracts implement EIP-165, and to have the 'set' functions ensure that the recipient is of the right

file: /contracts/tokenlock/TokenLockFactory.so

117    function setMasterCopy(address _masterCopy) external override onlyOwner {
        _setMasterCopy(_masterCopy);
119    }

https://github.com/hats-finance/hats-contracts/blob/0d6ebbde912bc272d9b310140d434ee2aacd36d3/contracts/tokenlock/TokenLockFactory.sol#L117-L119

@hats-bug-reporter hats-bug-reporter bot added the bug Something isn't working label Nov 9, 2023
@jellegerbrandy
Copy link

Seeting the master copy here in the factory will not "brick the protocol"

@jellegerbrandy jellegerbrandy added the invalid This doesn't seem right label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant