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

evmstart-injective

v1.2.15

Published

Kickstart your Injective EVM dApp with one command (Foundry + React)

Downloads

72

Readme

🚀 evmstart-injective

The fastest way to build on Injective EVM - Production-ready dApp scaffolding with smart contracts and frontend in one command.

✨ What You Get

🏗️ Complete Development Stack

  • Smart Contracts: Pre-configured Foundry framework with example Counter contract
  • Modern Frontend: React + Vite + TypeScript + TailwindCSS + wagmi
  • Auto-Deployment: One-command deployment to local Anvil with frontend integration
  • Multi-Network Ready: Anvil (local), Injective EVM Testnet, and Mainnet configs

Developer Experience

  • Zero Configuration: Works out of the box with sensible defaults
  • Live Contract Updates: Automatic ABI generation and address updates
  • Secure Wallet: use keystore creation and management

🚀 Quick Start

npx evmstart-injective my-dapp

What happens next:

  1. 📁 Project Structure - Creates organized folders for contracts and frontend
  2. ⛓️ Local Blockchain - Starts Anvil (Ethereum local testnet) on port 8545
  3. 🚀 Smart Contract - Deploys Counter.sol automatically with forge
  4. 🔗 Frontend Config - Updates React app with deployed contract address
  5. Ready to Code - Everything connected and working

📦 Project Structure

my-dapp/
├── contracts/                 # 🔧 Smart Contracts (Foundry)
│   ├── src/
│   │   └── Counter.sol       # Example contract with increment/decrement
│   ├── script/
│   │   └── Counter.s.sol     # Deployment script  
│   ├── test/
│   │   └── Counter.t.sol     # Comprehensive test suite
│   ├── foundry.toml          # Foundry configuration
│   └── Makefile              # Deployment commands
└── frontend/                 # ⚛️ React Frontend
    ├── src/
    │   ├── components/       # Counter UI, Wallet connection, Network switcher
    │   ├── hooks/           # Contract interaction hooks
    │   ├── abi/             # Auto-generated contract ABIs
    │   └── wagmi.ts         # Web3 configuration (chains, contracts)
    ├── scripts/
    │   └── update-contracts.js # Auto-updates ABIs and addresses
    └── package.json

🎯 How It Works

🔄 Automatic Contract Integration

  1. Deploy → Foundry deploys contracts and saves deployment data
  2. Extract → Script reads deployment addresses from broadcast files
  3. Update → Frontend wagmi.ts auto-updates with new contract addresses
  4. Generate → ABIs extracted to src/abi/ for type-safe contract calls

🛠️ Development Workflow

# Make contract changes
cd contracts && forge test

# Deploy to local/testnet  
make deploy-local
# or
make deploy-testnet WALLET=my-wallet

# Frontend auto-updates
cd ../frontend && npm run dev

🔒 Security First

  • Keystores: Secure encrypted wallet storage (no plain private keys)
  • Environment Variables: Network configs and sensitive data in .env
  • Multi-Network: Separate configs for local, testnet, and mainnet

🌐 Supported Networks

| Network | Chain ID | RPC URL | Purpose | |---------|----------|---------|---------| | Anvil (Local) | 31337 | http://127.0.0.1:8545 | Development & Testing | | Injective EVM Testnet | 1439 | https://k8s.testnet.json-rpc.injective.network/ | Testing with real network conditions | | Injective EVM Mainnet | 1776 | https://sentry.evm-rpc.injective.network/ | Production deployments |

🔧 Getting Started

1. Start Development

cd my-dapp/frontend
npm install
npm run dev
# → http://localhost:5173

2. Test Smart Contracts

cd my-dapp/contracts
forge test -vvv
# Run specific test
forge test --match-test testIncrement

3. Deploy to Networks

🏠 Local (Anvil) - Already done!

make deploy-local

🧪 Testnet - For testing

# Create secure wallet
make setup-wallet
# Enter wallet name: testnet-wallet

# Deploy
make deploy-testnet WALLET=testnet-wallet

🌍 Mainnet - Production ready

# Create secure wallet  
make setup-wallet
# Enter wallet name: mainnet-wallet

# Deploy (with confirmation)
make deploy-mainnet WALLET=mainnet-wallet

4. Update Frontend After Deployment

cd frontend
npm run update-contracts
# Automatically updates ABIs and contract addresses

� Adding Your Own Contracts

The starter includes a complete Counter example, but you can easily add your own contracts. See our Custom Contracts Guide for:

  • Step-by-step contract creation
  • Deployment scripts and testing
  • Frontend integration with React hooks
  • Multi-contract project setup
  • Best practices and common patterns

Quick Example - Adding a Token Contract:

// contracts/src/MyToken.sol
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MyToken is ERC20 {
    constructor() ERC20("MyToken", "MTK") {
        _mint(msg.sender, 1000000 * 10**decimals());
    }
}

Then run npm run update-contracts to auto-generate TypeScript bindings!

🛠️ Requirements & Installation

Prerequisites

  • Node.js 18+ (recommended: 20+)
  • Foundry - Install: curl -L https://foundry.paradigm.xyz | bash && foundryup

Installation Methods

NPX (Recommended)

npx evmstart-injective my-dapp

Global Install

npm install -g evmstart-injective
evmstart-injective my-dapp

From Source

git clone https://github.com/Trynax/evmstart-injective
cd evmstart-injective
npm install && npm run build
npm link
evmstart-injective my-dapp

� Troubleshooting

Common Issues

❌ "anvil: command not found"

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup

❌ "Contract not found" in frontend

# Re-deploy and update frontend
cd contracts && make deploy-local
cd ../frontend && npm run update-contracts

❌ MetaMask network issues

  • Ensure you're on the correct network (check chain ID)
  • Reset MetaMask account if transactions are stuck

❌ Transaction failures

  • Check wallet has enough gas tokens (ETH for Anvil, INJ for Injective)
  • Verify contract is deployed on the current network

Debug Mode

# Verbose contract testing
forge test -vvv

# Check deployment addresses
cat contracts/broadcast/Counter.s.sol/31337/run-latest.json

🤝 Contributing

We welcome contributions!

Development Setup

git clone https://github.com/Trynax/evmstart-injective
cd evmstart-injective
npm install
npm run dev my-test-dapp  # Test the CLI

Submit Issues

  • 🐛 Bug reports: Include OS, Node version, error logs
  • 💡 Feature requests: Describe use case and expected behavior
  • 📖 Documentation: Help improve our guides and examples

�� License

MIT License - see LICENSE file for details.


Built with ❤️ for the Injective EVM ecosystem

Start building the future of finance → npx evmstart-injective my-dapp