feat(dashboard): recursive calldata decoder (proposal actions + /tools/decoder) - #2146
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…manizers Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…king and summaries Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lldata Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… cards Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…controls Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
🚅 Deployed to the anticapture-pr-2146 environment in anticapture-infra
|
There was a problem hiding this comment.
💡 Codex Review
anticapture/apps/dashboard/shared/services/decoder/abi/etherscan.ts
Lines 49 to 52 in 10ab6e1
If the browser request to /api/etherscan rejects—for example during a transient network or proxy failure—this uncaught exception rejects the complete decode query before the resolver can fall back to an uploaded ABI, OpenChain, or word guessing. Both decoder consumers ignore the query error and therefore render a blank result once loading ends; catch fetch and response-parsing failures here and return null, consistent with the resolver's graceful fallback contract.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
🎨 UI Review
Decoded Action Card —
|
|
🔍 Vercel preview: https://anticapture-6jocd9trr-ful.vercel.app |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed the UI review in 3d82ef0 — thanks, this was thorough:
On the input-scope question: deliberate v1 narrowing — the field accepts raw calldata (0x hex) only. Signed tx hex and explorer URLs both need extra machinery (tx-envelope RLP parsing, or fetching the tx by hash through the RPC proxy) and are worth their own slice; the helper text now says "Supports raw calldata (0x-prefixed hex)" so the copy no longer overpromises. I'll note it on DEV-1159 as a follow-up. |
- A delegatecall child carries an execution mode through the decode, and nothing claims effects at the code it runs: no token hint, a sentence reading "Delegatecalls 0xabcd…1234 (transfer)", a warning on the card and a badge on the collapsed row. The parent repeats the operation, never the effect. Safe multiSend is unpacked too, so its packed operation byte and its per-record value get the same treatment. - The parameter count and signature line come from the ABI's input count, so a 300-input function no longer reads as 100 params. A batch whose children the budget dropped now ends its name list with an ellipsis rather than an exact remainder it cannot know. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- A wrapper's summary is structural and stays true however the parent invoked it. The canonical Safe batch delegatecalls MultiSend, so the old ordering hid every child behind one address; the qualifier now rides on the sentence: "Executes 2 calls (delegatecall): transfer, approve." Leaf templates still refuse to claim effects for a delegatecall. - The parameter budget is tree-wide as well as per call, so 200 calls can no longer contribute a hundred rows each. Wrapper caveats read off the extracted calls instead of unpacking a MultiSend blob a second time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- A collapsed action decodes at depth 0, so a page of batched actions no longer issues an ABI proxy request per nested call before anyone has expanded a row. Wrapper summaries fall back to the arity when the children are raw, and an option passed as undefined keeps its default instead of switching the guard off. - Tuples get the same preview cap as arrays, the resolver caches evict least-recently-used, raw hex scrolls instead of growing the card, pastes stop at the decode limit, and tooltips are truncated. - A token symbol read from an arbitrary contract is sanitized before it reaches a sentence, and a chain id from the URL is validated before it reaches the ABI proxy. Network JSON is narrowed with guards rather than asserted, the last address casts are gone, and the hook dependency warnings are fixed at the source. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…nd records - A collapsed action decodes one level, so its sentence names the direct children and keeps their delegatecall qualifier, at one ABI lookup per child and none deeper. - MultiSend stops at any operation byte it cannot execute, and says what it could not read: an invalid byte, an over-declared length, or a trailing stub. Nothing after such a record is presented as a call. - The decoder tool says when a paste was truncated to the decode limit and when the link was omitted. The budget constants now state that they count retained values, not the notes about them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80fa7b3537
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…verting batches - Children decode in parallel and claim their rows when their own ABI lookup resolves, so a shared budget handed the tree to whichever network call returned first and the same calldata rendered differently between decodes. The tree budget is now partitioned before the workers start, the same way the node budget already was, with ties to source order. - A Timelock batch whose targets, values and payloads disagree in length cannot execute, so it decodes to no calls and says it would revert rather than inventing an empty call for each missing payload. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a9a695204
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…hild its parameter share back Two follow-ups from a regression pass over yesterday's decoder commits: - The params section was gated on the retained rows, so a call whose every input the budget dropped rendered no params and no note, claiming it takes no arguments, and its signature read `transfer (, +3 more)`. The note now shows whenever it exists and the argument list joins its parts. - The reclaim pass re-decoded a child with the parameter budget its first attempt had already spent, so the replacement had more calls and fewer arguments than the tree it discarded. The retry now starts from the child's own share again, as it already did for nodes, and hands its leftovers back the same way. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cf55588ae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Standalone tool: SectionTitle header with the braces icon, new page description, ABI source behind Automatic / Contract address / Custom ABI tabs with the calldata pinned above them, chain picker in the card header, Paste and Clear as design-system ghost buttons, Paste hidden where the clipboard cannot be read and its failure surfaced, copy link moved into the result card, and the Decoded | Raw toggle dropped on the tool only. Decoded card: uppercase mono labels that stack above the value on phones, Base/Regular content everywhere hex and signatures used to be mono, type chips as outline status badges (TypeChip deleted), the six Safe execution parameters folded behind one line, operation shown as `1 · delegatecall` with an Elevated permission badge, nested calls as chevron rows with token and DAO icons, and copy as the design-system copy control. Identity chips resolve curated tokens and DAO governor / timelock / token contracts offline, so USDC gets a token logo and ENS contracts the DAO logo instead of an ENS identicon. Engine: Governor propose (OpenZeppelin and Bravo) is unpacked into one action per target with a "Submits a proposal with N actions" summary, the card hides the parallel arrays the action list already spells out, and the maximum uint256 amount reads as "unlimited". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A batch that unpacked nothing, or not everything, keeps its parallel arrays in view, since the would-revert and budget warnings point at them. An address that arrived in a permalink survives a trip through the Automatic tab, and the Custom ABI tab takes the contract address so a pasted ABI can be scoped to it again. Embedded cards carry the ABI-source badge, the contract link and Copy raw in a meta row. A Safe transaction cut short by the parameter budget keeps its operation row; a failed token logo is remembered per URL, not per slot; NFT DAO tokens are named by the DAO's display name; the collapsed action row announces its state; and Bravo signatures are hashed exactly as the governor stores them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2248250f8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Batch summaries group their calls by kind and count them ("3 unlimited
approvals, 1 role grant") instead of listing function names. AccessControl
role hashes resolve to their names, so grantRole and revokeRole read as
"Grants the PROPOSER_ROLE role to 0x…", and the three role functions decode
without an ABI. Token amounts annotate the raw units and the decimals they
were read with, so 1e21 units of USDC cannot pass for 1,000.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f00f6bff4a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
approve and transferFrom decoded from the canonical table or a signature database no longer claim a fungible amount until the target's decimals are known: the sentence names units that may be an ERC-20 amount or a token id. A Safe operation outside call and delegatecall yields no child and a would-revert warning. Governor Bravo signatures are hashed verbatim, as the governor does, instead of parsed and canonicalised. An invalid ABI file clears the previously applied ABI instead of leaving it live behind an error. Word-guessed parameters spend the shared tree budget like decoded ones, the folded remainder included. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…BI sources An address that arrives in the URL while the decoder is mounted opens the Contract address tab, so Back/Forward between permalinks decodes with the ABI the link names. The EOA tag only shows on mainnet, the one chain the enrichment service reads code on. A verified-ABI or OpenChain lookup that runs to its timeout latches that source closed for a minute, so a batch of children on distinct unverified contracts falls through to the next tier at once instead of waiting out one timeout wave per four children. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b97c033426
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…in its sentence The outage latch tripped on elapsed time alone, so a slow but successful Etherscan answer closed the verified tier for a minute, for every chain, and skipped even memoized ABIs. It now latches only on a slow AND empty network answer, lifts only on a prompt non-empty one, serves settled memoized entries before consulting the latch, and never waits on a request that was already in flight when it closed. A wrapper that borrows its single child's sentence now says the ETH that child carries, once. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 032d62cab9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Implements the technical decoder from the Calldata Visualization PRD (ClickUp DEV-1159 / 86aje4uvc). The AI summary strip is out of scope and will ship separately.
What this adds
Decode engine (
shared/services/decoder/, pure TS, 71 unit tests)DecodedCall/DecodedParam) instead of the old formatted string.arg0..argNwith a permanent warning. Never a blank state; raw hex is preserved on every path.execTransaction(delegatecall flagged), Multicall3aggregate/aggregate3/tryAggregate, OZ Timelockschedule/scheduleBatch/execute/executeBatch, Governorrelay. Depth capped at 5 with node/size budgets.Proposal Actions tab
decoded ✓,ABI · VERIFIED|UPLOADED|OPENCHAIN), summary row, identity chips for every address (replaces the regexCalldataWithEns), aligned type chips, humanized-first values with raw annotations, nested subcall cards,decoded | rawtoggle and copy on every card.[+] [chip] sentence · signature), remembered per session, deep-linkable via?tab=actions#action-2. Calldata-shapedbytesparams get a lazy[+ decode].Standalone tool
/tools/decoder(sidebar entry, desktop + mobile): paste calldata, optional target + chain, paste/upload ABI. Decode state lives in the URL for permalinks (the custom ABI intentionally does not).Refactors
fetchAbi->fetchVerifiedAbi,parseAbiStrict,parseAbiJson,paramShape(from argTree),SUGGESTED_TRANSFER_TOKENS, bundled-ABI lookup.useDecodeCalldatadeleted.Verification
pnpm dashboard typecheck,lint(0 errors) andtest(638 passed) green.execTransactionunpacked toswapOwnervia OpenChain, identity chips resolving ENS names, collapsed-row sentences, decoded|raw toggle, and the standalone page decoding a USDC transfer from a permalink.Known v1 limitations (per plan)
🤖 Generated with Claude Code