BitGov is an exploration of decentralized digital democracy using Solidity smart contracts on the Ethereum blockchain.
Solidity is a statically-typed, object-oriented programming language designed specifically for writing smart contracts — self-executing programs that live on the Ethereum blockchain.
Key properties:
- Deterministic — the same inputs always produce the same outputs, on every node worldwide.
- Trustless — no central authority controls execution; the EVM (Ethereum Virtual Machine) does.
- Immutable — once deployed, contract code cannot be changed (unless explicitly designed to be upgradeable).
- Transparent — all contract code and state is publicly verifiable on-chain.
These properties make Solidity a natural fit for governance applications where trust, transparency, and censorship-resistance matter.
| Contract | Description | Docs |
|---|---|---|
HelloWorld |
Classic starter — stores and updates a greeting string on-chain | docs/HelloWorld.md |
BallotContract |
One-person-one-vote ballot with delegation support | docs/BallotContract.md |
TokenWeightedVote |
Token-weighted voting with partial/split vote support | docs/TokenWeightedVote.md |
Each contract page includes a full interface reference, event list, step-by-step deployment instructions, and an interactive Hardhat console walkthrough.
This project uses Hardhat — the most widely used Ethereum development environment.
- Node.js >= 20
- npm >= 9
npm installnpm run compilenpm test# Start a local Hardhat node (first terminal)
npx hardhat node
# Deploy a contract (second terminal)
npx hardhat ignition deploy ignition/modules/BallotContract.ts --network localhost
npx hardhat ignition deploy ignition/modules/TokenWeightedVote.ts --network localhost
npx hardhat ignition deploy ignition/modules/HelloWorld.ts --network localhostbitgov/
├── contracts/ # Solidity smart contracts
│ ├── HelloWorld.sol
│ ├── BallotContract.sol
│ └── TokenWeightedVote.sol
├── docs/ # Contract-specific documentation and interaction guides
│ ├── HelloWorld.md
│ ├── BallotContract.md
│ └── TokenWeightedVote.md
├── ignition/
│ └── modules/ # Hardhat Ignition deployment modules
│ ├── HelloWorld.ts
│ ├── BallotContract.ts
│ └── TokenWeightedVote.ts
├── test/ # TypeScript test suite (Mocha + Ethers.js)
│ ├── HelloWorld.ts
│ ├── BallotContract.ts
│ └── TokenWeightedVote.ts
├── hardhat.config.ts # Hardhat configuration
└── tsconfig.json # TypeScript configuration
From this foundation, BitGov will grow to explore on-chain governance primitives:
- Proposals — on-chain creation, discussion, and execution of governance proposals
- Identity — decentralized citizen identity using OpenZeppelin
- Treasury — collectively controlled funds released by vote outcome