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

solidscript

v0.2.4

Published

Write smart contracts in TypeScript. Ship audited Solidity. Multi-chain deploy with a built-in 9-gate security pipeline.

Downloads

599

Readme

SolidScript

Write smart contracts in TypeScript. Ship audited Solidity.

import { Address, onlyOwner, msg } from "solidscript";
import { ERC20 } from "solidscript/standards";

export class MyToken extends ERC20 {
  constructor(initialSupply: bigint) {
    super("MyToken", "MTK");
    this._mint(msg.sender, initialSupply);
  }

  @onlyOwner
  mint(to: Address, amount: bigint): void {
    this._mint(to, amount);
  }
}

→ deployed on Base Sepolia with source verified on BaseScan, in three commands.

Install — one command, then one fix

npm install solidscript        # or bun add / yarn add / pnpm add
npx solidscript doctor --fix   # ONE-TIME: downloads forge/anvil + pulls slither/mythril Docker images

That's it. After doctor --fix you have a self-contained toolchain — solc, forge, anvil, slither, mythril all resolved automatically. No brew, no pipx, no foundryup.

What's bundled vs auto-fetched

| Tool | Where it comes from | |---|---| | solc (JS) | bundled in the npm install — works immediately | | @openzeppelin/contracts | bundled as a regular dependency | | TypeScript parser, viem, etc | bundled | | forge + anvil | auto-downloaded to ~/.solidscript/bin/ on first use (or by doctor --fix). Pulled from Foundry's official GitHub release for your platform. | | slither | runs via Docker (trailofbits/eth-security-toolbox) if Docker is installed; falls back to native slither on PATH; fails with install hint otherwise | | mythril | runs via Docker (mythril/myth) if Docker is installed; falls back to native myth on PATH |

If you don't have Docker, install it once (brew install --cask docker) — it removes the need to ever touch Python for Slither/Mythril.

60-second quickstart

mkdir my-token && cd my-token
npm init -y
npm install solidscript

npx solidscript doctor --fix                      # fetches forge/anvil, pulls Slither+Mythril Docker images
npx solidscript init                              # scaffold contracts/ + config

# write your contract in contracts/Counter.ts
npx solidscript build contracts                   # TS → Solidity
npx solidscript verify contracts --skip fuzz      # 9-gate security pipeline
npx solidscript compile out/sol                   # ABI + bytecode

# deploy via your browser wallet (no keys on disk)
npx solidscript deploy Counter -n base-sepolia

What makes this different

  • 9-gate security pipeline gates every deploy — native validator (secure mode), solc, SMTChecker (Z3), Slither, pattern library, auto-generated fuzz harnesses, auto-derived invariant tests, reproducible-build attestation
  • Browser-wallet signing first-class — no private keys on disk; MetaMask/Rabby/Coinbase Wallet handles the signature
  • Auto-verify on every Etherscan-family explorer — Base, Optimism, Arbitrum, Polygon, Eth, every testnet — one API key via Etherscan v2 multichain
  • OpenZeppelin v5 + 13 optimizer passes built in — custom errors auto-derived, Ownable(msg.sender) auto-injected, immutables auto-detected
  • Source maps from .sol back to .ts — forge stack traces rewrite to your TypeScript line numbers via solidscript trace

Documentation

Commands at a glance

| Command | What it does | |---|---| | solidscript doctor | Check your environment (node, solc, slither, forge, OZ) | | solidscript init [dir] | Scaffold a new project (contracts/, config, scripts) | | solidscript build <input> | Transpile TS → Solidity (optimizer on by default) | | solidscript validate <input> | Static checks (15 native rules) | | solidscript verify <input> | Full 9-gate security pipeline | | solidscript compile <input> | solc compile → ABI + bytecode | | solidscript deploy <Contract> -n <network> | Deploy (browser wallet by default, auto-verifies on Etherscan if key configured) | | solidscript secure-deploy <input> -c <Contract> -n <network> | Refuse to deploy unless 9 gates pass | | solidscript verify-source <Contract> -n <network> | Submit source to Etherscan v2 multichain | | solidscript audit <input> | Native rules + Slither | | solidscript audit-pack <input> | Per-contract bundle for auditor handoff | | solidscript gasdiff <input> | Bytecode size: unoptimized vs optimized | | solidscript test | Forge tests + auto-generated fuzz | | solidscript trace | Rewrite .sol:line.ts:line in stack traces |

Library API

import {
  parseContractFiles,
  emitProgram,
  validateProgram,
  optimizeProgram,
  compileSolidity,
} from "solidscript";

const { program } = parseContractFiles(["./contracts/MyToken.ts"]);
optimizeProgram(program);
const emitted = emitProgram(program);
console.log(emitted[0].solidity);

License

MIT — see LICENSE.