Skip to content

Add tx analysis#5

Merged
MatiasOS merged 8 commits into
openscan-explorer:mainfrom
MatiasOS:add-tx-analysis
Apr 18, 2026
Merged

Add tx analysis#5
MatiasOS merged 8 commits into
openscan-explorer:mainfrom
MatiasOS:add-tx-analysis

Conversation

@MatiasOS

Copy link
Copy Markdown
Member

Add support for tx analysis

Wraps analyzeTx from @openscan/utils as a LangChain tool so agents can
fetch call trees, prestate/poststate diffs, and contract metadata for a
given tx hash. Exposes CLI-flag parity (includePrestate, includeRawTrace,
skipCallTree, skipContracts, etherscanKey) as Zod fields.

Tool description follows a 3-sentence what/when/when-NOT structure to
disambiguate from get_transaction_history and warn about trace-enabled
RPC requirements — top-level description is load-bearing because some
LangChain provider adapters drop Zod .describe() text
(langchainjs#9099).
…tion

- get_transaction_history: expand description with "use when" + "do NOT
  use" guidance pointing to get_transaction_analysis for single-tx
  analysis, preventing the mirror-image misrouting between the two tools.
- address fields (txHistory, tokenBalance, addressType): add 42-char
  0x-prefixed format hint with a concrete example so the LLM formats
  arguments correctly without hallucinating.
@MatiasOS MatiasOS requested a review from AugustoL April 18, 2026 03:22
@MatiasOS MatiasOS merged commit f0c7470 into openscan-explorer:main Apr 18, 2026
@MatiasOS MatiasOS deleted the add-tx-analysis branch April 18, 2026 03:22
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.

1 participant