Repository navigation
feat: expose indexer service URLs alongside agreements - #15
Conversation
A consumer holding an agreement's indexer address must cross-query the network subgraph today to resolve it into a service URL. Index that URL from the SubgraphService registration event into a new Indexer entity, linked from each agreement, so it can be read in the same query. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The local config held a zero contract address, so local builds wired every data source to 0x0 and indexed nothing. Use the documented local SubgraphService address so a local build indexes real events. The RecurringCollector address stays unset pending its local value. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The arbitrum configs held zero-address placeholders, so the subgraph could not index real networks. Set the deployed SubgraphService address on Arbitrum One and Sepolia (plus Sepolia's RecurringCollector) and anchor start blocks to deployment. Arbitrum One has no collector yet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@MoonBoi9001 Thanks for adding the indexer url that Studio can pull together with the indexing agreements status. I was looking through the Explorer UI again (which we were planning to follow) and noticed a few other details under the indexer entity from the network subgraph like Wanted to just check if there's a technically reasonable way to also include those alongside the indexer url in this subgraph instead?
|
ethereum.decode of a tuple type only ever returns null or a tuple-kind value, so the kind check could never fire; reduce it to a null check matching the other decode sites. Add a test that two distinct indexers stay separate records keyed by their address. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@nasmr I looked into this and created #16. Not everything is feasible afaics. Not sure how valuble #16 is in this case. Let me know what you think.
|
That is fine. WE can resolve from their address, we do that currently on L2. Again, the URL to query for the status is the key piece we need |
The registration handler had its own data source so it could start earlier than agreements, but both read the same contract and every network anchors both at its deployment block. Merge the handler into the agreements data source and drop the registrationStartBlock key. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The indexer, payer and indexer-URL link were only written by the RecurringCollector handler. Both events fire in the same transaction, but a misconfigured collector address would leave agreements missing the indexer link consumers rely on to read the URL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Okay great, I've closed #16, if needed we can reopen and take another look, but for now going with this PR on its own. I'll merge this PR now to unblock. cc. @Maikol |

TL;DR
Reading an indexing agreement today gives you the indexer's address but not its service URL, so consumers run a second query against the network subgraph to look it up. This indexes the URL from the same contract the subgraph already watches and links it to each agreement, so it comes back in one query.
Motivation
The indexing payments subgraph records each indexing agreement with the indexer's on-chain address, but not the indexer's service URL. Consumers that need the URL, such as to check an indexer's indexing status, must take that address and run a separate query against the network subgraph to resolve it.
The same SubgraphService contract this subgraph already indexes also publishes the indexer's URL on-chain, so that round-trip is avoidable. Pulling the URL into this subgraph lets consumers read it next to the agreement in a single query and drops the dependency on the network subgraph just to turn an address into a URL.
Summary