Skip to content

feat(monitor): show configOperator address + authorize it in api-payer gates - #598

Merged
GTC6244 merged 1 commit into
mainfrom
show-configoperator-address
Jul 22, 2026
Merged

feat(monitor): show configOperator address + authorize it in api-payer gates#598
GTC6244 merged 1 commit into
mainfrom
show-configoperator-address

Conversation

@GTC6244

@GTC6244 GTC6244 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Adds a config operator row (address + ETH balance) to the monitor dApp's Account Configuration Contract card, fetched via a new configOperator() view ABI entry; it's fetched separately with a fallback so older diamonds lacking the selector don't blank the card.

Also authorizes s.configOperator in SecurityLib's revertIfNotApiPayerOrOwner, checkIfApiPayerOrOwner, and isApiPayerOrOwner, alongside the existing api payers, diamond owner, and admin api payer account (no existing members removed).

🤖 Generated with Claude Code

Add a "config operator" row (with balance) to the monitor dApp's Account
Configuration Contract card, fetched via a new configOperator() ABI entry.
Also allow s.configOperator in SecurityLib's revertIfNotApiPayerOrOwner,
checkIfApiPayerOrOwner, and isApiPayerOrOwner without removing existing members.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@GTC6244
GTC6244 requested review from a team and Copilot July 22, 2026 17:54
@GTC6244
GTC6244 merged commit b3d8d0c into main Jul 22, 2026
14 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds visibility and authorization support for the config operator role across the monitor dApp and AccountConfig contract security gates.

Changes:

  • Monitor dApp: display configOperator address and its ETH balance in the Account Configuration Contract card.
  • Monitor dApp: add configOperator() to the view ABI and fetch it in a non-blocking, selector-missing-tolerant way.
  • Solidity: authorize s.configOperator in SecurityLib’s “api payer or owner” checks (revertIfNotApiPayerOrOwner, checkIfApiPayerOrOwner, isApiPayerOrOwner).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lit-static/dapps/monitor/index.html Adds a new “config operator” row to the contract values UI.
lit-static/dapps/monitor/app.js Adds configOperator() to the ABI and fetches/displays the address + balance with a fallback for older diamonds.
lit-api-server/blockchain/lit_node_express/contracts/AccountConfigFacets/SecurityLib.sol Expands authorization checks so configOperator is treated as allowed by “api payer or owner” gates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 133 to +137
if (
!s.api_payers.contains(caller) &&
caller != LibDiamond.contractOwner() &&
caller != s.adminApiPayerAccount
caller != s.adminApiPayerAccount &&
caller != s.configOperator
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