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

soroban-trace

v0.1.0

Published

Developer tool for tracing and visualizing Soroban smart contract execution on the Stellar network

Downloads

11

Readme

soroban-trace

Developer tool for tracing and visualizing Soroban smart contract execution on the Stellar network.

License: MIT Node.js Version TypeScript

What is soroban-trace?

soroban-trace gives developers visibility into Soroban smart contract execution — function calls, storage interactions, emitted events, and error points — in a structured, human-readable format.

Think of it as a "transaction introspector" or "debugging lens" for Soroban contracts on Stellar.

Why You Need This

When debugging Soroban contracts, you often face:

  • Generic error codes with no context
  • No visibility into nested contract calls
  • Difficulty analyzing gas usage, state changes, or emitted events
  • Painful debugging for complex, multi-contract logic

soroban-trace solves this by parsing transaction results and displaying them in an easy-to-understand format.


Quick Start

Installation

# Global installation (when published to npm)
npm install -g soroban-trace

# Or local development
git clone https://github.com/daveylupes/soroban-trace.git
cd soroban-trace
npm install && npm run build

Basic Usage

# Trace a transaction (using verified test transaction)
soroban-trace tx d3bb417530b528e776c146580bcd93269cd86fa09d74e8c18cd7f7b0e9deab0b --network testnet

# Verbose mode with all details
soroban-trace tx <TX_HASH> --verbose

# Export to JSON
soroban-trace tx <TX_HASH> --json > trace.json

# Different networks
soroban-trace tx <TX_HASH> --network futurenet
soroban-trace tx <TX_HASH> --network mainnet

# From file
soroban-trace file ./transaction.json

See QUICKSTART.md for a complete guide.


Example Output

┌──────────────────────────────────────────────────────────────────────┐
│ Transaction: d3bb417530b528e776c146580bcd93269cd86fa09d74e8c18c...   │
│ Time: 2025-08-19T22:02:30Z                                           │
│ Status: SUCCESS                                                      │
├──────────────────────────────────────────────────────────────────────┤
│ OPERATIONS:                                                          │
│   1. CALL: invoke()                                                  │
│      ◆ EVENT: Transfer                                               │
│        Data: { from: alice, to: bob, amount: 1000 }                  │
│      → success                                                       │
├──────────────────────────────────────────────────────────────────────┤
│ EVENTS:                                                              │
│   ◆ EVENT: Transfer                                                  │
│     Data: { from: alice, to: bob, amount: 1000 }                     │
└──────────────────────────────────────────────────────────────────────┘

Programmatic Usage

Use soroban-trace as a library in your Node.js/TypeScript projects:

import { SorobanTrace } from 'soroban-trace';

const tracer = new SorobanTrace({
  network: 'testnet',
  // or use custom RPC URL:
  // rpcUrl: 'https://custom-rpc.example.com'
});

// Trace by transaction hash
const result = await tracer.traceTransaction(
  'd3bb417530b528e776c146580bcd93269cd86fa09d74e8c18cd7f7b0e9deab0b',
  { json: false, verbose: true }
);

console.log(result);

// Or trace from a file
const fileResult = tracer.traceFromFile('./transaction.json');
console.log(fileResult);

Documentation

Additional Resources


Features

Current (v0.1.0)

  • Transaction tracing by hash
  • Support for testnet, futurenet, and mainnet
  • Custom RPC endpoint support
  • Event parsing and display
  • Storage change tracking
  • Beautiful CLI output with colors
  • JSON export
  • Verbose mode
  • File-based tracing
  • Library API for programmatic use

Roadmap

| Phase | Feature | Status | |-------|---------|--------| | Phase 1 | CLI MVP with transaction tracing | Complete | | Phase 2 | WASM metadata parsing, gas analytics | Planned | | Phase 3 | Web UI for visualization | Planned | | Phase 4 | VSCode extension integration | Planned | | Phase 5 | Live tracing during tests | Planned |


Use Cases

  • Debugging Failed Transactions: See exactly where and why your contract failed
  • Analyzing Multi-Contract Interactions: Visualize nested contract calls
  • Event Monitoring: Track all events emitted during execution
  • Gas Optimization: Understand which operations consume resources
  • Testing & Development: Validate contract behavior during development
  • Audit & Analysis: Review historical transaction data

Testing

# Build the project
npm run build

# Run unit tests
npm test

# Run with coverage
npm run test:coverage

# Test with a real transaction
npm start -- tx d3bb417530b528e776c146580bcd93269cd86fa09d74e8c18cd7f7b0e9deab0b -n testnet

See the testing guide for comprehensive testing instructions.


Contributing

Contributions are welcome! Whether it's bug reports, feature requests, or code contributions, we'd love your help.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.


Project Structure

soroban-trace/
├── src/              # TypeScript source code
│   ├── cli.ts        # CLI interface
│   ├── index.ts      # Library API
│   ├── parser.ts     # Transaction parser
│   ├── formatter.ts  # Output formatter
│   ├── rpc-client.ts # RPC/Horizon client
│   └── types.ts      # Type definitions
├── test/             # Test files
├── docs/             # Documentation
├── examples/         # Example files
├── dist/             # Compiled output
└── scripts/          # Helper scripts

License

This project is licensed under the MIT License - see the LICENSE file for details.


Links


Acknowledgments

Built with:

Special thanks to the Stellar and Soroban communities!


Made for the Stellar & Soroban developer community

Star History

If you find this tool useful, please consider giving it a star on GitHub!