-
Notifications
You must be signed in to change notification settings - Fork 165
feat: 4055 Implement Owner Management for Smart Contracts #5655
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: develop
Are you sure you want to change the base?
feat: 4055 Implement Owner Management for Smart Contracts #5655
Conversation
…nds. Signed-off-by: dima <nosid91@gmail.com>
e064636 to
a37f098
Compare
andrewb1269
left a comment
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.
Approve the two package.json files. Please ensure other folks review the other files in the PR. Thank you!
| ## Owner Management | ||
|
|
||
| The smart contracts use a two-step ownership transfer pattern for security. This allows safe transfer of ownership without the risk of losing access to the contract. |
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.
Putting a block here until another reviewer also approves. Please @ me and I can remove the block once another reviewer approves the PR.
|
Hello. I was checking your PR 5655 and found that there are errors after Wipe contract creation, and Retire contract cannot be created. I tried to create both in UI. There is a error like this: 2026-02-09T13:43:02.133Z [GUARDIAN_SERVICE]: TypeError: no matching event (argument="key", value="0xbca31226f48d9d9a4c4759ba05c7e55d4d155ef264dd1e7f462df37b89647fa9", code=INVALID_ARGUMENT, version=6.15.0) Also I've found that this issue was already presented in the 4054 story commit dd244b1 Could you please take a look? Steps:
|
Description
This PR implements a secure mechanism to transfer and manage the OWNER role in Guardian smart contracts to address security audit findings (#4055).
Access.sol(proposeOwner,claimOwner,removeOwner)propose-owner,claim-owner,remove-owner)Related issue(s)
Fixes #4055
Notes for Reviewer
Why Two-Step Ownership Transfer?
The implementation uses a two-step ownership transfer pattern (propose + claim) instead of direct transfer for the following security reasons:
Prevents accidental transfers: Direct ownership transfer to an incorrect address (typos, copy-paste errors) would result in permanent loss of contract control. The two-step pattern requires the new owner to actively claim ownership, confirming they have access to the destination address.
Validates recipient capability: The claim step verifies that the new owner can actually execute transactions, ensuring they have the private key and proper account setup.
Provides recovery window: If an owner accidentally proposes the wrong address, they can simply propose a different address to overwrite the pending owner before the claim occurs.
Industry standard: This pattern is widely adopted in production contracts (OpenZeppelin's
Ownable2Step, major DeFi protocols) as a security best practice.Security Constraints
pendingOwneris cleared after successful claim (prevents replay)Backwards Compatibility
Checklist