Skip to main content

Overview

The simplest starting point for Web3 development. Includes two contracts — a Counter for learning state management and a SimpleToken ERC-20 — with full test suites.

Quick Start

Generated Files

my-app
dokrypt.yaml
foundry.toml
README.md
contracts
Counter.sol
SimpleToken.sol
test
Counter.t.sol
SimpleToken.t.sol
scripts
deploy.js

Configuration

Contracts

Counter.sol

A simple state management contract for learning the basics. Storage:
  • uint256 public number — The stored counter value
Functions: Events:
  • NumberChanged(uint256 newNumber) — Emitted on every state change

SimpleToken.sol

A minimal ERC-20 token implementation. Constructor:
Mints initialSupply tokens to the deployer. Functions: Constants: 18 decimals

Deployment

The script deploys both Counter and SimpleToken and outputs their addresses.

Testing

Tests cover:
  • Counter: increment, decrement, setNumber, reset, underflow revert
  • SimpleToken: transfer, approve, transferFrom, mint, access control