npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@georgeroman/evm-tx-simulator

v0.0.50

Published

Simulate any potential EVM transaction

Readme

evm-tx-simulator

See how an EVM transaction changes ETH and token balances before sending it, or inspect the balance changes from an existing transaction. Supports native tokens, ERC20, ERC721, and ERC1155.

There are four methods:

  • getCallTrace — simulate a transaction without submitting it.
  • getTxTraces — fetch traces for existing transactions.
  • getBlockTraces — fetch traces for every transaction in a block.
  • getStateChange — turn a trace into balance changes for each address.

ERC20 transfers are read from events, including WETH-style deposits and withdrawals. Native transfers use call values and calldata; NFT transfers use calldata. Reverted calls don't count toward balance changes.

getStateChange requires logs. If you already have the transaction's receipt, pass its logs directly. The trace methods default to includeLogs: false:

const traces = await getTxTraces([{ hash }], provider);
const changes = getStateChange(traces[hash], receipt.logs);

Otherwise, opt into fetching logs with the trace. This requires an RPC endpoint that supports callTracer with withLog:

const traces = await getTxTraces([{ hash }], provider, { includeLogs: true });
const changes = getStateChange(traces[hash]);

getCallTrace and getBlockTraces accept the same includeLogs option. Without either source, getStateChange throws. Supplied logs replace all logs embedded in the trace; pass [] only when the transaction emitted no logs.

TypeScript types, including Call and CallTrace, can be imported from @georgeroman/evm-tx-simulator/dist/types.

Here's an example of getStateChange output. Positive amounts are balance increases; negative amounts are decreases. Amounts use the token's smallest unit.

{
  "0x0cccd55a5ac261ea29136831eeaa93bfe07f5db6": {
    "tokenBalanceState": {
      "native:0x0000000000000000000000000000000000000000": "-990000000000000",
      "erc721:0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85:10530676464258429157976288980766951099646391566276924398001212535050412393470": "1"
    }
  },
  "0x845bd54015813fda33f11e1f261ebc360983e584": {
    "tokenBalanceState": {
      "native:0x0000000000000000000000000000000000000000": "965250000000000",
      "erc721:0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85:10530676464258429157976288980766951099646391566276924398001212535050412393470": "-1"
    }
  },
  "0x8de9c5a032463c561423387a9648c5c7bcc5bc90": {
    "tokenBalanceState": {
      "native:0x0000000000000000000000000000000000000000": "24750000000000"
    }
  }
}