feat(BOP-495): ERC-8056 interface-review follow-ups (renames + Conversion extension) - #191
Closed
robriks wants to merge 6 commits into
Conversation
Rename the ERC-8056 interface file to IERC8056.sol per the Aug 4 2026 B20 interface review. File rename only: the three interface identifiers (IScaledUIAmount, IScaledUIAmountNewUIMultiplier, IScaledUIAmountBalances) and every wire symbol are unchanged. Updates all import paths and one doc comment reference. Co-authored-by: Cursor <cursoragent@cursor.com>
…ors/events Per the Aug 4 2026 B20 interface review, rename the Cobalt-only ERC-8056 scheduled-multiplier symbols to the "UI Multiplier" vocabulary: error ScheduleOverlap -> PendingUpdateExists error NoScheduledMultiplier -> NoScheduledUIMultiplier event MultiplierUpdateCancelled -> UIMultiplierUpdateCancelled Updates the IB20Asset interface, the MockB20Asset reference implementation, the affected unit tests, the scheduled-multiplier smoke journey, and the docs. These symbols are Cobalt-only (AssetV2) and not yet live, so the rename is safe. Co-authored-by: Cursor <cursoragent@cursor.com>
Advertise the canonical instant-failsafe under the ERC-8056 "UI Multiplier" vocabulary as `updateUIMultiplier` and de-advertise the legacy `updateMultiplier` from IB20Asset. The MockB20Asset reference keeps `updateMultiplier` dialable (delegating to the shared body) so the precompile's retained legacy selector stays cross-validated by the fork tests; a regression test pins that the legacy selector remains callable and still emits UIMultiplierUpdated. B20FactoryLib gains encodeUpdateUIMultiplier (canonical) and keeps encodeUpdateMultiplier (legacy, encoded by signature). Docs and smoke journeys are swept separately in the reconciliation commit. Co-authored-by: Cursor <cursoragent@cursor.com>
Add the ERC-8056 Conversion extension interface (id 0x57854fc3) to IERC8056.sol, inherit it on IB20Asset, and advertise it via supportsInterface. The MockB20Asset reference implements toUIAmount/fromUIAmount and keeps the legacy toScaledBalance/toRawBalance dialable (shared bodies) so the precompile's retained legacy selectors stay cross-validated; a regression test pins that they remain callable and agree with the canonical converters. toScaledBalance/toRawBalance are de-advertised from IB20Asset; the dedicated tests move to toUIAmount/fromUIAmount, and B20FactoryLib/docs are updated. The "Conversion extension not claimed" doc statement is flipped. Remaining doc/smoke naming is swept in the reconciliation commit. Co-authored-by: Cursor <cursoragent@cursor.com>
Advertise MAX_UI_MULTIPLIER() (== type(uint128).max) on IB20Asset. The MockB20Asset reference declares it as a public constant (single source of truth, auto-generated getter) and the setter guards reference it, so callers can read the accepted-multiplier bound without hitting the InvalidMultiplier revert path. Pinned to the uint128 overflow guard by a constants test. Co-authored-by: Cursor <cursoragent@cursor.com>
Sweep the docs and smoke journeys for the renamed/added surface and document the
event reconciliation:
- docs/B20/Asset.md: use updateUIMultiplier / toUIAmount / fromUIAmount as the
canonical names (noting the retained-but-de-advertised legacy selectors),
expose MAX_UI_MULTIPLIER(), and spell out the intended double event — an
instant updateUIMultiplier that supersedes a *live* schedule emits
UIMultiplierUpdateCancelled then UIMultiplierUpdated{block.timestamp}, and
AssetV2 never emits the legacy V1 MultiplierUpdated (not part of IB20Asset).
- scheduled_multiplier.py (Cobalt-only): switch to the canonical
updateUIMultiplier / toUIAmount.
- asset_lifecycle.py (cross-fork): keep the legacy updateMultiplier /
toScaledBalance / toRawBalance selectors — the only multiplier/conversion
selectors dialable on both Beryl and Cobalt — with a comment explaining why.
abis.py appends their fragments since IB20Asset no longer advertises them.
Co-authored-by: Cursor <cursoragent@cursor.com>
robriks
requested review from
amiecorso,
eric-ships,
ilikesymmetry,
rayyan224 and
stevieraykatz
as code owners
August 4, 2026 22:48
Open
3 tasks
Collaborator
Author
|
Superseded by #192, opened from a branch on |
robriks
deleted the
markusosterlund/bop-495-schedule-multiplier-updates-interface-review-follow-ups
branch
August 4, 2026 23:03
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.
Summary
Applies the Aug 4 2026 B20 Interface Review follow-ups to the ERC-8056 scaled-multiplier surface (Solidity reference / interface / tests / smoke). Paired in lockstep with base/base PR base/base#4285 — land together.
Scope is ERC-8056 + multiplier scheduling only. All symbol changes are Cobalt-only (AssetV2, not yet activated on any network) or add-alias + deprecate on the frozen Beryl surface — nothing on-chain breaks.
Changes (one per commit)
IScaledUIAmount.sol→IERC8056.sol(file only; interface identifiers unchanged).ScheduleOverlap→PendingUpdateExists,NoScheduledMultiplier→NoScheduledUIMultiplier,MultiplierUpdateCancelled→UIMultiplierUpdateCancelled.updateUIMultiplieradvertised as the canonical instant-failsafe; legacyupdateMultiplierde-advertised but kept dialable (regression test pins it).IScaledUIAmountConversion(0x57854fc3) adopted:toUIAmount/fromUIAmountadvertised; legacytoScaledBalance/toRawBalancede-advertised but kept dialable.MAX_UI_MULTIPLIER()getter exposes thetype(uint128).maxsetter bound.asset_lifecyclekeeps the legacy selectors (the only multiplier/conversion selectors valid on both Beryl and Cobalt).Deprecation model (§5b, Option C)
The three Beryl-live selectors (
updateMultiplier,toScaledBalance,toRawBalance) stay permanently dialable in the precompile; only the base-std advertised interface drops them.Test plan
forge test— 717 pass, 4 fork-gated skipsforge fmt --checkanvil --base(the real lockstep gate)Refs
BOP-495 (parent BOP-429 / B20 Improvements). Paired base/base PR: base/base#4285. Plan:
~/work/erc8056-rename-plan.md.