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-cliInitialize a New Project โ
bash
# Create a new Soltest project
soltest init
# Follow the interactive prompts to set up your projectBasic 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 โ
- CLI Reference - Complete command reference
- Examples - Real-world usage examples
- API Documentation - Programmatic usage
- Plugin Development - Creating custom plugins
- Troubleshooting - Common issues and solutions
๐ Getting Help โ
- GitHub Issues: Report bugs or request features
- Documentation: Browse the complete docs in this site
- Community: Join discussions in GitHub Discussions
๐ License โ
MIT License - see the project repository for license details.
Ready to get started? Check out the CLI Reference to explore all available commands!