Skip to content

Add delegated value setter for authorized address#79

Merged
Yaketh (Kushmanmb) merged 3 commits intomasterfrom
copilot/add-only-owner-function
Feb 26, 2026
Merged

Add delegated value setter for authorized address#79
Yaketh (Kushmanmb) merged 3 commits intomasterfrom
copilot/add-only-owner-function

Conversation

Copy link

Copilot AI commented Feb 25, 2026

Introduces a second privileged address (0xA9D1e08C7793af67e9d92fe308d5697FB81d3E43) with limited permissions to set contract value, while maintaining owner control over authorization.

Changes

  • New state variable: authorizedAddress initialized to 0xA9D1e08C7793af67e9d92fe308d5697FB81d3E43
  • Access control: onlyAuthorized modifier restricts delegated functions
  • Delegated function: setValueAuthorized(uint256) allows authorized address to set contract value
  • Owner management: setAuthorizedAddress(address) restricted to owner only (prevents self-modification by authorized address)
  • Event: AuthorizedAddressUpdated emitted on authorization changes

Usage

// Authorized address can set value
contract.setValueAuthorized(100);  // from 0xA9D1e08C7793af67e9d92fe308d5697FB81d3E43

// Owner retains control over authorization
contract.setAuthorizedAddress(newAddress);  // from 0x0540e1dA908D032D2F74D50C06397cB5f2cbfDdB

Security: Authorized address cannot elevate privileges or modify its own authorization.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 25, 2026 23:58
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Copilot AI changed the title [WIP] Add only owner function for specified addresses Add delegated value setter for authorized address Feb 26, 2026
Copy link
Member

@Kushmanmb Yaketh (Kushmanmb) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kushmanmb

@Kushmanmb Yaketh (Kushmanmb) marked this pull request as ready for review February 26, 2026 00:21
@Kushmanmb Yaketh (Kushmanmb) merged commit cdce4d2 into master Feb 26, 2026
11 of 15 checks passed
Copy link
Member

@Kushmanmb Yaketh (Kushmanmb) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kushmanmb

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.

2 participants