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 🙏

© 2024 – Pkg Stats / Ryan Hefner

hardhat-pint

v0.0.3

Published

Hardhat plugin for Pint

Downloads

197

Readme

Hardhat Pint

A Hardhat plugin that integrates Pint (a declarative smart contract language) with your Essential Blockchain development workflow. Write, compile, and deploy Pint contracts using familiar Hardhat commands.

Prerequisites

Before using this plugin, ensure you have the following installed:

Rust Tools

Node.js Tools

  • Node.js (v14 or later)
  • Hardhat - Ethereum development environment
    npm install --save-dev hardhat

Features

  • 🔧 Seamless integration with Hardhat CLI
  • 🧪 Simple testing interface with Mocha
  • 📦 Support for both local and remote nodes
  • 🛠️ Essential tasks: compile, deploy, test, clean, node

Installation

# Create a new Hardhat project (if needed)
npx hardhat init

# Install the plugin
npm install hardhat-pint

Configuration

Add the plugin to your Hardhat config file:

// hardhat.config.js
require("hardhat-pint");
// hardhat.config.ts
import "hardhat-pint";

Available Commands

# Compile your Pint contracts
npx hardhat compile

# Start a local Essential node
npx hardhat node

# Deploy a contract
npx hardhat deploy --contract <contract-name> [--url <node-url>]

# Run tests
npx hardhat test

# Clean compiled contracts
npx hardhat clean

Testing Guide

The plugin provides testing helpers for writing Mocha tests. Here's a basic example:

const { deploy, queryState, submitSolution } = require("hardhat-pint");

describe("Counter Contract", () => {
  it("should increment counter value", async () => {
    // Deploy the contract
    const [contractHash, IncrementHash] = await deploy(sourcePath, contractName);
    
    // Query initial state
    const initialState = await queryState(contractHash, key);
    
    // Submit a solution
    const solution = await submitSolution(
      hre.config.paths.sources,
      contractHash,
      IncrementHash,
      [],
      mutations
    );
    
    // Verify the new state
    const newState = await queryState(contractHash, key);
    expect(newState).to.not.equal(initialState);
  });
});

Default Configuration

  • Local node URL: http://localhost:3554
  • Supported networks: Local and remote Essential nodes

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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