feat: 4055 Implement Owner Management for Smart Contracts#5655
Open
nosid91 wants to merge 1 commit intohashgraph:developfrom
Open
feat: 4055 Implement Owner Management for Smart Contracts#5655nosid91 wants to merge 1 commit intohashgraph:developfrom
nosid91 wants to merge 1 commit intohashgraph:developfrom
Conversation
…nds. Signed-off-by: dima <nosid91@gmail.com>
e064636 to
a37f098
Compare
andrewb1269
approved these changes
Feb 6, 2026
Contributor
andrewb1269
left a comment
There was a problem hiding this comment.
Approve the two package.json files. Please ensure other folks review the other files in the PR. Thank you!
andrewb1269
requested changes
Feb 6, 2026
Comment on lines
+164
to
+166
| ## 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. |
Contributor
There was a problem hiding this comment.
Putting a block here until another reviewer also approves. Please @ me and I can remove the block once another reviewer approves the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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