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

blockx-deploy

v1.1.3

Published

A powerful tool for generating, deploying, and auditing smart contracts on Arbitrum using Gemini 2.0-Flash LLM and Web3Modal

Readme

BlockX Deploy

Version License

A powerful tool for generating, deploying, and verifying smart contracts on Arbitrum using Gemini 2.0-Flash LLM. BlockX Deploy simplifies the entire smart contract development lifecycle, from generation to deployment and verification. Designed for developers who want to quickly create and deploy smart contracts without writing code from scratch.

npm version License: MIT

Features

  • AI-Powered Contract Generation: Create smart contracts by describing your requirements in natural language
  • Prompt Enhancement: Automatically enhance prompts with Arbitrum-specific optimizations
  • Flexible Wallet Integration: Connect with user wallets using ethers.js or deploy directly with private keys
  • Contract Deployment: Deploy contracts to Arbitrum networks (mainnet and Sepolia testnet)
  • Contract Verification: Automatically verify deployed contracts on Arbiscan
  • Multiple Interfaces: Use as a library, CLI tool, API server, or web application
  • User-Friendly Web Interface: Generate, deploy, and verify contracts through an intuitive browser UI
  • Secure Key Management: Private keys are stored only in your browser's localStorage for web deployments

Installation

# Install globally for CLI usage
npm install -g blockx-deploy

# Or install as a project dependency
npm install blockx-deploy

Configuration

Set up your API keys in a .env file:

GEMINI_API_KEY=your_gemini_api_key
ARBISCAN_API_KEY=your_arbiscan_api_key
# For deployments with private key (optional, use with caution)
PRIVATE_KEY=your_private_key_without_0x_prefix

Or use the CLI to configure:

blockx-deploy init

Usage

CLI Usage

# Generate a contract
blockx-deploy create --prompt "Create a token sale contract with vesting" --name "TokenSale" --type "CUSTOM"

# Deploy with private key (for automated deployments)
blockx-deploy deploy --file ./contract.sol --name "TokenSale" --private-key "your_private_key"

# Deploy a contract
blockx-deploy deploy --file ./contract.sol --name "TokenSale" --args "arg1,arg2,arg3"

Library Usage

import { ContractGenerator } from 'blockx-deploy';

// Create a new generator instance
const generator = new ContractGenerator();

// Generate a contract
const contract = await generator.generateContract({
  prompt: 'Create a token sale contract with vesting',
  contractName: 'TokenSale',
  enhancePrompt: true,
});

// Deploy with private key (for backend/automated deployments)
const deployResult = await generator.deployWithPrivateKey(
  contract,
  'your_private_key', // Without 0x prefix
  421613 // Arbitrum Goerli testnet chain ID
);

// Deploy contract
const deployResult = await generator.deployContract(contract);

// Verify contract
const verifyResult = await generator.verifyContract(
  deployResult.contractAddress,
  contract
);

API Server

Start the API server:

npx blockx-deploy api

The API server will be available at http://localhost:3000 with the following endpoints:

  • GET /api/health - Check API health
  • GET /api/config/validate - Validate configuration
  • POST /api/contracts/generate - Generate a contract
  • POST /api/wallet/connect - Connect to a wallet
  • POST /api/contracts/deploy - Deploy a contract

Web Interface

Start the web interface with our enhanced launcher script:

# Use the enhanced launcher script (recommended)
npm run start-ui

# Or use the basic web server
npx blockx-deploy web

The web interface will be available at http://localhost:3001 and provides:

  • Intuitive UI: User-friendly interface for all contract operations
  • Secure Key Management: Private keys are stored only in your browser's localStorage
  • Network Selection: Choose between Arbitrum One (mainnet) and Arbitrum Sepolia (testnet)
  • Live Contract Preview: View and edit generated contract source code
  • Deployment Status Tracking: Monitor deployment progress and get transaction details
  • Automatic Browser Opening: The interface automatically opens in your default browser

Web Interface Screenshot

Troubleshooting

Common Issues

  1. Network Connection Issues: If you encounter network connection errors when deploying to Arbitrum, try using a different RPC endpoint. You can specify a custom RPC URL in your configuration.

  2. Contract Compilation Errors: Make sure your contract imports are correctly specified. The package includes templates for ERC20 and ERC721 tokens that are pre-configured to work with the latest OpenZeppelin contracts.

  3. Deployment Failures: Ensure you have enough ETH in your wallet to cover gas costs on the Arbitrum network you're deploying to.

  4. Verification Failures: If contract verification fails, you can manually verify the contract on Arbiscan using the contract source code and constructor arguments.

Development

# Clone the repository
git clone https://github.com/blockx-labs/blockx-deploy.git

# Install dependencies
cd blockx-deploy
npm install

# Build the package
npm run build

# Run tests
npm test

# Start the web interface for development
npm run start-ui

What's New in Version 1.1.0

  • Private Key Deployment: Deploy contracts directly using private keys without requiring WalletConnect
  • Arbitrum Sepolia Support: Added support for the Arbitrum Sepolia testnet
  • Enhanced Web Interface: Completely redesigned web interface with improved UX
  • Launcher Script: New start-ui script for easy launching of the web interface
  • Improved Documentation: Comprehensive user guide and API reference
  • TypeScript Fixes: Resolved TypeScript errors and improved type safety
  • Dependency Updates: Updated dependencies to latest compatible versions

Documentation

For detailed documentation, see the following:

License

MIT