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

smartc

v0.1.0

Published

Generate compile-verified smart contracts (ERC-20/721/1155, SPL) from a wizard, with a DEPLOY.md.

Readme

smartc

Generate working, compile-verified smart contracts from a wizard — no boilerplate, no remembering EIPs, no scaffolding a whole project just to write one contract.

smartc is a single-binary CLI that walks you through a few questions and writes one contract file plus a matching DEPLOY.md (copy-pasteable deploy + verify commands and option-specific safety warnings). Every Solidity contract is compiled in-process before it touches disk — if it doesn't compile, nothing is written.

  • 4 templates: ERC-20, ERC-721 (NFT), ERC-1155 (multi-token) on EVM chains, and SPL tokens on Solana (Anchor).
  • Compile-verified: Solidity is checked against pinned solc + @openzeppelin/contracts; Solana is built via anchor build when the toolchain is present.
  • DEPLOY.md for every contract: Hardhat / Foundry / Remix (EVM) or spl-token CLI / Anchor (Solana), plus a centralization-warning section derived from your option choices.
  • Optional local AI: add-feature patches custom logic into an existing contract via a local Ollama model — with a diff preview, confirmation, and a sandbox-compile that rolls back anything that won't build. No cloud, no API keys.
  • Newbie or expert: --newbie adds explanations and EIP/doc links; the default is terse.

Status: feature-complete for v1 (all 4 templates, compile-verify, DEPLOY.md, doctor, AI add-feature). EVM templates are fully compile-verified; the Solana template is compile-verified when the Anchor toolchain is installed and otherwise written with a clear "verification skipped" warning.


Install

Requires Node.js 20+.

# Global (once published to npm):
npm install -g smartc
smartc --help

# Or run without installing:
npx smartc create --template erc20

From source (for development or forking — see docs/FORKING.md):

git clone https://github.com/ChinmayGit8765/SmartContract-Creator.git
cd SmartContract-Creator
npm install
npm run build
npm link        # puts `smartc` on your PATH

No need to install solc or OpenZeppelin — they're bundled. Solana (anchor) and AI (ollama) are optional; run smartc doctor to see what you have.

Quickstart

smartc create --template erc20 --out MyToken.sol
# walks the wizard, compile-verifies, writes MyToken.sol + MyToken.DEPLOY.md

Prefer explanations? Add --newbie. Automating? Add --force to skip prompts.

Commands

| Command | What it does | |---------|--------------| | smartc create --template <id> | Run the wizard for a template and write <Name>.<ext> + <Name>.DEPLOY.md. | | smartc list-templates [--json] | List available templates. | | smartc doctor [--json] | Probe the toolchain (Node, bundled solc, anchor, cargo-build-sbf, ollama). Exit 0 when required tools are present. | | smartc add-feature --ai --file <path> "<description>" | Patch a feature into an existing contract via local Ollama. |

Global flags: --newbie (explanations), --force (skip prompts), --no-color, --json (machine output where supported), -V/--version.

Templates & examples

All four are driven by the same wizard. EVM output matches OpenZeppelin Wizard conventions byte-for-byte.

ERC-20 — smartc create --template erc20 · name, symbol, supply, opt-in Mintable/Burnable/Pausable, Ownable vs AccessControl.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";

contract MyToken is ERC20, ERC20Permit {
    constructor(address recipient) ERC20("MyToken", "MTK") ERC20Permit("MyToken") {
        _mint(recipient, 1000000 * 10 ** decimals());
    }
}

ERC-721 — smartc create --template erc721 · name, symbol, base URI, opt-in Mintable/Enumerable/Burnable/Pausable, EIP-2981 royalties.

ERC-1155 — smartc create --template erc1155 · URI template, opt-in Mintable/Burnable/Supply-tracking/Pausable.

SPL (Solana / Anchor) — smartc create --template spl · name, symbol, decimals, supply, explicit mint-authority and freeze-authority choices, opt-in Metaplex metadata. Output is an Anchor program (<name>.rs); the DEPLOY.md covers both the spl-token CLI and Anchor deploy paths for devnet and mainnet-beta.

Each create also writes a DEPLOY.md next to the contract. For an Ownable + Mintable ERC-20, that file includes, for example:

Mintable + Ownable (CRITICAL): a single key can mint unlimited tokens. Consider AccessControl (multi-role) or transferring ownership to a multisig before deploy.

AI add-feature (optional, local)

smartc add-feature --ai --file MyToken.sol "add a per-wallet mint cap of 100 tokens"

Connects to a local Ollama daemon (no cloud, no keys), shows you a diff, asks you to confirm, then sandbox-compiles the result and only writes it if it builds. Default model qwen2.5-coder (override with --model or SMARTC_OLLAMA_MODEL). If Ollama isn't running, it tells you and points at smartc doctor.

AI output is a suggestion, not an audit — always review and test before deploying value.

Safety

smartc generates and compiles; it never broadcasts a transaction. The generated DEPLOY.md includes a pre-deploy checklist and surfaces centralization risks specific to your options. Have contracts audited before they hold real value.

Documentation

  • docs/HOWTO.md — step-by-step walkthroughs for every command and template.
  • docs/FORKING.md — fork it, understand the layout, and add your own template (the plugin model is additive — no core changes).
  • docs/EMBEDDING.md — call smartc from scripts, other tools, LLMs, and MCP agents (stable --json contracts + exit codes).
  • AGENTS.md / llms.txt — machine-readable capability + invocation summary for AI agents.

Contributing & forking

PRs and forks welcome. The architecture is deliberately additive: a new template is a self-contained folder under src/templates/<id>/ registered in one line — adding one touches no existing template. See docs/FORKING.md.

npm test          # full suite (unit + integration + e2e)
npm run typecheck
npm run build

License

MIT © 2026 Chinmay Purohit.

Built with OpenZeppelin Wizard, solc, Anchor, and Ollama.