feat: surface LIP-118 reward-caller activity - #758
Merged
Conversation
setRewardCaller has no render case, so RewardCallerSetEvent fell through to the default branch and the home and transactions pages showed "Error fetching event information." for it; the account history rendered nothing at all. Add the fragment and a card/row for both, including the unset variant, which the protocol encodes as the zero address. Not restricted to registered orchestrators: setRewardCaller keys on msg.sender with no registration check, and filtering on the transcoder's current status would apply present state to a historical event. ServiceURIUpdateEvent is already shown unfiltered on the same grounds. Also widen the reward query added in #757. Keying it on the delegate alone left the nominated caller's own history without the reward calls it made, since #757 dropped RewardEvent from the transaction path. Match the sender as well and tag which side the account is on: the caller gets "Called reward for <orchestrator>" without the amount, which is minted for the orchestrator, not for them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Explorer’s event querying and rendering to properly surface LIP-118 “reward caller” activity across global transactions views and account/orchestrator history, including both setRewardCaller events and reward calls submitted by nominated callers.
Changes:
- Adds
RewardCallerSetEventsupport to the global events query and renders it inTransactionsList(account cell + descriptive copy, including the unset/zero-address case). - Expands account history reward coverage by widening the
rewardEventsquery to include bothdelegate: $accountandtransaction.from: $account, and adjusts history-row rendering to distinguish orchestrator vs. caller perspective. - Regenerates
apollo/subgraph.tsso generated types and query documents include the new schema fields/events.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| queries/transactions.graphql | Widens rewardEvents filtering to cover orchestrator + caller sides; adds RewardCallerSetEvent selection for account history transactions. |
| queries/events.graphql | Adds RewardCallerSetEvent fragment so global transaction/event lists can render it instead of falling through to an error/default. |
| components/TransactionsList/index.tsx | Renders RewardCallerSetEvent rows (account cell + “authorized/removed” description), using EMPTY_ADDRESS for the unset case. |
| components/HistoryView/index.tsx | Adds a RewardCallerSetEvent card in history and tags reward rows as caller-side vs orchestrator-side to adjust copy/amount display. |
| apollo/subgraph.ts | Updates generated schema/types/documents to include RewardCallerSetEvent and rewardCaller fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The address sat in the card's right-hand slot, which every other card uses for a value - LPT, ETH, a round number - so it inherited amount styling and read like one. Addresses go in the title in this component, as Delegated/Redelegated/ Undelegated already do. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
components/HistoryView/index.tsx:22
- There are two separate imports from "@utils/web3" here. Consolidating them avoids duplicate-import patterns and keeps the import section easier to maintain.
import { EMPTY_ADDRESS, formatAddress } from "@utils/web3";
import { PERCENTAGE_PRECISION_TEN_THOUSAND } from "@utils/web3";
Drop what the code already says - which query filter is used, why the tag is computed in the memo - and keep only what it does not: that reward tokens are minted for the orchestrator, so the amount stays off the caller's history. Rename isCaller to isRewardCaller to match the protocol's term. Co-Authored-By: Claude Opus 5 (1M context) <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.
Follow-up to #757, finishing LIP-118 (livepeer/protocol#648, livepeer/subgraph#253) support in the explorer. #757 handled the orchestrator's own history; this makes the reward caller show up everywhere else.
setRewardCallerrenders on the home and transactions pages ("Authorized 0x1b0c…292f to call reward on their behalf") and as a card on the account history, including the unset case, which the protocol encodes as the zero address.or: [{ delegate }, { transaction_: { from } }].apollo/subgraph.tsis regenerated; it predated LIP-118.Two choices worth flagging:
setRewardCallerkeys onmsg.senderwith no registration check, and filtering on the transcoder's current status would rewrite a historical event.ServiceURIUpdateEventis already shown unfiltered on the same grounds.Verified against live data on
/transactionsand on the history tabs of0x5bdeedca…7039(orchestrator),0x1b0c26fc…292f(its reward caller) and0x8ad7bcac…e947(a non-orchestrator that set and then removed one).pnpm typecheck,lint,format:checkandtestare green.Out of scope: showing the current
Transcoder.rewardCalleron the orchestrator profile, and the nomination itself on the caller's history.