Skip to content

Feat/tx captain - #13

Open
Timidan wants to merge 16 commits into
masterfrom
feat/tx-captain
Open

Feat/tx captain#13
Timidan wants to merge 16 commits into
masterfrom
feat/tx-captain

Conversation

@Timidan

Copy link
Copy Markdown
Owner

No description provided.

Timidanand others added 13 commits April 15, 2026 17:06
Refactor and optimize code structure across multiple components
Adds .gitmodules pointing edb at github.com/Timidan/edb-extended
branch `toolkit` and bumps the submodule to f98f2a1 (Heimdall installer).
This is the branch all edb binaries are built from.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pulls edb-extended toolkit @ ca0ca6b, which adds the
/heimdall/{version,decompile,dump} bridge endpoints the Tx-Captain
deep-dive flow consumes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ct generation
- Added LLM transaction analysis functionality in `llm.ts` with structured JSON verdicts.
- Introduced markdown conversion for verdicts in `markdown.ts`.
- Created normalization logic for verdict labels and structures in `normalizeVerdict.ts`.
- Implemented heuristic application for evidence packets in `sieve.ts`.
- Added source code sanitization for Solidity files in `sourceSanitizer.ts`.
- Defined types and schemas for evidence packets and verdicts in `types.ts`.
- Enhanced Vite configuration to support LLM invocation and proxying.
Pulls in the EDB debug improvements (useDebugEvaluation,
evalSnapshotResolver), api/edb rename to api/edb-proxy, and removes
the unused src/chains/index.ts module.
Conflict resolution:
- package.json: union of deps (keep cofhe/sdk, dynamic-labs, add monaco-editor)
- vite.config.ts: take fix/debug's comment (edb-proxy filename)
- package-lock.json: regenerated via npm install
- .codex: dropped (tracked empty blob from fix/debug)
Pre-existing TS error in useHackTriage.ts:151 is unrelated to this
merge (file is tx-captain-only; fix/debug does not touch it).
CopilotAI review requested due to automatic review settings April 21, 2026 01:28
@vercel

vercelBot commented Apr 21, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
web3-toolkitReadyReadyPreview, CommentApr 21, 2026 5:01am

@cofhe/sdk's PermitUtils.isValid returns { valid, error }, not
{ success }. The wrong property name slipped through local typecheck
and broke Vercel's npm run build.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new “TxCaptain” transaction analysis workflow (LLM-backed verdicts + hack triage + deep-dive source/context), adds Heimdall-powered heuristic storage-layout fallback, and updates the app’s settings/UX and bridge/proxy plumbing to support these features.

Changes:

  • Add tx-analysis + hack-analysis modules (heuristics, LLM prompts/schema plumbing, analog retrieval, fixtures, incident library).
  • Add Heimdall bridge + client hooks and use it to synthesize “heuristic” storage layouts when verified/reconstructed layouts aren’t available.
  • Add app-level LLM configuration/consent gating + Settings modal; wire “Summarize” entrypoint from simulation results into a new Builder “analysis” mode.

Reviewed changes

Copilot reviewed 198 out of 201 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
vercel.jsonAdds rewrites to route /api/edb/* through a proxy handler.
src/utils/tx-analysis/sourceSanitizer.tsAdds Solidity source sanitization before LLM deep-dive.
src/utils/tx-analysis/sieve.tsAdds heuristic hit generation over extracted evidence packets.
src/utils/tx-analysis/markdown.tsAdds markdown rendering for verdicts.
src/utils/tx-analysis/llm.tsAdds LLM prompt + invocation helpers and prompt hashing for tx analysis.
src/utils/tx-analysis/deepDive.tsAdds deep-dive source fetching (verified + heimdall fallback).
src/utils/traceDecoder/jumpAnalysis.tsComment-only compaction.
src/utils/traceDecoder/callHierarchy.tsComment-only compaction.
src/utils/traceDecoder/analysisHelpers.tsComment-only compaction.
src/utils/solidity-layout/types.tsExtends reconstruction confidence to include heuristic.
src/utils/solidity-layout/allocatorTypeHelpers.tsComment-only compaction.
src/utils/simulationArtifacts.tsMoves ensureArray to a shared types/helpers module.
src/utils/simulationArtifactTypes.tsAdds ensureArray helper alongside artifact types.
src/utils/resolver/types.tsNarrows resolver source types/configs (drops unimplemented sources).
src/utils/resolver/proxyResolver.tsCentralizes ZERO_ADDRESS usage via shared constants.
src/utils/resolver/contractContext.tsCentralizes ZERO_ADDRESS usage via shared constants.
src/utils/resolver/ContractResolver.tsRemoves dead/placeholder resolver branches for unimplemented sources.
src/utils/llm/types.tsAdds shared LLM request/response/error typing.
src/utils/llm/streamParser.tsAdds SSE chunk parsers for Anthropic/OpenAI/Gemini streaming.
src/utils/heuristic-layout/heuristicLayout.tsAdds Heimdall dump/decompile-based heuristic storage layout synthesizer.
src/utils/heuristic-layout/abiLabelExtractor.tsExtracts ABI-based label/type hints for heuristic layouts.
src/utils/heimdall/useHeimdallAvailability.tsAdds a small hook to detect Heimdall availability/version.
src/utils/heimdall/types.tsAdds Zod schemas + types for Heimdall bridge payloads.
src/utils/heimdall/hooks.tsAdds react-query hooks for Heimdall endpoints.
src/utils/heimdall/heimdallApi.tsAdds client API wrapper with schema validation + typed errors.
src/utils/hack-analysis/triage/cofhe.tsAdds CoFHE triage bit packing helpers + label mapping.
src/utils/hack-analysis/retrieval.tsAdds analog incident retrieval/scoring.
src/utils/hack-analysis/llm.tsAdds hack post-mortem LLM prompt + validation/cleanup of LLM references.
src/utils/hack-analysis/incidents/team-finance-2022-10.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/ronin-2022-03.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/radiant-2024-10.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/qubit-2022-01.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/platypus-2023-02.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/penpie-2024-09.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/orbit-bridge-2024-01.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/multichain-2023-07.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/ledger-connect-2023-12.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/kyberswap-elastic-2023-11.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/bybit-2025-02.jsonAdds incident corpus entry.
src/utils/hack-analysis/incidents/index.tsAdds incident loader + schema/cross-ref validation.
src/utils/hack-analysis/incidents/README.mdDocuments incident library format and validation steps.
src/utils/hack-analysis/fixtures/signer-compromise-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/reentrancy-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/oracle-manipulation-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/math-invariant-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/governance-takeover-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/flashloan-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/delegatecall-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/bridge-forgery-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/benign-vault-deposit.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/approval-drain-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/hack-analysis/fixtures/access-control-fixture.tsAdds fixture evidence packet for testing/validation.
src/utils/edbTraceConverter.tsUpdates to import ensureArray from the new shared module.
src/utils/cache/sourcifyCache.tsRemoves outdated doc reference to a legacy fetcher.
src/utils/addressConstants.tsAdds shared address constants + isNativeToken.
src/types/index.tsRefactors types exports to new chain.ts/abi.ts modules.
src/types/contractInfo.tsUpdates Chain import path and source union.
src/types/chain.tsAdds extracted Chain/explorer types.
src/types/abi.tsAdds extracted ABI fetch result types.
src/services/TxAnalysisStore.tsAdds IndexedDB persistence for tx analysis results with sanitization.
src/services/DebugBridgeService.tsAdds sparse snapshot metadata fetch helper with bounded concurrency.
src/main.tsxWires LlmConfigProvider into app bootstrap.
src/hooks/useLlmConsent.tsAdds hook to acknowledge LLM consent.
src/hooks/useContractInputs.tsSimplifies async calldata generation error handling.
src/contexts/debug/useDebugPrep.tsImproves error messaging when live debug session is evicted.
src/contexts/debug/debugHelpers.tsRemoves re-exports from structStorageDecoding (cleanup).
src/contexts/SimulationContext.tsxAdds analysisSubject state for TxCaptain analysis routing.
src/contexts/LlmConsentGateContext.tsxAdds async consent gate provider/context + modal wiring.
src/contexts/LlmConfigContext.tsxAdds LLM config context backed by localStorage manager.
src/config/llmConfig.tsAdds persistent LLM config manager (providers/models/keys/consent).
src/components/tx-analysis/useHackAnalysis.tsAdds hook for classify → retrieve analogs → run hack-analysis LLM.
src/components/tx-analysis/VerdictCard.tsxAdds UI card for tx verdict display.
src/components/tx-analysis/SummarizeButton.tsxAdds “Summarize with Tx Captain” button component.
src/components/tx-analysis/EvidenceList.tsxAdds UI for displaying evidence packet sections.
src/components/tx-analysis/DeepDiveDrawer.tsxAdds UI drawer for deep-dive output.
src/components/simulation-results/useSimulationPageState.tsFixes first-click debugger open for “ready but not connected” sessions.
src/components/simulation-results/useSimulationPageHelpers.tsComment-only compaction.
src/components/simulation-results/ResultsHeader.tsxAdds optional summarize button in results header.
src/components/simple-grid/utils.tsSimplifies JSON stringify fallback handling.
src/components/simple-grid/types.tsRemoves outdated extraction note in comment.
src/components/simple-grid/tokenDetection.tsRemoves outdated extraction note in comment.
src/components/simple-grid/layout/OverridesSidebar.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/FunctionTypeSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/FunctionSelectSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/FunctionSearchSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/FunctionResultSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/FunctionParamsSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/ExecutionSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/DiamondPopup.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/ContractPreviewCard.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/ContractInfoCard.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/ContractColumn.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/CalldataSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/layout/AbiUploadSection.tsxRemoves outdated extraction note in comment.
src/components/simple-grid/hooks/useWalletHelpers.tsComment-only compaction.
src/components/simple-grid/hooks/useTokenState.tsComment-only compaction.
src/components/simple-grid/hooks/useSimulationState.tsxComment-only compaction.
src/components/simple-grid/hooks/useSharedEffects.tsComment-only cleanup.
src/components/simple-grid/hooks/useRestorationEffects.tsComment-only cleanup.
src/components/simple-grid/hooks/useFunctionState.tsComment-only compaction.
src/components/simple-grid/hooks/useDiamondState.tsComment-only compaction.
src/components/simple-grid/hooks/useContractState.tsComment-only compaction.
src/components/simple-grid/buildGridContextValue.tsComment-only cleanup.
src/components/simple-grid/GridContext.tsxRemoves blockscout-ebd from ABI source union.
src/components/shared/AddressDisplay.tsxCentralizes ZERO_ADDRESS import via shared constants.
src/components/llm/LlmDestinationChip.tsxAdds UI chip describing LLM destination/mode/cache-sharing.
src/components/llm/LlmConsentModal.tsxAdds consent modal describing what data is sent to LLMs.
src/components/integrations/lifi-earn/txUtils.tsReuses shared address shortening + native token detection.
src/components/integrations/lifi-earn/hooks/useTokenBalance.tsUses shared isNativeToken helper.
src/components/integrations/lifi-earn/concierge/intent/IntentPanel.tsxWires LLM invocation/config into multi-asset recommendations query key.
src/components/integrations/lifi-earn/concierge/hooks/useIdleBalances.tsUses shared native token detection and MULTICALL3 constant.
src/components/integrations/lifi-earn/concierge/hooks/fetchAssetPrices.tsUses shared native token detection.
src/components/integrations/lifi-earn/VaultList.tsxReuses shared address shortening.
src/components/integrations/lifi-earn/LifiEarnPage.tsxReuses shared address shortening.
src/components/integrations/lifi-earn/DepositFlow.tsxRemoves unnecessary try/catch around deterministic arithmetic.
src/components/explorer/useStorageViewerState.tsThreads Heimdall heuristic tier option into layout fetching.
src/components/explorer/storage-viewer/useStorageEvidence.tsExtends params to accept Heimdall options into layout fetch.
src/components/explorer/storage-viewer/fetchStorageLayout.tsAdds Heimdall heuristic fallback layout tier + confidence updates.
src/components/explorer/storage-viewer/HeuristicLayoutBanner.tsxAdds UI warning banner for heuristic layouts.
src/components/explorer/StorageToolbar.tsxAdds UI handling for heuristic confidence styling/label.
src/components/explorer/StorageLayoutViewer.tsxShows heuristic banner when confidence is heuristic.
src/components/execution-trace/traceFrameHelpers.tsComment-only compaction.
src/components/execution-trace/traceAddressMaps.tsComment-only compaction.
src/components/debug/EvaluateModal.tsxIncreases evaluation timeout.
src/components/contract/ContractAddressInput.tsxRemoves blockscout-ebd from ABI source union.
src/components/UniversalSearchBar.tsxRenames RPC settings action to general “Settings” and expands keywords.
src/components/TransactionBuilderHub.tsxAdds “analysis” mode and lazy-loads TxAnalysisPanel.
src/components/TopBar.tsxRenames RPC settings affordance to general settings and updates wiring.
src/components/TokenMovementsPanel.tsxCentralizes ZERO_ADDRESS import via shared constants.
src/components/SimulationResultsPage.tsxAdds “Summarize” action to route into builder analysis mode via context.
src/components/SettingsModal.tsxAdds combined Network + LLM settings modal.
src/components/Navigation.tsxAdds “Analysis” sub-tab in tool navigation.
src/components/ExecutionStackTrace.tsxUses extracted token movements, controlled accordion open state, and correct counts.
src/chains/index.tsRemoves redundant re-export file.
src/App.tsxWires new SettingsModal, consent gate provider, and tx-summary samples route.
src/App.cssRenames settings trigger CSS class.
scripts/smoke-heimdall.mjsAdds Heimdall manual smoke-test script.
scripts/simulator-bridge.mjsAdds /heimdall/* endpoint routing + logs.
scripts/heimdall-runner.mjsAdds subprocess runner with timeout + error classification.
scripts/heimdall-cache.mjsAdds simple LRU cache with TTL for Heimdall outputs.
scripts/bridge-config.mjsAdds Heimdall configuration + chain RPC allowlist and URL hardening.
index.htmlUpdates CSP to allow new endpoints/frames used by features.
fhe/tsconfig.jsonAdds isolated TS config for the FHE Hardhat workspace.
fhe/scripts/deployRiskThrottle.tsAdds deployment script for RiskThrottle.
fhe/scripts/deploy-triage.tsAdds deployment script for HackTriage.
fhe/package.jsonAdds FHE workspace package metadata/scripts/deps.
fhe/hardhat.config.tsAdds Hardhat config for Sepolia + CoFHE toolchain.
fhe/deployments/throttle-sepolia.jsonAdds recorded deployment addresses/metadata.
fhe/deployments/sepolia.jsonAdds recorded deployment addresses/metadata.
fhe/contracts/RiskThrottle.solAdds CoFHE contract mapping severity → encrypted throttle status.
fhe/contracts/HackTriage.solAdds CoFHE contract performing encrypted rule-based triage.
fhe/README.mdDocuments the isolated FHE workflow and commands.
fhe/.gitignoreIgnores Hardhat build artifacts and secrets for the FHE workspace.
api/edb-proxy.tsUpdates EDB proxy routing to use rewrite-populated path query param.
api/_llm/guardHeaders.tsAdds fail-closed request guard for LLM proxy endpoints.
api/_llm/allowlist.tsAdds provider/path allowlist + base URL resolution for LLM proxying.
.gitmodulesAdds edb submodule configuration.
.gitignoreIgnores root pnpm-lock.yaml to avoid Vercel package-manager confusion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadfhe/package.json
"compile": "hardhat compile",
"clean": "rimraf ./artifacts ./cache ./typechain-types",
"test": "hardhat test --network sepolia",
"deploy:triage": "hardhat run scripts/deployHackTriage.ts --network sepolia",
Comment thread.gitmodules
@@ -0,0 +1,4 @@
[submodule "edb"]
path = edb
url = git@github.com:Timidan/edb-extended.git
Comment on lines +43 to +45
<strong>The free Gemini 3.1 Pro Preview default</strong> routes through hexkit&apos;s proxy; by using it you
agree that resulting reports may be cached and shown to other hexkit users.
</p>

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:3e3c1a65a8

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadapi/llm-invoke.ts
Comment on lines +18 to +20
const ALLOWED_ORIGINS = new Set(
(process.env.ALLOWED_ORIGINS || "").split(",").filter(Boolean),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Trim ALLOWED_ORIGINS entries before origin matching

ALLOWED_ORIGINS is parsed with split(",") but never trimmed, so a common env format like "https://app.example.com, https://preview.example.com" stores the second origin with a leading space and causes legitimate browser requests to be rejected as origin_not_allowed (403). This check runs before checkRequestGuards, so the later trimmed parsing there does not save the request.

Useful? React with 👍 / 👎.

Comment on lines +69 to +73
<button
type="button"
className="text-xs underline text-muted-foreground hover:text-foreground"
onClick={() => setDraft({ ...draft, defaultProvider: p })}
>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Block selecting custom as default LLM provider

The settings UI allows custom to be set as the default provider, but useLlmInvocation explicitly throws unauthorized_endpoint for custom, so tx-analysis requests fail immediately for users who pick that default. This creates a deterministic broken configuration from the primary settings flow.

Useful? React with 👍 / 👎.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces the “TxCaptain” transaction/hack analysis capabilities (LLM-backed), adds Heimdall-powered heuristic storage-layout fallback, and wires supporting infra (EDB proxy rewrite, settings/consent UX, and an isolated fhe/ Hardhat workspace for CoFHE contracts).

Changes:

  • Add LLM configuration + consent gating, and a new “Analysis” mode entry point from simulation results.
  • Add Heimdall client + bridge endpoints and a heuristic storage-layout synthesis fallback tier.
  • Add hack-analysis incident corpus + retrieval/LLM orchestration and fixtures, plus assorted refactors (constants/types extraction, doc comment trims).

Reviewed changes

Copilot reviewed 198 out of 201 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
vercel.jsonAdd rewrites to route /api/edb/* to edb-proxy handler.
src/utils/tx-analysis/sourceSanitizer.tsNew Solidity source sanitization helper for analysis prompts.
src/utils/tx-analysis/markdown.tsNew Verdict→Markdown renderer.
src/utils/tx-analysis/deepDive.tsNew deep-dive source fetch/sanitize orchestration.
src/utils/traceDecoder/jumpAnalysis.tsDoc comment compacting.
src/utils/traceDecoder/callHierarchy.tsDoc comment compacting.
src/utils/traceDecoder/analysisHelpers.tsDoc comment compacting.
src/utils/solidity-layout/types.tsAdd heuristic confidence option.
src/utils/solidity-layout/allocatorTypeHelpers.tsDoc comment compacting.
src/utils/simulationArtifacts.tsMove ensureArray to shared types module and re-export.
src/utils/simulationArtifactTypes.tsAdd ensureArray helper to shared types module.
src/utils/resolver/types.tsRemove unused resolver sources; trim SOURCE_CONFIGS.
src/utils/resolver/proxyResolver.tsCentralize ZERO_ADDRESS via shared constants.
src/utils/resolver/contractContext.tsCentralize ZERO_ADDRESS via shared constants.
src/utils/resolver/ContractResolver.tsRemove unimplemented resolver source branches.
src/utils/llm/types.tsNew shared LLM request/response/error types.
src/utils/llm/streamParser.tsNew SSE chunk parsers for Anthropic/OpenAI/Gemini streams.
src/utils/heuristic-layout/heuristicLayout.tsNew heuristic storage-layout synthesis from Heimdall dump (+ ABI hints).
src/utils/heuristic-layout/abiLabelExtractor.tsABI hint extraction for heuristic labels/types.
src/utils/heimdall/useHeimdallAvailability.tsHook to detect Heimdall availability/version.
src/utils/heimdall/types.tsZod schemas + types for Heimdall API payloads.
src/utils/heimdall/hooks.tsReact Query hooks for Heimdall endpoints.
src/utils/heimdall/heimdallApi.tsClient API wrapper for Heimdall bridge endpoints.
src/utils/hack-analysis/triage/cofhe.tsCoFHE triage feature packing + class label mapping.
src/utils/hack-analysis/retrieval.tsAnalog incident retrieval by label overlap.
src/utils/hack-analysis/llm.tsHack-analysis LLM prompt + validation/cleanup of references.
src/utils/hack-analysis/incidents/team-finance-2022-10.jsonAdd incident entry.
src/utils/hack-analysis/incidents/ronin-2022-03.jsonAdd incident entry.
src/utils/hack-analysis/incidents/radiant-2024-10.jsonAdd incident entry.
src/utils/hack-analysis/incidents/qubit-2022-01.jsonAdd incident entry.
src/utils/hack-analysis/incidents/platypus-2023-02.jsonAdd incident entry.
src/utils/hack-analysis/incidents/penpie-2024-09.jsonAdd incident entry.
src/utils/hack-analysis/incidents/orbit-bridge-2024-01.jsonAdd incident entry.
src/utils/hack-analysis/incidents/nomad-2022-08.jsonAdd incident entry.
src/utils/hack-analysis/incidents/multichain-2023-07.jsonAdd incident entry.
src/utils/hack-analysis/incidents/ledger-connect-2023-12.jsonAdd incident entry.
src/utils/hack-analysis/incidents/kyberswap-elastic-2023-11.jsonAdd incident entry.
src/utils/hack-analysis/incidents/index.tsLoader/validator for incident JSON corpus.
src/utils/hack-analysis/incidents/bybit-2025-02.jsonAdd incident entry.
src/utils/hack-analysis/incidents/README.mdDocument incident corpus format + validation rules.
src/utils/hack-analysis/fixtures/signer-compromise-fixture.tsAdd classifier/LLM fixture.
src/utils/hack-analysis/fixtures/reentrancy-fixture.tsAdd classifier/LLM fixture.
src/utils/hack-analysis/fixtures/oracle-manipulation-fixture.tsAdd classifier/LLM fixture.
src/utils/hack-analysis/fixtures/math-invariant-fixture.tsAdd classifier/LLM fixture.
src/utils/hack-analysis/fixtures/governance-takeover-fixture.tsAdd classifier/LLM fixture.
src/utils/hack-analysis/fixtures/flashloan-fixture.tsAdd classifier/LLM fixture.
src/utils/hack-analysis/fixtures/delegatecall-fixture.tsAdd classifier/LLM fixture (+ benign case).
src/utils/hack-analysis/fixtures/bridge-forgery-fixture.tsAdd classifier/LLM fixture (+ benign case).
src/utils/hack-analysis/fixtures/benign-vault-deposit.tsAdd benign fixture.
src/utils/hack-analysis/fixtures/approval-drain-fixture.tsAdd approval-drain + router-swap fixture.
src/utils/hack-analysis/fixtures/access-control-fixture.tsAdd access-control fixture.
src/utils/edbTraceConverter.tsUpdate ensureArray import source.
src/utils/cache/sourcifyCache.tsRemove outdated legacy fetcher mention.
src/utils/addressConstants.tsNew shared address constants + native-token helpers.
src/types/index.tsSplit chain/abi types into dedicated modules; re-export.
src/types/contractInfo.tsUpdate Chain import + trim source union.
src/types/chain.tsNew canonical Chain/Explorer types module.
src/types/abi.tsInline ABIFetchResult into abi module.
src/services/TxAnalysisStore.tsNew IndexedDB-backed store for tx analyses with sanitization.
src/services/DebugBridgeService.tsAdd sparse snapshot metadata fetch helper.
src/main.tsxAdd LlmConfigProvider to app root.
src/hooks/useLlmConsent.tsNew hook to acknowledge consent.
src/hooks/useContractInputs.tsSimplify dynamic ethers import error handling.
src/contexts/debug/useDebugPrep.tsImprove error state when live session is evicted mid-connect.
src/contexts/debug/debugHelpers.tsRemove re-exports (structStorageDecoding) from this module.
src/contexts/SimulationContext.tsxAdd analysisSubject state for Tx analysis routing.
src/contexts/LlmConsentGateContext.tsxNew consent gate provider/context.
src/contexts/LlmConfigContext.tsxNew LLM config context tied to localStorage manager.
src/config/llmConfig.tsNew localStorage-backed LLM config manager + defaults.
src/components/tx-analysis/useHackAnalysis.tsNew hook to classify/retrieve/invoke hack-analysis.
src/components/tx-analysis/VerdictCard.tsxNew verdict summary UI card.
src/components/tx-analysis/SummarizeButton.tsxAdd “Summarize transaction” UI trigger.
src/components/tx-analysis/EvidenceList.tsxNew evidence packet display component.
src/components/tx-analysis/DeepDiveDrawer.tsxNew deep-dive display drawer.
src/components/simulation-results/useSimulationPageState.tsImprove open-debug flow when prep auto-connect still in flight.
src/components/simulation-results/useSimulationPageHelpers.tsDoc comment compacting.
src/components/simulation-results/ResultsHeader.tsxAdd Summarize button plumbing.
src/components/simple-grid/utils.tsSimplify stringify fallback.
src/components/simple-grid/types.tsRemove outdated extraction note.
src/components/simple-grid/tokenDetection.tsRemove outdated extraction note.
src/components/simple-grid/layout/OverridesSidebar.tsxRemove outdated extraction note.
src/components/simple-grid/layout/FunctionTypeSection.tsxRemove outdated extraction note.
src/components/simple-grid/layout/FunctionSelectSection.tsxRemove outdated extraction note.
src/components/simple-grid/layout/FunctionSearchSection.tsxRemove outdated extraction note.
src/components/simple-grid/layout/FunctionResultSection.tsxRemove outdated extraction note.
src/components/simple-grid/layout/FunctionParamsSection.tsxRemove outdated extraction note.
src/components/simple-grid/layout/ExecutionSection.tsxRemove outdated extraction note.
src/components/simple-grid/layout/DiamondPopup.tsxRemove outdated extraction note.
src/components/simple-grid/layout/ContractPreviewCard.tsxRemove outdated extraction note.
src/components/simple-grid/layout/ContractInfoCard.tsxRemove outdated extraction note.
src/components/simple-grid/layout/ContractColumn.tsxRemove outdated extraction note.
src/components/simple-grid/layout/CalldataSection.tsxRemove outdated extraction note.
src/components/simple-grid/layout/AbiUploadSection.tsxRemove outdated extraction note.
src/components/simple-grid/hooks/useWalletHelpers.tsDoc comment compacting.
src/components/simple-grid/hooks/useTokenState.tsDoc comment compacting.
src/components/simple-grid/hooks/useSimulationState.tsxDoc comment compacting.
src/components/simple-grid/hooks/useSharedEffects.tsDoc comment compacting.
src/components/simple-grid/hooks/useRestorationEffects.tsDoc comment compacting.
src/components/simple-grid/hooks/useFunctionState.tsDoc comment compacting.
src/components/simple-grid/hooks/useDiamondState.tsDoc comment compacting.
src/components/simple-grid/hooks/useContractState.tsDoc comment compacting.
src/components/simple-grid/buildGridContextValue.tsRemove outdated extraction note.
src/components/simple-grid/GridContext.tsxRemove blockscout-ebd abi source type.
src/components/shared/AddressDisplay.tsxCentralize ZERO_ADDRESS via shared constants.
src/components/llm/LlmDestinationChip.tsxNew chip indicating LLM destination/BYOK/cache-sharing.
src/components/llm/LlmConsentModal.tsxNew LLM consent modal copy + acknowledge flow.
src/components/integrations/lifi-earn/txUtils.tsReuse shared address + native-token helpers.
src/components/integrations/lifi-earn/hooks/useTokenBalance.tsUse shared native-token helper.
src/components/integrations/lifi-earn/concierge/intent/IntentPanel.tsxThread LLM invoke/model into multi-asset recommendations query.
src/components/integrations/lifi-earn/concierge/hooks/useIdleBalances.tsUse shared native-token + Multicall3 constants.
src/components/integrations/lifi-earn/concierge/hooks/fetchAssetPrices.tsUse shared native-token helper.
src/components/integrations/lifi-earn/VaultList.tsxUse shared address truncation helper.
src/components/integrations/lifi-earn/LifiEarnPage.tsxUse shared address truncation helper.
src/components/integrations/lifi-earn/DepositFlow.tsxRemove empty try/catch around deterministic parsing.
src/components/explorer/useStorageViewerState.tsWire Heimdall heuristic tier into storage layout fetch options.
src/components/explorer/storage-viewer/useStorageEvidence.tsThread Heimdall options into fetchStorageLayout call.
src/components/explorer/storage-viewer/fetchStorageLayout.tsAdd heuristic Heimdall tier + confidence updates.
src/components/explorer/storage-viewer/HeuristicLayoutBanner.tsxAdd UI warning banner for heuristic layouts.
src/components/explorer/StorageToolbar.tsxDisplay heuristic confidence styling + tooltip.
src/components/explorer/StorageLayoutViewer.tsxShow heuristic warning banner with dismiss behavior.
src/components/execution-trace/traceFrameHelpers.tsDoc comment compacting.
src/components/execution-trace/traceAddressMaps.tsDoc comment compacting.
src/components/debug/EvaluateModal.tsxIncrease evaluation timeout.
src/components/contract/ContractAddressInput.tsxRemove blockscout-ebd abi source option.
src/components/UniversalSearchBar.tsxRename open-settings callback; broaden settings keywords.
src/components/TransactionBuilderHub.tsxAdd new builder mode “analysis” + lazy-load TxAnalysisPanel.
src/components/TopBar.tsxRename RPC settings trigger to general settings trigger.
src/components/TokenMovementsPanel.tsxCentralize ZERO_ADDRESS usage (via addressConstants).
src/components/SimulationResultsPage.tsxAdd summarize handler → route to analysis mode and set subject.
src/components/SettingsModal.tsxNew combined Settings modal with Network + LLM tabs.
src/components/Navigation.tsxAdd “Analysis” sub-tab in navigation.
src/components/ExecutionStackTrace.tsxOnly show token movements section when real token transfers exist; controlled accordion state.
src/chains/index.tsRemove unused re-export barrel.
src/App.tsxIntegrate settings modal + consent gate + samples route.
src/App.cssRename settings trigger CSS class.
scripts/smoke-heimdall.mjsAdd Heimdall smoke-test script.
scripts/simulator-bridge.mjsRoute /heimdall/* endpoints to heimdall handler.
scripts/heimdall-runner.mjsAdd subprocess runner with timeout + typed errors.
scripts/heimdall-cache.mjsAdd small LRU cache helper for Heimdall results.
scripts/bridge-config.mjsAdd Heimdall config + server-side RPC allowlist/SSRF defenses.
package.jsonAdd dependencies for CoFHE + shared storage; adjust dev deps.
index.htmlUpdate CSP connect-src/frame-src for new integrations.
fhe/tsconfig.jsonNew isolated TS config for fhe/ workspace.
fhe/scripts/deployRiskThrottle.tsDeployment script for RiskThrottle.
fhe/scripts/deploy-triage.tsDeployment script for HackTriage.
fhe/package.jsonNew isolated Hardhat workspace package config.
fhe/hardhat.config.tsHardhat config (Sepolia + CoFHE).
fhe/deployments/throttle-sepolia.jsonDeployment record.
fhe/deployments/sepolia.jsonDeployment record.
fhe/contracts/RiskThrottle.solNew CoFHE throttle contract.
fhe/contracts/HackTriage.solNew CoFHE triage contract.
fhe/README.mdDocument fhe/ workspace usage.
fhe/.gitignoreIgnore fhe/ workspace build artifacts + secrets.
api/edb-proxy.tsUpdate EDB proxy path extraction for new rewrite-based routing.
api/_llm/guardHeaders.tsAdd fail-closed origin/proxy-secret guard helpers.
api/_llm/allowlist.tsAdd provider base URLs + path allowlist resolution helpers.
.gitmodulesAdd edb submodule reference.
.gitignoreIgnore root pnpm lockfile to avoid Vercel package-manager confusion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +44 to +45
export { ensureArray } from "./simulationArtifactTypes";
import { ensureArray } from "./simulationArtifactTypes";
Comment on lines +25 to +26
const [tab, setTab] = useState<"network" | "llm">(initialTab);

Comment on lines +547 to +551
const snapshots: SnapshotListItem[] = allResults
.filter(
(r): r is PromiseFulfilledResult<{ id: number; value: unknown }> =>
r.status === 'fulfilled' && r.value !== null,
)
Comment threadindex.html
<script src="/error-handler.js"></script>
<meta charset="UTF-8" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data: https: blob:; connect-src 'self' https://*.alchemy.com https://*.infura.io https://*.etherscan.io https://*.basescan.org https://*.polygonscan.com https://*.arbiscan.io https://*.bscscan.com https://*.blockscout.com https://sourcify.dev https://repo.sourcify.dev https://eth-bytecode-db.services.blockscout.com https://api.openchain.xyz https://www.4byte.directory https://coins.llama.fi https://cdn.jsdelivr.net https://cca-lite.coinbase.com https://*.coinbase.com https://*.publicnode.com https://polygon-rpc.com https://*.arbitrum.io https://*.optimism.io https://*.base.org https://api.avax.network https://*.binance.org https://rpc.gnosischain.com https://*.polygon.technology https://*.ethpandaops.io https://*.blastapi.io https://*.lisk.com https://*.thirdweb.com https://*.drpc.org https://*.tenderly.co https://rpc.scroll.io https://rpc.linea.build https://rpc.mantle.xyz https://rpc.blast.io https://rpc.berachain.com https://rpc.soniclabs.com https://rpc.frax.com https://opbnb-mainnet-rpc.bnbchain.org https://rpc.api.moonbeam.network https://evm-rpc.sei-apis.com https://rpc.mainnet.taiko.xyz https://rpc.soneium.org https://rpc.fuse.io https://api.roninchain.com https://rpc-quicknode.morphl2.io https://rpc.immutable.com https://flare-api.flare.network https://rpc.lens.xyz https://rpc.xdcscan.com https://rpc.viction.xyz https://rpc.gobob.xyz https://rpc-gel.inkonchain.com https://rpc.hemi.network https://rpc.gravity.xyz https://rpc.vana.org https://rpc.corn.fun https://rpc.sophon.xyz https://rpc.plasma.build https://rpc.stable.xyz https://rpc.plume.org https://rpc.tempo.xyz https://rpc.hyperliquid.xyz https://rpc.monad.xyz https://rpc.katana.farm https://rpc.superposition.so https://mainnet.unichain.org https://forno.celo.org https://evm.cronos.org https://mainnet.era.zksync.io https://mainnet.mode.network https://mainnet.boba.network https://andromeda.metis.io https://apechain.calderachain.xyz https://swell-mainnet.alt.technology https://api.mainnet.abs.xyz https://public-node.rsk.co https://mainnet.evm.nodes.onflow.org https://public-en.node.kaia.io https://mainnet.telos.net https://node.mainnet.etherlink.com https://sepolia.optimism.io https://sepolia.base.org https://polygon-amoy.gateway.tenderly.co https://*.vercel.app https://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.com wss://*.walletconnect.org ws://localhost:* http://localhost:* http://127.0.0.1:* https://web3-toolkit.vercel.app; frame-src 'self' https://*.walletconnect.com https://*.walletconnect.org; worker-src 'self' blob:;" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data: https: blob:; connect-src 'self' https://*.alchemy.com https://*.infura.io https://*.etherscan.io https://*.basescan.org https://*.polygonscan.com https://*.arbiscan.io https://*.bscscan.com https://*.blockscout.com https://sourcify.dev https://repo.sourcify.dev https://eth-bytecode-db.services.blockscout.com https://api.openchain.xyz https://www.4byte.directory https://coins.llama.fi https://cdn.jsdelivr.net https://cca-lite.coinbase.com https://*.coinbase.com https://*.publicnode.com https://polygon-rpc.com https://*.arbitrum.io https://*.optimism.io https://*.base.org https://api.avax.network https://*.binance.org https://rpc.gnosischain.com https://*.polygon.technology https://*.ethpandaops.io https://*.blastapi.io https://*.lisk.com https://*.thirdweb.com https://*.drpc.org https://*.tenderly.co https://rpc.scroll.io https://rpc.linea.build https://rpc.mantle.xyz https://rpc.blast.io https://rpc.berachain.com https://rpc.soniclabs.com https://rpc.frax.com https://opbnb-mainnet-rpc.bnbchain.org https://rpc.api.moonbeam.network https://evm-rpc.sei-apis.com https://rpc.mainnet.taiko.xyz https://rpc.soneium.org https://rpc.immutable.com https://flare-api.flare.network https://rpc.lens.xyz https://rpc.xdcscan.com https://rpc.viction.xyz https://rpc.gobob.xyz https://rpc-gel.inkonchain.com https://rpc.hemi.network https://rpc.gravity.xyz https://rpc.vana.org https://rpc.corn.fun https://rpc.sophon.xyz https://rpc.plasma.build https://rpc.stable.xyz https://rpc.plume.org https://rpc.tempo.xyz https://rpc.hyperliquid.xyz https://rpc.monad.xyz https://rpc.katana.farm https://rpc.superposition.so https://mainnet.unichain.org https://forno.celo.org https://evm.cronos.org https://mainnet.era.zksync.io https://mainnet.mode.network https://mainnet.boba.network https://andromeda.metis.io https://apechain.calderachain.xyz https://swell-mainnet.alt.technology https://api.mainnet.abs.xyz https://public-node.rsk.co https://mainnet.evm.nodes.onflow.org https://public-en.node.kaia.io https://mainnet.telos.net https://node.mainnet.etherlink.com https://sepolia.optimism.io https://sepolia.base.org https://polygon-amoy.gateway.tenderly.co https://*.vercel.app https://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.com wss://*.walletconnect.org https://testnet-cofhe.fhenix.zone https://testnet-cofhe-vrf.fhenix.zone https://testnet-cofhe-tn.fhenix.zone ws://localhost:* http://localhost:* http://127.0.0.1:* https://web3-toolkit.vercel.app; frame-src 'self' https://*.walletconnect.com https://*.walletconnect.org https://iframe-shared-storage.vercel.app; worker-src 'self' blob:;" />
Comment thread.gitmodules
@@ -0,0 +1,4 @@
[submodule "edb"]
path = edb
url = git@github.com:Timidan/edb-extended.git
Comment on lines +43 to +45
<strong>The free Gemini 3.1 Pro Preview default</strong> routes through hexkit&apos;s proxy; by using it you
agree that resulting reports may be cached and shown to other hexkit users.
</p>
Sign up for freeto 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

@Timidan