Skip to main content
This guide walks you through creating a project, starting the development environment, and running your first tests.

Step 1: Create a Project

Scaffold a new project from a built-in template:
dokrypt init my-dapp --template evm-basic
This creates a my-dapp/ directory with:
my-dapp
dokrypt.yaml
foundry.toml
contracts
Counter.sol
SimpleToken.sol
test
Counter.t.sol
SimpleToken.t.sol
scripts
deploy.js
README.md
Use dokrypt template list to see all 5 available templates: evm-basic, evm-token, evm-nft, evm-dao, evm-defi.

Step 2: Start the Environment

cd my-dapp
dokrypt up
Dokrypt pulls the required Docker images and starts a local Anvil blockchain node:
Starting services...
✓ ethereum    Ready  ▸ http://localhost:8545

Accounts (10000 ETH each):
  0x70997970C51812dc3A010C7d01b50e0d17dc79C8
  0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
  ...

Started 1 service in 3.2s
Your local chain is now running at http://localhost:8545 with 10 pre-funded accounts.

Step 3: Check Status

dokrypt status
Service         Status      Port   URL
ethereum (anvil) ● Ready    8545   http://localhost:8545

Step 4: Run Tests

dokrypt test run
Dokrypt discovers and runs your Solidity tests:
Running test suite: contracts
  ✓ test_increment (12ms)
  ✓ test_set_number (8ms)
  ✓ test_decrement (9ms)
  ✓ test_token_transfer (15ms)

4 passed, 0 failed (44ms)
Add --gas-report for gas analysis:
dokrypt test run --gas-report

Step 5: Use Chain Utilities

While your environment is running, you can manipulate the chain:
# Mine 10 blocks
dokrypt chain mine 10

# Time-travel 1 day into the future
dokrypt chain time-travel 1d

# Fund an address with 500 ETH
dokrypt chain set-balance 0x1234...abcd 500

# Get chain info
dokrypt chain info

Step 6: Save a Snapshot

Save the current chain state so you can restore it later:
dokrypt snapshot save clean-state --description "Fresh deployment"
After making changes, restore it:
dokrypt snapshot restore clean-state

Step 7: Fork Mainnet

Test against real protocol state by forking a live network:
dokrypt fork mainnet --block 18500000
Now your local chain has the full state of Ethereum mainnet at block 18,500,000. You can interact with Uniswap, Aave, and any other deployed contracts.

Step 8: Stop the Environment

dokrypt down
Add --volumes to remove persistent data:
dokrypt down --volumes

Next Steps