Skip to content

Page 0.14.4: signatures for the wallets' signing window; Base in the overview - #266

Merged
ChainIntegrate merged 4 commits into
mainfrom
claude/gallant-mccarthy-f82ofp
Nov 24, 2026
Merged

ChainIntegrate merged 4 commits into
mainfrom
claude/gallant-mccarthy-f82ofp

Conversation

@ChainIntegrate

@ChainIntegrate ChainIntegrate commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

What

1. Function signatures for the wallets' signing window

The signing window of the browser extension and of the Android app (sign-plan.js) decodes by itself only token calls, so it warned on every other call ("unknown function"), even ones the wallet page fully understands. This PR lets the page hand the window the function signatures it knows, so the window can show those calls by name and arguments and warn only from what they actually do.

  • up-wallet.html: window.__upwalletSignatureHints(req) reads the calls of a request (Key Manager execute(bytes), the UP's execute / executeBatch, a call of the UP to itself; at most 64) and returns { selector: "function name(type name, ...)" }.
    • Source order: the called contract's verified ABI from the network's explorer, then the page's own interfaces and call-decode.js signatures.
    • A signature is returned only when it decodes the call: the arguments, encoded again, are the call data.
  • abi-decode.js: AbiDecode.functionsOf(chainId, address).
  • call-decode.js: CallDecode.signatures().
  • Inline script hashes regenerated (node tools/csp.js); PAGE_VERSION 0.14.4; WALLET-BACKLOG.md describes the new behaviour.

The window side (extension 0.2.8, app 0.10.3, committed to their repos) does not trust the page. It uses a hint only if its selector is the call's and it decodes the data exactly. Then:

  • neutral: the call by name and arguments (the UP named), no warning;
  • amber: a permission (approve, permit, operator, delegate), an address argument such as to / receiver that is not the UP, bytes after the arguments, a call neither side decodes;
  • red: a description that does not match the data, a DELEGATECALL of the UP, a change of its owner or of its controllers' permissions (LSP6 keys).

2. Base left out of the extension's network overview

Symptom. In the extension, the overview counted "8 of 9", then dropped Base. The identity page on the site, which runs the same asset-list.js and the same Base RPC, showed Base fine.

Cause. The extension's Alchemy key gets no NFTs (HTTP 403), so the NFTs come from each network's Blockscout. That read had no time limit, and Base's Blockscout can be slow. Base's whole reading then went past the overview's 60 s, so Base was dropped, tokens included.

Changes in asset-list.js:

  • The Blockscout NFT fallback gives up after 25 s and keeps the tokens already read.
  • Every indexer request gives up after 20 s.
  • Alchemy token metadata are read 6 at a time and cached for 30 days.

Changes in up-wallet.html:

  • A network card says "NFTs not read (...)" when the NFTs could not be read.
  • A network that is not read says why and at which step: "Not read: Base (assets: timeout 60 s)" instead of "network not reachable" for every cause.

Tests

  • Signing hints, page in Chromium (local server, network blocked):
    • A 4-call batch gives deposit, supply and addSupplier as hints; the unknown 0xdeadbeef gets none.
    • Fed to sign-plan.js: 3 calls are shown by name and arguments, 1 warning (the unknown call), no red.
    • A Key Manager transaction: its hint is given, and a receiver that is not the UP is warned.
    • No page errors.
  • Base overview, page in Chromium (AssetList.list on Base, Alchemy mocked):
    • Alchemy NFT API 403 and Blockscout never answering: Base is read in 20 s with its tokens, and nftErr is "HTTP 403; Blockscout: timeout". Before, the read was unbounded.
    • 300 tokens at 150 ms per answer: 8.2 s the first time (over 45 s before the change), 0.17 s at the next refresh.
  • node tools/csp.js --check: all pages up to date.
  • up-wallet-extension, built from c81c3d2:
    • test/sign-plan.js 34/34, with 13 new cases.
    • test/extension.js 83/83, with a new end-to-end hint case.
  • up-wallet-android, built from c81c3d2: 11/11, 35/35 (new: hints through the phone key), 22/22, 44/44.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x

The signing window of the browser extension and of the app (sign-plan.js) decodes by itself only the
token calls, and warned on every other call. The page now gives it, for the calls of a request, the
signatures it knows: the called contract's verified ABI from the explorer (abi-decode.js, functionsOf),
then the page's own decoders (its interfaces, call-decode.js's signatures). A signature is given only
when it decodes the call (the arguments encoded again are the call data). The window checks each one
again against the data before it shows the call by name and arguments (extension 0.2.8, app 0.10.3).

window.__upwalletSignatureHints(req) reads the calls of a Key Manager transaction or of an operation of
the UP (execute, executeBatch, a call of the UP to itself), at most 64. Inline script hashes updated
(tools/csp.js). WALLET-BACKLOG.md says what the window shows and how it warns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
…r request

On Base, a UP that holds many tokens (airdrops, spam) had its token metadata read one by one: through the
browser extension the network's reading took longer than the overview waits (60 s), and Base was left
out ("8 of 9", then no Base). Now the metadata are read 6 at a time and kept 30 days (a token's name,
symbol, decimals and logo do not change), and every indexer request gives up after 20 s, so Alchemy's
failure falls back to Blockscout as before. Measured with 300 tokens and 150 ms per answer: 8 s the first
time (was over 45 s), 0.2 s at the next refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
@ChainIntegrate ChainIntegrate changed the title Page 0.14.4: function signatures for the wallets' signing window Page 0.14.4: signatures for the wallets' signing window; Base in the overview Nov 24, 2026
"Not read: Base (assets: timeout 60 s)" instead of "network not reachable" for every cause: each step's
timeout names the step (RPC, assets), and the error is shown with the network. Reported in the
extension: the overview stopped at "8 of 9" and left Base out, with Alchemy's calls for Base answered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
…rview says when NFTs were not read

The browser extension's Alchemy key gets no NFTs (HTTP 403), so for every network the NFTs come from its
Blockscout. Base's Blockscout can be slow, and that read had no time limit: Base's whole reading went past
the overview's 60 s, and Base was left out, tokens included (the identity page on the site, whose key gets
the NFTs from Alchemy, showed Base fine). Now the fallback gives up after 25 s (every request after 20 s),
the tokens already read are kept, and the network's card says "NFTs not read (...)". Measured with
Blockscout never answering: Base read in 20 s, its tokens shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyvXroLy77GnnctsMuDW8x
@ChainIntegrate
ChainIntegrate merged commit d454475 into main Nov 24, 2026
2 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.

2 participants