A simple, yet powerful decentralized counter application built on the Flow EVM Testnet. This smart contract demonstrates basic state management and interaction patterns in Solidity.
The Counter smart contract is a minimalist decentralized application that allows users to:
- Increment the counter value
- Decrement the counter value
- Query the current counter value
This project serves as a foundational example for understanding smart contract development, deployment, and interaction on the Flow blockchain.
Flow EVM provides Ethereum compatibility on Flow's high-performance blockchain, offering:
- Low transaction costs
- Fast finality
- EVM compatibility
- Scalable infrastructure
| Property | Value |
|---|---|
| Contract Address | 0x6a5b6a369CeB346F7cC602a327353Bc1B470225F |
| Network | Flow EVM Testnet |
| Transaction Hash | 0x062f24cd490123845c1596a95d73d2323de053892a9eb121eb926537ee7f8d34 |
| Block Number | 74315522 |
| Deployer Address | 0x4B1d0a004038086F2d18E59DC3e56E7b9C19614a |
| Gas Used | 150,987 gas |
| Deployment Status | β Successful |
- Solidity
^0.8.0- Smart contract programming language - MIT License - Open source licensing
- Flow EVM Testnet - Deployment network
- EVM Compatible - Ethereum Virtual Machine support
- Remix IDE - Smart contract development and deployment
- MetaMask - Wallet integration and transaction signing
- Flow EVM RPC - Network connection
- Type: Public
- Description: Increases the counter value by 1
- Gas Cost: ~26,000 gas (approx.)
- Type: Public
- Description: Decreases the counter value by 1
- Gas Cost: ~26,000 gas (approx.)
- Type: Public View
- Returns:
int256- Current counter value - Description: Retrieves the current counter value
- Gas Cost: Free (read-only)
- MetaMask wallet configured for Flow EVM Testnet
- Test FLOW tokens for gas fees
Add the following network to your MetaMask:
Network Name: Flow EVM Testnet
RPC URL: https://testnet.evm.nodes.onflow.org
Chain ID: 545
Currency Symbol: FLOW
Block Explorer: https://evm-testnet.flowscan.io
You can interact with the deployed contract using:
-
Remix IDE
- Load the contract at the deployed address
- Connect to Flow EVM Testnet
- Call functions through the UI
-
Web3.js/Ethers.js
const contractAddress = "0x6a5b6a369CeB346F7cC602a327353Bc1B470225F"; const abi = [...]; // Contract ABI const contract = new ethers.Contract(contractAddress, abi, signer); // Increment counter await contract.increment(); // Get current count const count = await contract.getCount(); console.log("Current count:", count.toString());
-
Block Explorer
- Visit: Flow EVM Testnet Explorer
- Search for contract:
0x6a5b6a369CeB346F7cC602a327353Bc1B470225F
flow/
β
βββ counter.sol # Smart contract source code
βββ readme.md # Project documentation
- β
Uses Solidity
^0.8.0with built-in overflow protection - β Simple, auditable codebase
- β No external dependencies
β οΈ No access control implemented (anyone can modify counter)
- Access Control: Implement Ownable pattern to restrict who can modify the counter
- Events: Add event emissions for increment/decrement actions for better tracking
- Reset Function: Add ability to reset counter to zero
- Set Function: Allow setting counter to a specific value
- Frontend: Build a React/Next.js web interface for easier interaction
- Multi-Counter: Support multiple named counters in a single contract
- Counter History: Store historical counter values with timestamps
- Limits: Add configurable min/max bounds for the counter
- Batch Operations: Allow incrementing/decrementing by custom amounts
- Unit Tests: Add comprehensive test suite using Hardhat/Foundry
- Governance: Implement DAO-style voting for counter modifications
- NFT Integration: Mint NFTs at milestone counter values
- Cross-chain: Deploy to multiple EVM chains
- Analytics Dashboard: Build comprehensive usage analytics
- Gas Optimization: Further optimize contract for lower gas costs
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Feel free to:
- Open issues for bugs or suggestions
- Submit pull requests with improvements
- Share feedback and ideas
Developed and deployed by: 0x4B1d0a004038086F2d18E59DC3e56E7b9C19614a
β If you find this project useful, please consider giving it a star!
Built with β€οΈ on Flow EVM Testnet

