Skip to content

fix(b20): announce scheduled splits via updateUIMultiplier - #88

Merged
montycheese merged 2 commits into
mainfrom
fix/b20-ui-multiplier-selector
Aug 25, 2026
Merged

fix(b20): announce scheduled splits via updateUIMultiplier#88
montycheese merged 2 commits into
mainfrom
fix/b20-ui-multiplier-selector

Conversation

@montycheese

@montycheese montycheese commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Problem

Publishing an announcement with a scheduled asset split always failed:

We could not prepare this announcement for your wallet: Execution reverted for an unknown reason..

Root cause

assetAbi declared setUIMultiplier(uint256,uint256) (selector 0x93d32890). The Vibenet deployment implements updateUIMultiplier(uint256,uint256) (selector 0x628e600f).

B20 tokens are native contracts on Vibenet — eth_getCode returns the 1-byte 0xef marker — so there is no Solidity source or generated binding to catch a mistyped function name. The wrong name encodes into perfectly valid calldata, announce forwards it as an internal call, the unknown selector reverts, and the outer error carries no reason string. Hence the opaque message.

Only the split path was affected. A plain announcement sends announce([], …) and never hits the bad selector, which is why that button worked.

cancelScheduledMultiplier() was dead the same way; the deployment implements cancelUIMultiplierUpdate(). Nothing calls it yet, but it was wrong in the exported ABI.

Changes

  • protocol.tssetUIMultiplierupdateUIMultiplier, with named args to pin the order
  • protocol.tscancelScheduledMultipliercancelUIMultiplierUpdate
  • AnnouncementModule.tsx — updated the call site
  • protocol.test.ts — pins all six assetAbi selectors to the values read off the live deployment, so a rename fails in CI instead of at the wallet

Verification

Deployed an asset token on Vibenet and published a 2:1 split through the same encoding path as submit():

call before after
announce([<multiplier call>], …) reverted 0xb288a127 success
direct multiplier call reverted, echoing its own selector (unknown function) success
announce([], …) success success

The successful transaction emits the full bracket — AnnouncementUIMultiplierUpdated{prev: 1e18, next: 2e18, effectiveAt: 2026-08-26T14:31:34Z}EndAnnouncement — and effectiveAt() then returns the scheduled timestamp.

Argument order confirmed as (multiplier, effectiveAt): a zero first arg reverts 0x6f12f3dc, a past-timestamp second arg reverts 0x14119cf6.

I also swept every function in the demo's five ABIs (b20Abi, assetAbi, factoryAbi, policyRegistryAbi, activationAbi) against the live chain. These two were the only dead selectors out of 34.

npm run typecheck, npm test (134 passing), and npm run lint are clean on this branch.

Not covered: I did not exercise this through the browser UI, since the operator path needs a connected wallet holding OPERATOR_ROLE. The verification above drives the identical encoding path, but the click-through is unconfirmed.

Publishing an announcement with a scheduled asset split always failed
with "We could not prepare this announcement for your wallet: Execution
reverted for an unknown reason."

assetAbi declared setUIMultiplier(uint256,uint256) (0x93d32890). The
Vibenet deployment implements updateUIMultiplier(uint256,uint256)
(0x628e600f). B20 tokens are native contracts there — eth_getCode
returns the 1-byte 0xef marker — so there is no source or generated
binding to catch the mismatch. The wrong name encodes into valid
calldata, announce forwards it as an internal call, the unknown selector
reverts, and the outer error carries no reason string.

Only the split path was affected: a plain announcement sends
announce([], ...) and never hits the bad selector.

cancelScheduledMultiplier() was dead the same way; the deployment
implements cancelUIMultiplierUpdate(). Nothing calls it yet, but it was
wrong in the exported ABI.

Verified against Vibenet by deploying an asset token and publishing a
2:1 split: estimateGas passes and the log bracket reads Announcement ->
UIMultiplierUpdated{prev 1e18, next 2e18} -> EndAnnouncement, with
effectiveAt() returning the scheduled timestamp. Argument order is
(multiplier, effectiveAt): a zero multiplier reverts 0x6f12f3dc and a
past timestamp reverts 0x14119cf6.

Swept every function in the demo's five ABIs against the live chain;
these two were the only dead selectors out of 34. The new test pins the
Asset selectors so a rename fails in CI instead of at the wallet.
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
omni-ui Ready Ready Preview Aug 25, 2026 4:00pm

Request Review

@montycheese
montycheese merged commit bf1e2ce into main Aug 25, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants