-
Notifications
You must be signed in to change notification settings - Fork 12k
Add Ownable2StepSign, an extension of Ownable2Step #5628
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
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: cc3b139 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Overall, I don't think there is anything terribly wrong with this PR in terms of design ... But I'm also not sure we want it.
That is not something we got many requests for, and its something that may further reduce the discoverability of our many features.
Maybe we want to have that in the community repository ?
@ernestognw, @arr00, @gonzaotc WDYT ?
Note:
|
With the coming changes, especially referring to the inheritance of Ownable2Step being switched to Ownable, I will update the name (at least temporarily) to When it comes to the cases mentioned in the last point @Amxx, I have thought about that as well. My current conclusion is that existing form is the safest of the mentioned three options. This would be mostly due to the social aspects, as I feel that users are much more prone to giving away signatures then they are to making suspicious transactions. Also, I feel like it is safest to keep everything in the hands of the current owner, even when the owner receives the 'newOwner' signature, it will be possible for him to rethink the ownership transfer if needed (and if 'owner' is the one providing the signature, there will be no possibility to rethink). |
*/ | ||
error InvalidSigner(); | ||
|
||
constructor(string memory name) EIP712(name, "1") {} |
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.
constructor(string memory name) EIP712(name, "1") {} |
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.
I've added this only to fix the version to 1
, if that is not desirable I will remove the constructor.
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.
Hey @Amxx, just pinging to make sure you want this suggestion applied (considering the comment that I previously made).
Hey guys @Amxx @ernestognw @arr00 @gonzaotc, sorry to bother you, any chance we can proceed with this? |
This PR contains an extension of
Ownable2Step
, that I found useful for the following reasons:Ownable2Step
.newOwner
wallet at the time of the ownership transfer, as it can stay offline and therefore reduce the potential security threats.Ownership over the
newOwner
EOA, as well as the acceptance of ownership transfer are proved via signature.Call for an ownership transfer must be made by the current owner (as per usual), with the signature provided by the
newOwner
.Support for 2step ownership transfer to contracts is inherited from
Ownable2Step
.PR Checklist
npx changeset add
)