StakingProxy: add NodeOperator entitlement to privileged functions#581
Open
joshuahannan wants to merge 1 commit intomasterfrom
Open
StakingProxy: add NodeOperator entitlement to privileged functions#581joshuahannan wants to merge 1 commit intomasterfrom
joshuahannan wants to merge 1 commit intomasterfrom
Conversation
Replaces access(all) on state-modifying functions in NodeStakerProxyHolder with access(NodeOperator) entitlement, following Cadence security best practices. Updates all dependent transactions to borrow with the entitlement, tightens the public capability to expose only NodeStakerProxyHolderPublic, and fixes a pre-existing typo in remove_staking_proxy.cdc. Closes #578 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
access(all) entitlement NodeOperatortoStakingProxyand updates all state-modifying functions inNodeStakerProxyHolder(addNodeInfo,removeNodeInfo,removeStakingProxy,borrowStakingProxy) fromaccess(all)toaccess(NodeOperator)auth(StakingProxy.NodeOperator)so the node operator gets an entitled reference from their own storagesetup_node_account.cdcto expose only&{StakingProxy.NodeStakerProxyHolderPublic}, and updatesregister_node.cdcto matchremove_staking_proxy.cdcTest plan
make generate— regenerated Go template assetsmake -C lib/go test— all Go tests pass includingTestStakingProxyCloses #578
🤖 Generated with Claude Code