Skip to main content

Documentation Index

Fetch the complete documentation index at: https://prism-ddf93e61.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

In this guide, we walk through the process of debugging a failed cross-contract swap.
1

Initial Failure

The transaction fails on mainnet with a generic HostError(Value, InvalidInput).
2

Run Decode

Run prism decode <hash>. Prism identifies that the InvalidInput happened inside the Token contract during a transfer call.
3

Esclate to Trace

Run prism trace <hash>. The hierarchical timeline shows that the swap contract passed a negative amount to the token contract.
4

Root Cause Found

The root cause is a slippage calculation bug in the swap contract that resulted in a negative value under extreme market conditions.