Skip to content

Comments

StakingProxy: add NodeOperator entitlement to privileged functions#581

Open
joshuahannan wants to merge 1 commit intomasterfrom
josh/staking-proxy-entitlements
Open

StakingProxy: add NodeOperator entitlement to privileged functions#581
joshuahannan wants to merge 1 commit intomasterfrom
josh/staking-proxy-entitlements

Conversation

@joshuahannan
Copy link
Member

Summary

  • Adds access(all) entitlement NodeOperator to StakingProxy and updates all state-modifying functions in NodeStakerProxyHolder (addNodeInfo, removeNodeInfo, removeStakingProxy, borrowStakingProxy) from access(all) to access(NodeOperator)
  • Updates all dependent transactions to borrow with auth(StakingProxy.NodeOperator) so the node operator gets an entitled reference from their own storage
  • Tightens the public capability in setup_node_account.cdc to expose only &{StakingProxy.NodeStakerProxyHolderPublic}, and updates register_node.cdc to match
  • Fixes a pre-existing typo in remove_staking_proxy.cdc

Test plan

  • make generate — regenerated Go template assets
  • make -C lib/go test — all Go tests pass including TestStakingProxy

Closes #578

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Staking Proxy: Add Entitlements

1 participant