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

@karma3labs/presale-cli

v1.0.1

Published

CLI for Karma Launcher Presale SDK

Readme

Karma Launcher Presale CLI

Command-line interface for interacting with Karma Launcher presale contracts.

Installation

# From the cli directory
npm install

# Build the CLI
npm run build

# Link globally (optional)
npm link

Configuration

Create a .env file in the project root or cli directory:

# Required
PRIVATE_KEY=0x...your_private_key

# Optional - Network Configuration
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
BASE_RPC_URL=https://mainnet.base.org

# Optional - Contract Addresses (defaults provided for Base Sepolia)
PRESALE_ADDRESS=0x1f0FB2ac6a3a4C6162159eEe26d86E06aB23ee12
KARMA_FACTORY_ADDRESS=0x129183B7CC4F23e115064590dA970BB3Abc3C500
USDC_ADDRESS=0x72338D8859884B4CeeAE68651E8B8e49812f2fEe

Usage

Global Options

All commands support the following options:

  • -n, --network <network> - Network to use (default: base-sepolia)
  • --debug - Enable debug mode with detailed error output

Wallet Commands

# Show current wallet address
karma wallet address

# Check USDC balance and allowance
karma wallet balance
karma wallet balance --address 0x...

# Approve USDC for presale contract
karma wallet approve 1000        # Approve 1000 USDC
karma wallet approve max         # Approve unlimited

Presale Commands

# Get presale information
karma presale info <presaleId>

# Get user info for a presale
karma presale user-info <presaleId>
karma presale user-info <presaleId> --address 0x...

# Contribute USDC to a presale
karma presale contribute <presaleId> <amount>
karma presale contribute 1 100                    # Contribute 100 USDC to presale #1
karma presale contribute 1 100 --no-approve       # Skip approval step

# Withdraw contribution from a presale
karma presale withdraw <presaleId> <amount>
karma presale withdraw 1 50                       # Withdraw 50 USDC from presale #1

# Claim tokens and refund
karma presale claim <presaleId>
karma presale claim 1                             # Claim from presale #1

Token Commands

# Deploy token for a presale (presale must be ready)
karma token deploy <presaleId>
karma token deploy 1

# Get deployed token information
karma token info <presaleId>
karma token info 1

Other Commands

# Show CLI information and quick start guide
karma info

# List supported networks
karma networks

# Show version
karma --version

# Show help
karma --help
karma presale --help
karma presale contribute --help

Examples

Complete Presale Flow

# 1. Check your wallet
karma wallet balance

# 2. View presale details
karma presale info 1

# 3. Approve USDC (if needed)
karma wallet approve 500

# 4. Contribute to presale
karma presale contribute 1 500

# 5. Check your contribution
karma presale user-info 1

# 6. After presale ends and token is deployed, claim your tokens
karma presale claim 1

Using Different Networks

# Base Sepolia (testnet) - default
karma presale info 1 --network base-sepolia

# Base Mainnet
karma presale info 1 --network base

Supported Networks

| Network | Chain ID | Description | |---------|----------|-------------| | base-sepolia | 84532 | Base Sepolia Testnet (default) | | base | 8453 | Base Mainnet |

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Run directly without global install
npm start -- presale info 1
# or
node bin/karma.js presale info 1

Troubleshooting

"PRIVATE_KEY environment variable is required"

Make sure you have a .env file with your private key:

PRIVATE_KEY=0x...your_private_key_here

"Unknown network"

Use karma networks to see supported networks. Make sure you're using a valid network name.

Transaction Failures

  • Check your USDC balance: karma wallet balance
  • Check USDC allowance: karma wallet balance
  • Enable debug mode for more details: karma --debug presale contribute 1 100

Dependencies

  • @karma3labs/presale-sdk-evm - Karma Presale SDK
  • commander - CLI framework
  • chalk - Terminal styling
  • ora - Spinners
  • viem - Ethereum library
  • dotenv - Environment variables

License

MIT