feat: resolve token batch inner instructions in inspector#916
feat: resolve token batch inner instructions in inspector#916askov wants to merge 3 commits intosolana-foundation:masterfrom
Conversation
|
@askov is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR threads compiled inner instructions ( Key changes:
Minor notes:
Confidence Score: 5/5Safe to merge — all remaining findings are P2 style suggestions with no impact on the primary user path. The core feature is correctly implemented and well-tested. The only issues found are P2: the Anchor error-boundary fallback drops inner cards in an already-degraded path, and inner cards are intentionally not forwarded to named-program card types. No runtime errors, data loss, or security concerns were identified. app/components/inspector/InstructionsSection.tsx — Anchor fallback does not forward innerCards; all other files look clean. Important Files Changed
Sequence DiagramsequenceDiagram
participant RPC as Solana RPC
participant Raw as raw.tsx (fetchRawTransaction)
participant Page as InspectorPage (PermalinkView)
participant Section as InstructionsSection
participant Resolve as resolveInnerBatchInstructions
participant Compile as compiledToTransactionInstruction
participant Card as UnknownDetailsCard
RPC-->>Raw: VersionedTransactionResponse (meta.innerInstructions)
Raw-->>Page: Details { raw.meta.innerInstructions }
Page-->>Section: compiledInnerInstructions
Section->>Resolve: compiledInnerInstructions, accountKeys, message
loop for each CompiledInnerInstruction
Resolve->>Compile: CompiledInstruction
Compile-->>Resolve: TransactionInstruction or undefined
end
Resolve-->>Section: Record(parentIndex to TransactionInstruction[])
Section->>Card: innerCards (TokenBatchCard nodes per parent index)
Card-->>Card: auto-expand + render Inner Instructions section
|
06ca009 to
1409230
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
18a63b8 to
c456350
Compare
| } | ||
|
|
||
| return new TransactionInstruction({ | ||
| data: bs58.decode(ix.data), |
There was a problem hiding this comment.
nit: maybe we need a try/catch here. I agree the instruction data from RPC will not likely be in base58, but a manual call to it might trigger an exception
| | Dynamic | `/api/domain-info/[domain]` | 0 B | 0 B | | ||
| | Dynamic | `/api/geo-location` | 0 B | 0 B | | ||
| | Dynamic | `/api/metadata/proxy` | 0 B | 0 B | | ||
| | Static | `/api/metadata/proxy` | 0 B | 0 B | |
There was a problem hiding this comment.
Proxy will be static. That is likely fixed at master
…spector-inner-instructions
Description
Thread compiled inner instructions through the inspector so that token batch CPI calls are decoded and rendered as inner cards on unknown program instructions.
Type of change
Screenshots
Testing
Related Issues
Closes HOO-386
Checklist
build:infoscript to update build information