feat(monitor): show configOperator address + authorize it in api-payer gates - #598
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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
configOperatoraddress 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.configOperatorinSecurityLib’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 |
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.
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.configOperatorinSecurityLib'srevertIfNotApiPayerOrOwner,checkIfApiPayerOrOwner, andisApiPayerOrOwner, alongside the existing api payers, diamond owner, and admin api payer account (no existing members removed).🤖 Generated with Claude Code