Skip to content

Soltest CLI Documentation โ€‹

Welcome to Soltest CLI - a powerful command-line tool for Solidity smart contract development, testing, and deployment.

๐Ÿš€ Quick Start โ€‹

Installation โ€‹

bash
# Install globally
bun install -g soltest-cli

# Or use in your project
bun add soltest-cli

Initialize a New Project โ€‹

bash
# Create a new Soltest project
soltest init

# Follow the interactive prompts to set up your project

Basic Workflow โ€‹

bash
# 1. Compile your contracts
soltest compile

# 2. Run tests
soltest test

# 3. Deploy to network
soltest deploy --contract Token --network local

# 4. Verify on block explorer
soltest verify --contract Token --address 0x... --network sepolia

๐Ÿ“‹ What is Soltest CLI? โ€‹

Soltest CLI is a comprehensive development toolkit for Solidity smart contracts that provides:

  • ๐Ÿ”จ Compilation - Compile Solidity contracts with customizable settings
  • ๐Ÿงช Testing - Run tests with Ganache integration and gas reporting
  • ๐Ÿš€ Deployment - Deploy contracts to multiple networks
  • ๐Ÿ” Verification - Verify contracts on block explorers
  • ๐Ÿ“Š Coverage - Generate code coverage reports
  • ๐Ÿ”’ Security - Scan contracts for vulnerabilities
  • ๐Ÿ”„ Upgrades - Manage proxy contract upgrades
  • ๐Ÿ”Œ Plugins - Extensible plugin architecture

๐Ÿ—๏ธ Project Structure โ€‹

After running soltest init, your project will have this structure:

my-soltest-project/
โ”œโ”€โ”€ contracts/          # Smart contracts
โ”œโ”€โ”€ test/              # Test files
โ”œโ”€โ”€ scripts/           # Deployment scripts
โ”œโ”€โ”€ build/             # Compiled artifacts
โ”œโ”€โ”€ plugins/           # Custom plugins
โ”œโ”€โ”€ soltest.config.js  # Configuration
โ””โ”€โ”€ package.json       # Dependencies

โš™๏ธ Configuration โ€‹

Soltest uses a configuration file soltest.config.js to manage settings:

javascript
module.exports = {
  networks: {
    local: {
      url: 'http://127.0.0.1:8545',
      accounts: 'ganache',
      chainId: 1337
    },
    sepolia: {
      url: 'https://sepolia.infura.io/v3/YOUR_INFURA_KEY',
      accounts: ['PRIVATE_KEY_FROM_ENV'],
      chainId: 11155111
    }
  },
  solc: {
    version: '0.8.20',
    optimizer: {
      enabled: true,
      runs: 200
    },
    evmVersion: 'paris'
  },
  paths: {
    contracts: './contracts',
    tests: './test',
    build: './build'
  }
};

๐ŸŒ Supported Networks โ€‹

Soltest supports deployment to various networks:

  • Local Development: Ganache, Hardhat Network
  • Testnets: Sepolia, Goerli, Mumbai, BSC Testnet
  • Mainnets: Ethereum, Polygon, BSC, Arbitrum, Avalanche

๐Ÿ”Œ Plugin System โ€‹

Soltest features a powerful plugin architecture that allows you to:

  • Add custom commands
  • Extend functionality
  • Integrate with external tools
  • Automate workflows

Learn more about creating plugins.

๐Ÿ“š Documentation Sections โ€‹

๐Ÿ†˜ Getting Help โ€‹

๐Ÿ“„ License โ€‹

MIT License - see the project repository for license details.


Ready to get started? Check out the CLI Reference to explore all available commands!

Released under the MIT License.