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 🙏

© 2025 – Pkg Stats / Ryan Hefner

diamondscaffold

v1.0.7

Published

A Package for Scaffolding EIP2535 Diamonds

Readme

diamondscaffold

diamondscaffold is a CLI tool that helps developers scaffold an EIP-2535 diamond structure with ease. Users can choose between Hardhat or Foundry as their development environment, and they can select between templates like "ERC20", "ERC721", or a default Diamond template to kickstart their smart contract development.

Screenshot

Features

  • Scaffold EIP-2535 Diamond architecture.
  • Choose between Hardhat or Foundry frameworks.
  • Select from multiple templates: ERC20, ERC721, and a default Diamond template.
  • Option to scaffold in JavaScript or TypeScript when using Hardhat.
  • Install project dependencies automatically when using Hardhat.

Installation

You can install the package globally via npm to use it as a CLI tool.

npm install -g diamondscaffold

Usage

Once installed, use the diamonds init command to scaffold an EIP-2535 Diamond structure.

Basic Command

diamonds init

This command will prompt you with several questions to help set up your project. Here's the sequence of questions asked:

  1. Project Name: The name of your project (default is my-app).
  2. Template: Choose a template to scaffold: Default, ERC20, or ERC721.
  3. Framework: Choose between Foundry or Hardhat.
  4. Language (only for Hardhat): Choose between JavaScript or TypeScript.
  5. Install Dependencies (only for Hardhat): Option to install dependencies automatically, provided you have an active internet connection.

Example

diamonds init

During the initialization, you will be prompted with questions like:

📝 What is the name of your project? (default: my-app)
📑  What Template would you like to scaffold? (choices: Default, ERC20, ERC721)
🔧 Which framework would you like to use? (choices: Foundry, Hardhat)
📚 Which language do you want to use? (choices: JavaScript, TypeScript)
Do you want to install project dependencies? (only for Hardhat)

To scaffold a diamond project using Hardhat, ERC20, and TypeScript with automatic dependency installation:

diamonds init

Available Templates

  1. ERC20: A diamond contract implementing the ERC20 token standard.
  2. ERC721: A diamond contract implementing the ERC721 NFT standard.
  3. Default: A basic diamond structure with no additional functionality, providing a clean slate to start with.

Commands

Hardhat Commands

If you scaffold with Hardhat, these commands will be available:

  • Compile the project:

    npx hardhat compile
  • Run tests:

    npx hardhat test
  • Deploy the contract:

    npx hardhat run scripts/deploy.js

Foundry Commands

If you scaffold with Foundry, these commands will be available:

  • Compile the project:

    forge build
  • Run tests:

    forge test
  • Deploy the contract:

    forge script <script-file> --broadcast

Contribution

Contributions to diamondscaffold are welcome! If you'd like to contribute checkout:

  1. Contribution guildlines
  2. Git guildlines
  3. Issues guildlines

License

This package is licensed under the MIT License. See the LICENSE file for more information.