docs(b20-asset): enumerate multiplier reverts, trim ERC-8056 natspec - #179
Open
stevieraykatz wants to merge 1 commit into
Open
docs(b20-asset): enumerate multiplier reverts, trim ERC-8056 natspec#179stevieraykatz wants to merge 1 commit into
stevieraykatz wants to merge 1 commit into
Conversation
Interface Coverage✅ All interface functions have test coverage. |
📊 Forge Coverage (
|
| File | Lines | Stmts | Branches | Funcs |
|---|---|---|---|---|
| 🔴 B20FactoryLib.sol | 95.40% | 96.00% | 100.00% | 90.00% |
| 🔴 test/lib/ForceFeeder.sol | 0.00% | 0.00% | 100.00% | 0.00% |
| 🔴 test/lib/PrecompileProbe.sol | 0.00% | 0.00% | 0.00% | 0.00% |
| 🟢 MockActivationRegistry.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockActivationRegistryStorage.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockB20.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockB20Asset.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟡 MockB20Factory.sol | 98.96% | 99.10% | 100.00% | 100.00% |
| 🟢 MockB20Stablecoin.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockB20Storage.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockPolicyRegistry.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockPolicyRegistryStorage.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| Total | 96.63% | 97.27% | 98.63% | 96.33% |
Full report: download artifact. To browse locally: make coverage (runs forge coverage + genhtml + opens the HTML report).
stevieraykatz
force-pushed
the
fix/erc8056-natspec-revert-enumeration
branch
from
July 28, 2026 18:33
5d99c0c to
5396db3
Compare
|
Restore the revert enumeration on the scheduled-multiplier interface that the ERC-8056 change dropped, and tighten two doc claims. - IB20Asset: add per-revert @dev lines (in execution order) for setUIMultiplier, cancelScheduledMultiplier, and updateMultiplier, per the team natspec convention that every revert path (role gates included) is enumerated. updateMultiplier previously documented these; the widening to the ERC-8056 surface removed them. - IScaledUIAmount: move the TransferWithUIAmount-omission rationale out of callsite natspec into docs/B20/Asset.md; keep only the callsite fact. - docs/B20/Asset.md: scope the no-overflow guarantee to balance-derived reads (toScaledBalance takes arbitrary input and can still overflow), and carry the TransferWithUIAmount rationale the interface now points to.
stevieraykatz
force-pushed
the
fix/erc8056-natspec-revert-enumeration
branch
from
July 28, 2026 19:00
5396db3 to
c8ae772
Compare
stevieraykatz
marked this pull request as ready for review
July 28, 2026 19:17
stevieraykatz
requested review from
amiecorso,
eric-ships,
ilikesymmetry and
rayyan224
as code owners
July 28, 2026 19:17
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
Follow-up NatSpec/doc cleanup on the ERC-8056 scaled-multiplier work (#173). No ABI, storage, or behavior changes — interfaces and docs only.
Three findings from a post-merge review:
Revert enumeration regression (
IB20Asset). The team convention is that every revert path — role gates included — gets its own@dev Reverts with ...line in execution order. The pre-feat(b20-asset): ERC-8056 scaled multiplier (scheduled updates + conformance) #173updateMultiplierdocumented these; widening the surface to ERC-8056 dropped them and shippedsetUIMultiplier/cancelScheduledMultiplierwith none. Restored for all three:setUIMultiplier:AccessControlUnauthorizedAccount,InvalidMultiplier,EffectiveAtInPast,EffectiveAtTooFar,ScheduleOverlapcancelScheduledMultiplier:AccessControlUnauthorizedAccount,NoScheduledMultiplierupdateMultiplier:AccessControlUnauthorizedAccount,InvalidMultiplierCallsite natspec carrying design rationale (
IScaledUIAmount). The core interface@devexplained whyTransferWithUIAmountis omitted (the D9 decision). That rationale is concept-level and now lives indocs/B20/Asset.md; the interface keeps only the callsite fact plus a pointer.Overflow claim over-scoped (
docs/B20/Asset.md). "scaled reads can never overflow" holds for balance-derived reads (bounded by theuint128supply cap) but not fortoScaledBalance(rawBalance), which takes an arbitrary input and still reverts on overflow — as its own test asserts. Scoped the guarantee accordingly.Testing
forge buildpasses (no new warnings). No test changes — this is documentation-only.