Keep abis/*.json in sync with livepeer/protocol deployment artifacts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 7
- Avg merge
- 4h 1m
- Merged PRs (30d)
- 6
Description
Problem
abis/*.json are hand-committed with no sync mechanism. There is no script, CI step, or documented
process that pulls them from livepeer/protocol, so they
drift silently from the deployed contracts and only get touched when someone notices something
missing.
abis/BondingManager.json last saw a real update in 6d5228b (2022). Adding reward-caller
indexing required hand-copying a single event fragment out of
deployments/arbitrumMainnet/BondingManagerTarget.json into it. That worked, but it is not a
process — the next person has to know to do the same thing.
This matters because a missing event in the ABI is invisible: graph codegen simply never emits the
event class, so the event cannot be wired up and nothing warns you.
Current drift
Measured on 2026-08-03 against livepeer/protocol deployments/arbitrumMainnet/*.json, comparing
event and function signature sets:
| Local ABI | Protocol artifact | Status |
|---|---|---|
BondingManager |
BondingManagerTarget |
drift — missing TreasuryReward(address,address,uint256); missing the Delta functions (setRewardCaller, transcoderToRewardCaller, rewardForTranscoder, checkpointBondingState, treasuryRewardCutRate, …); carries a legacy WithdrawFees(address) overload that no longer exists upstream |
PollCreator |
PollCreator |
drift — local-only token(), which reverts on the deployed contract (0x8bb50806D60c492c0004DAD5D9627DAA2d9732E6) and is not called by any mapping |
Controller |
Controller |
in sync |
LivepeerGovernor |
LivepeerGovernorTarget |
in sync |
Minter |
Minter |
in sync |
RoundsManager |
RoundsManagerTarget |
in sync |
ServiceRegistry |
ServiceRegistryTarget |
in sync |
TicketBroker |
TicketBrokerTarget |
in sync |
Better than feared — only two files are actually stale, and the missing TreasuryReward is the one
real indexing gap.
Not covered by livepeer/protocol/deployments/arbitrumMainnet, so they need a different source or
an explicit opt-out:
L2Migrator— lives inlivepeer/arbitrum-lpt-bridgeLivepeerToken— no artifact in that deployments dirPoll— deployed per-poll byPollCreator, so there is no static deployment artifactUniswapV3Pool— third-party, correctly pinned by hand
Proposal
- Add a sync script (e.g.
yarn sync:abis) that pulls.abifrom the protocol repo's
deployments/arbitrumMainnet/*.jsonfor each mapped contract, writing prettier-formatted output
toabis/. Contracts with no upstream artifact get an explicit allowlist entry documenting why. - Add a CI drift check that fails, or at least warns, when a committed ABI diverges from upstream —
that is what turns this from a one-off cleanup into something that stays fixed. - As part of (1), resync
BondingManagerandPollCreator. Verified safe: no function any
mapping calls is lost, so no.bind()call breaks. The only removals are the unwired legacy
WithdrawFees(address)overload and the nonexistentPollCreator.token().
Note that resyncing BondingManager adds the TreasuryReward event to the ABI but does not
index it — wiring a handler for treasury rewards is separate work and deserves its own issue.
Context
Split out of the reward-caller indexing work, which deliberately kept the ABI change narrow (one
event, copied verbatim from the canonical artifact and diffed to confirm it matched byte-for-byte)
rather than mixing a full resync into a feature PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the committed abis/.json files and compare them with livepeer/protocol deployments/arbitrumMainnet/.json, using the contract mapping and exclusions described in the issue. Check the existing package scripts and CI configuration before adding the proposed yarn sync:abis command and drift check. Done means BondingManager and PollCreator are resynced, uncovered contracts have documented allowlist entries, and CI detects future divergence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100