Start typing to search this publication.
crypto.news logo crypto.news
Open menu
crypto.news logo

Subscribe to crypto.news

Get new posts delivered straight to your inbox.

How to Simulate a Transaction Before Signing It and See Changes

crypto.news avatar crypto.news
2 min read

You can see a pending transaction’s balance changes, events, and any revert reason before signing it. Copy the wallet prompt’s to address, data, and value into a simulator on the same EVM chain, set from to your own address, and run it against current chain state. The dry run executes the call without broadcasting it.

A bridge deposit makes the receiving address especially important. The Berachain bridge is a cross-chain asset bridge that transfers assets for use in Berachain’s DeFi ecosystem. An Ethereum deposit is a useful case for checking both the source-chain asset movement and the destination address encoded in the call.

How do you run the pending transaction and check its result?

Start with the unsigned request open in Rabby or MetaMask, a Tenderly account or Foundry installation, and an RPC endpoint for the source chain.

  1. Open the wallet’s transaction details. Copy the exact to address, raw data (calldata), and value; use your connected address as from. Value is the native asset sent with the call, while token amounts are usually encoded in data. The to address is the contract being called, which may differ from the address that ultimately receives assets.

  2. Select the wallet’s source chain in Tenderly and enter those four fields. Use the latest state. A wallet preview can help you spot a problem, but the manual run lets you inspect the exact call shown in the prompt.

  3. If the deposit needs an ERC-20 approval that has not confirmed, put the token’s approve call first and the deposit second in one Tenderly simulation bundle. Match the approval’s spender and amount to the intended deposit. Each call runs on the state left by the preceding call. Running the deposit alone before approval confirms can produce an allowance revert and hide what the deposit would actually do.

  4. Run the bundle and inspect each call’s asset changes, events, and revert reason. For a single call from the command line, Foundry’s cast call uses the source-chain RPC and returns the call result or an error without sending a transaction. Ethereum’s JSON-RPC reference defines eth_call as executing a message call without creating an on-chain transaction. Use Tenderly’s trace when you need the asset movements and events alongside that result.

  5. Compare the simulated token debit, any native value, approval amount, and decoded receiving address with what you intended. For a bridge deposit, this source-chain simulation shows the deposit’s execution; inspect its encoded recipient rather than assuming the contract’s to address is the destination wallet. Sign only when the balance changes match and the call has no revert. Rerun it if the wallet request or chain state changes before signing.

  • Simulate the exact wallet fields from your address on the source chain.

  • Bundle an unconfirmed approval before the main call.

  • Confirm asset changes, recipient, and successful execution before signing.

Subscribe to crypto.news