Getting Started
Welcome to Blockchain Toolkit! This guide will help you install, configure, and start using the extension for blockchain development in VS Code.
Installation
There are several ways to install Blockchain Toolkit. Choose the method that works best for you:
VS Code Marketplace
Search for "Blockchain Toolkit" in VS Code Extensions panel or click the install button below.
Install from MarketplaceCommand Line
Install directly from the command line using the VS Code CLI:
code --install-extension blockchain-toolkit.blockchain-toolkit
Manual Installation
Download the VSIX file from GitHub releases and install manually:
code --install-extension blockchain-toolkit-1.0.0.vsix
Requirements
Before using Blockchain Toolkit, ensure you have the following prerequisites installed:
Essential Prerequisites
- VS Code (v1.74.0 or higher) - Latest version recommended
- Node.js (v16 or higher) - Required for Ethereum-based frameworks
- npm/yarn/pnpm - Package manager for dependencies
- Git - Version control and repository operations
Framework-Specific Requirements
- Rust & Cargo - For Solana/Anchor and Foundry development
- Python 3.8+ - For Brownie framework support
- Docker (Optional) - For containerized blockchain nodes
# Check your versions
node --version # Should be v16+
npm --version # Should be v8+
git --version # Should be v2.20+
code --version # Should be v1.74+
# Install Rust (for Foundry/Solana)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Verify Rust installation
rustc --version
cargo --version
Your First Project
Let's create your first blockchain project using Blockchain Toolkit. The extension supports multiple frameworks, so you can choose the one that fits your needs.
Creating a Hardhat Project
# Create a new directory
mkdir my-blockchain-project
cd my-blockchain-project
# Initialize Hardhat project
npx hardhat init
# Install dependencies
npm install
# Open in VS Code
code .
The extension will automatically detect the Hardhat configuration and activate blockchain-specific features.
Creating a Foundry Project
# Install Foundry (if not already installed)
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Create a new Foundry project
forge init my-foundry-project
cd my-foundry-project
# Open in VS Code
code .
Foundry projects are automatically detected by the presence of foundry.toml configuration file.
Creating a Truffle Project
# Install Truffle globally
npm install -g truffle
# Create a new directory and initialize
mkdir my-truffle-project
cd my-truffle-project
truffle init
# Open in VS Code
code .
Truffle projects are detected by truffle-config.js or truffle.js files.
Creating a Solana/Anchor Project
# Install Anchor CLI
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install latest
avm use latest
# Create a new Anchor project
anchor init my-solana-project
cd my-solana-project
# Open in VS Code
code .
Solana projects are detected by Anchor.toml and Cargo.toml files.
Framework Setup
Once you have created your project, the extension will automatically detect the framework and provide relevant commands and features. Here's what happens:
Automatic Detection
- Hardhat: Detected by
hardhat.config.js/ts - Truffle: Detected by
truffle-config.jsortruffle.js - Foundry: Detected by
foundry.toml - Solana: Detected by
Anchor.tomlandCargo.toml
Extension Activation
When you open a blockchain project, you'll see:
- 🔧 Blockchain Toolkit icon in the Activity Bar
- 📁 Project explorer with blockchain-specific views
- ⚡ Status bar showing active network and framework
- 🎯 Command palette with blockchain commands
Your First Commands
Now that your project is set up, let's run some basic commands to get familiar with the extension:
Opening the Command Palette
Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) and type "Blockchain" to see all available commands.
Essential Commands to Try
1. Compile Contracts
# Command Palette
Blockchain: Compile Contracts
# Or use framework-specific command
Blockchain: Compile Contracts (Hardhat)
2. Run Tests
# Command Palette
Blockchain: Test
# Framework-specific
Blockchain: Run Tests (Hardhat)
3. Start Local Node
# Command Palette
Blockchain: Start Local Node
4. Deploy Contracts
# Command Palette
Blockchain: Deploy
# Or deploy to specific network
Blockchain: Deploy Contracts
Basic Configuration
The extension works out of the box, but you can customize it through VS Code settings:
Open Settings
Go to File > Preferences > Settings and search for "blockchain" to see all available options.
Key Settings
{
// Core Settings
"blockchain.defaultNetwork": "localhost",
"blockchain.enableGasReporting": true,
"blockchain.solcVersion": "0.8.19",
"blockchain.autoCompile": false,
"blockchain.enableDebugMode": false,
// EVM Debug Settings
"blockchain.evmDebug.autoRefresh": true,
"blockchain.evmDebug.showHexValues": true,
// Security Settings
"blockchain.security.runOnSave": false,
"blockchain.security.minSeverity": "medium"
}
Environment Variables
Create a .env file in your project root for API keys and private keys:
# Network RPC URLs
MAINNET_URL=https://mainnet.infura.io/v3/YOUR_INFURA_KEY
GOERLI_URL=https://goerli.infura.io/v3/YOUR_INFURA_KEY
# Private Keys (use with caution)
PRIVATE_KEY=your_private_key_here
# API Keys
INFURA_KEY=your_infura_project_id
ETHERSCAN_API_KEY=your_etherscan_api_key
.env to your .gitignore file.
Next Steps
Congratulations! You now have Blockchain Toolkit set up and ready to use. Here are some recommended next steps:
Explore Features
- Advanced Debugging - Learn about EVM state debugging and transaction analysis
- Network Management - Configure networks and manage connections
- Security Analysis - Run security scans on your contracts
- Testing Tools - Advanced testing with coverage and gas optimization
Learn More
- Command Reference - Complete list of all 150+ commands
- Examples & Tutorials - Step-by-step project examples
- Advanced Configuration - Detailed configuration options
- Troubleshooting - Common issues and solutions
Join the Community
- GitHub Repository - Source code and issues
- Discussions - Community support and feature requests
- Direct Support - Get help from the creator