Repository navigation
docs(b20): use Cobalt ERC-8056 multiplier interface in examples - #2026
Merged
Merged
Conversation
Move docs examples off the deprecated Beryl multiplier names (updateMultiplier, multiplier, scaledBalanceOf, MultiplierUpdated) to the Cobalt ERC-8056 surface (updateUIMultiplier, uiMultiplier, balanceOfUI, UIMultiplierUpdated). - Vibenet engine: scheduled setter, uiMultiplier/balanceOfUI reads, waitForTimestamp helper; bump ENGINE_VERSION to 5 and loader to ?v=5 - AssetDemo live + offline split and B20PlaygroundDemo - Verified-sample asset ABI drops the deprecated entries - List Tokenized Stocks helper table and history event - Constants wording; Beryl B20 page gets a pointer note Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Collaborator
✅ Heimdall Review Status
|
- multiplier()/scaledBalanceOf stay canonical per base-std; only toScaledBalance/toRawBalance/updateMultiplier are deprecated - AssetDemo: effectiveAt margin 5s -> 15s; waitForTimestamp timeout 60s - Playground: split takes effect at effectiveAt, not in the same call - History reconstruction: key by effectiveAtTimestamp, drop cancelled updates (UIMultiplierUpdateCancelled) - Beryl note: event change; constants: remove em-dash Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
stephancill
approved these changes
Sep 29, 2026
This branch was successfully deployed
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.
What changed? Why?
Eric Brown asked that all B20 examples in docs use the new interface from the Cobalt multiplier changelog. Examples still used the Beryl names.
updateMultiplier(uint256)(deprecated, emergency setter)updateUIMultiplier(uint256,uint256)multiplier()(canonical; ERC-8056 alias added)uiMultiplier()scaledBalanceOf(address)(canonical; ERC-8056 alias added)balanceOfUI(address)toScaledBalance/toRawBalance(deprecated)toUIAmount/fromUIAmountMultiplierUpdated(deprecated, instant setter only)UIMultiplierUpdateddocs/static/vibenet-engine.txt): ABI and helpers switched toupdateUIMultiplier,uiMultiplier,balanceOfUI. NewlatestTimestampandwaitForTimestamphelpers (60s timeout).ENGINE_VERSION4 → 5 and loader cache key?v=4→?v=5, so browsers don't serve the stale engine.AssetDemo.jsx): schedules the 2-for-1 split ~15s ahead (margin for a faucet top-up, the cross-tab send lock, or a slow RPC), waits foreffectiveAt, then readsuiMultiplier()andbalanceOfUI(). The offline fallback shows the same calls.B20PlaygroundDemo.jsx: offline split usesupdateUIMultiplier/UIMultiplierUpdated, and the caption says balances double ateffectiveAt, not in the same call.abi.ts): removed the 3 deprecated entries; no sample called them.UIMultiplierUpdated(the old text saidMultiplierUpdatedfires on scheduled updates, but it only fires on the instant setter), keys changes byeffectiveAtTimestamp, and says to drop updates later cancelled byUIMultiplierUpdateCancelled.constants.mdx: wording uses the new names; removed an em-dash.upgrades/beryl/b20.mdx: table left as-is (accurate for Beryl); added a Note that maps each name to its Cobalt status and notes that the scheduled setter emits onlyUIMultiplierUpdated.Notes to reviewers
Out of scope: reference pages for the deprecated functions (eg,
update-multiplier.mdx,scaled-balance-of.mdx) still document them, with deprecation warnings.apply-a-multiplier.mdxand the concept pages already lead with the new names.Vibenet support: confirmed on a live Vibenet token (VIBE,
0xb200…133d) thatuiMultiplier,newUIMultiplier,effectiveAt,totalSupplyUI, andMAX_UI_MULTIPLIERall respond. Vibenet produces ~5–8 blocks/s with 1s timestamps, so the demo's ~15s wait is short.For the B20 team: deprecation status of
multiplier()/scaledBalanceOf. base-std (changelog/02_Cobalt_B20Asset_multiplier.md,IB20Asset.sol) marks them "unchanged (canonical name)", withuiMultiplier()/balanceOfUIas ERC-8056 aliases. The rendered Cobalt changelog on master labeled them "deprecated-name-kept", and this PR originally repeated that. This PR now follows base-std, and docs(upgrades): rename Cobalt B20 pages, add Denim B20 upgrade pages #2025 fixes the rendered changelog table. Examples still use the ERC-8056 names per Eric's request, since both return the same values. Please confirm base-std is the intended status.For the B20 team: demo
effectiveAtmargin.updateUIMultiplierrevertsEffectiveAtInPastunlesseffectiveAt > block.timestampat inclusion. The demo pickseffectiveAtbefore sending, so a slow send path can make it land late. 15s is a judgment call between reliability and how long the reader waits; a retry onEffectiveAtInPastwould be the more robust option if you prefer.How has it been tested?
node scripts/test-vibenet-engine.mjs: passes, with a new assertion that theupdateMultiplierhelper is gone (re-run after review fixes: passes)tsc --noEmitonexamples/verified-doc-samples/typescript: passesnode scripts/validate-docs-structure.js: passesnode scripts/lint-mdx.js: 0 errors on changed pagesScreenshots
TODO: capture the Apply a Multiplier demo split step (live and offline).