Welcome to DappTools Documentation
Command-line tools for Ethereum smart contract development
What is DappTools?
DappTools is a suite of Ethereum-focused CLI tools following the Unix philosophy, created by Dapp Hub. The suite includes several tools that help with Ethereum smart contract development:
- Dapp: Build, test, and deploy smart contracts
- Seth: Interact with Ethereum nodes
- Hevm: Specialized EVM debugger and testing tool
- Ethsign: Sign Ethereum transactions
DappTools focuses on command-line workflows, allowing developers to leverage familiar shell tools. Key features include:
- Fast compilation with incremental builds
- Source-matched test coverage for Solidity contracts
- Property-based testing to find edge cases
- Transaction debugging with source highlighting
- Gas usage analysis for optimization
- Symbolic execution for formal verification
DappTools embodies the Unix philosophy: each tool does one thing and does it well. This design approach offers several advantages:
- Composability: Tools can be combined in powerful ways
- Scripting: Easy to automate with bash scripts
- Minimal assumptions: Works with your existing tools
- Strong abstractions: Each component has a clear purpose
This philosophy enables developers to build custom workflows tailored to their specific needs, rather than forcing them into opinionated frameworks.
Installation
curl -L https://nixos.org/nix/install | sh
nix-env -iA ethereum.dapp
This will install the Nix package manager and then use it to install DappTools.
curl -L https://nixos.org/nix/install | sh
nix-env -iA ethereum.dapp
For Linux, you may need to ensure you have all the required dependencies installed on your system.
For Windows users, you'll need to install the Windows Subsystem for Linux (WSL) first:
- Install WSL following Microsoft's instructions
- Open your WSL terminal and run:
curl -L https://nixos.org/nix/install | sh
nix-env -iA ethereum.dapp
Examples
Creating a New Project
mkdir my-dapp && cd my-dapp
dapp init
This creates a new Dapp project with the standard directory structure.
Building Smart Contracts
dapp build
Compiles all Solidity contracts in the src/ directory.
Running Tests
dapp test
Runs all tests found in the src/ directory.
Official Resources
DappTools GitHub Repository
The official repository containing Dapp and related tools, with comprehensive documentation, installation instructions, and code examples.
View RepositoryDapp Documentation
Official documentation explaining Dapp's features, commands, and usage patterns with detailed examples for smart contract development.
View DocumentationDappHub Website
The primary website for all DappTools components, featuring introduction guides and links to individual tool documentation.
Visit WebsiteFrequently Asked Questions
DappTools differs from Hardhat and Truffle in its philosophy and approach:
- Philosophy: DappTools follows the Unix philosophy with composable command-line tools, while Hardhat and Truffle are more framework-oriented.
- Configuration: DappTools requires minimal configuration, whereas Hardhat and Truffle use JavaScript configuration files.
- Workflow: DappTools emphasizes command-line operations, while Hardhat and Truffle are more JavaScript-centric.
Yes, DappTools can be used with existing Solidity projects. You may need to adjust your project structure slightly to match DappTools' expectations:
- Place your contracts in the
src/directory - Create test files that follow the DappTools testing pattern
- Configure
.dapprcfor your specific project needs
DappTools regularly updates its Solidity compiler support. You can specify the Solidity version in your .dapprc file:
export DAPP_SOLC_VERSION=0.8.10
Check the GitHub repository for the latest supported versions.
Ready to get started with DappTools?
Join the community of Ethereum developers using DappTools for efficient smart contract development.