This repository contains a simple, production-ready setup for deploying a Solidity smart contract (a basic Counter) to the Celo Sepolia testnet using Hardhat. It’s tailored to be beginner-friendly while keeping a clean structure for real-world use.
The mission was to deploy a simple Counter smart contract to the Celo Sepolia test network using Hardhat. The Counter contract has one main purpose: it keeps track of a number that can be increased or decreased.
To achieve this, a Hardhat project was set up with the required tools. The environment included Node.js, Hardhat, and the Celo Sepolia RPC URL. The deployer’s private key was stored safely using environment variables.
A deployment script was created, which instructed Hardhat to compile the Counter contract and send it to the Celo Sepolia blockchain. After running the deployment command, the contract was successfully deployed, and a contract address was received. This confirmed that the deployment was successful.
The mission concluded with the Counter contract live on the Celo Sepolia testnet, ready for interaction. Users can now call functions to increase, decrease, or read the counter value directly from the blockchain.
How to count a solidity smart contract.
The contract exposes a minimal on-chain counter with functions to increment, decrement (with a safety check so it never goes below zero), and read the current count. The included Hardhat scripts compile and deploy the contract to the Celo Sepolia network.
India