diff --git a/src/lib/docs-seo-metadata.test.ts b/src/lib/docs-seo-metadata.test.ts index c9d4f9e8..d8cfe7ef 100644 --- a/src/lib/docs-seo-metadata.test.ts +++ b/src/lib/docs-seo-metadata.test.ts @@ -89,7 +89,7 @@ describe('docs SEO metadata', () => { /^seoTitle:/m.test(source) && path.relative(docsRoot, file) !== 'api/reference.mdx', ) - expect(auditedPages).toHaveLength(106) + expect(auditedPages).toHaveLength(107) for (const { file, source } of auditedPages) { const title = frontmatterString(source, 'title') diff --git a/src/pages/docs/ecosystem/block-explorers.mdx b/src/pages/docs/ecosystem/block-explorers.mdx index c76836b4..32f98115 100644 --- a/src/pages/docs/ecosystem/block-explorers.mdx +++ b/src/pages/docs/ecosystem/block-explorers.mdx @@ -12,6 +12,8 @@ View transactions, blocks, accounts, and token activity on Tempo. Tempo's official Mainnet block explorer is available at [explore.tempo.xyz](https://explore.tempo.xyz). View transactions, blocks, accounts, and token activity on the Tempo network. Testnet block explorer is available at [explore.testnet.tempo.xyz](https://explore.testnet.tempo.xyz). For more connection information, see [Connect to the Network](/docs/quickstart/connection-details). +The explorer also includes a [transaction debugger](https://explore.tempo.xyz/simulate) that simulates a transaction without broadcasting it. Follow the [transaction debugging guide](/docs/guide/debug-transactions) to inspect execution traces, balance changes, events, gas use, and revert details. + ## Tenderly [Tenderly](https://tenderly.co) delivers full-stack observability, debugging, and simulation tools for Tempo smart contract development and monitoring. With Tenderly you get real-time error tracking, EVM-level tracing, and off-chain transaction simulation — enabling you to catch bugs, analyze reverts, and inspect gas usage before transactions go live. diff --git a/src/pages/docs/guide/debug-transactions.mdx b/src/pages/docs/guide/debug-transactions.mdx new file mode 100644 index 00000000..9ba17750 --- /dev/null +++ b/src/pages/docs/guide/debug-transactions.mdx @@ -0,0 +1,39 @@ +--- +title: "Simulate and debug Tempo transactions" +seoTitle: "Tempo Transaction Debugger and Simulator | Tempo Docs" +description: Simulate a Tempo transaction before submitting it, then inspect execution traces, balance changes, events, gas use, and revert details. +--- + +# Simulate and debug Tempo transactions + +Use the [Tempo transaction debugger](https://explore.tempo.xyz/simulate) to test a transaction against current Mainnet state without broadcasting it. Simulate a transaction to diagnose reverts or verify a contract interaction. + +:::info[What simulations show] +- **Gas flame graphs** show which calls consume the most gas. +- **State changes** show how balances and contract storage would change. +- **Event logs** show the events the transaction would emit. +- **Call traces** show the transaction's execution path across contracts. +- **Revert errors** identify the call and error that caused a failure. +::: + +## Run a transaction simulation + +:::::steps + +### Enter the transaction + +Open [explore.tempo.xyz/simulate](https://explore.tempo.xyz/simulate), then provide the sender, recipient, value, and calldata. + +### Simulate the transaction + +Run the simulation against current chain state. + +### Inspect the execution + +Review the decoded calls, balance changes, events, execution trace, gas use, and any revert details. + +::::: + +## Diagnose a failed transaction + +Start with the first reverted call in the execution trace. Its decoded error or return data usually identifies the contract and condition that rejected the transaction. diff --git a/src/pages/docs/guide/tempo-transaction/index.mdx b/src/pages/docs/guide/tempo-transaction/index.mdx index 0d7b326c..a7a6aa3d 100644 --- a/src/pages/docs/guide/tempo-transaction/index.mdx +++ b/src/pages/docs/guide/tempo-transaction/index.mdx @@ -17,6 +17,10 @@ Transaction [SDKs](#integration-guides) are available for TypeScript, Rust, Go, If you're integrating with Tempo, we **strongly recommend** using Tempo Transactions, and not regular Ethereum transactions. Learn more about the benefits below, or follow the guide on issuance [here](/docs/guide/issuance). +:::tip[Debug failed transactions] +If a transaction fails, use the [Tempo transaction debugger](/docs/guide/debug-transactions) to reproduce the failure and inspect its execution trace, balance changes, events, gas use, and revert details. +::: + +