Skip to content

Repository files navigation

BitGov

BitGov is an exploration of decentralized digital democracy using Solidity smart contracts on the Ethereum blockchain.


What is Solidity?

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.


Contracts

Contract Description Docs
HelloWorld Classic starter — stores and updates a greeting string on-chain docs/intro/HelloWorld.md
BallotContract One-person-one-vote ballot with delegation support docs/voting/BallotContract.md
TokenWeightedVote Token-weighted voting with partial/split vote support docs/voting/TokenWeightedVote.md
XCAD Centrally issued Canadian-dollar stablecoin prototype with owner-controlled minting docs/tokens/XCAD.md
BITGOV Scarce ERC-20 token with a Bitcoin-style hard cap and fixed deployment supply docs/tokens/BITGOV.md

Each contract page includes a full interface reference, event list, step-by-step deployment instructions, and an interactive Hardhat console walkthrough.


Project Setup

This project uses Hardhat — the most widely used Ethereum development environment.

Prerequisites

Install dependencies

npm install

Compile contracts

npm run compile

Run tests

npm test

Deploy locally (Hardhat network)

# Start a local Hardhat node (first terminal)
npx hardhat node

# Deploy a contract (second terminal)
npx hardhat ignition deploy ignition/modules/voting/BallotContract.ts --network localhost
npx hardhat ignition deploy ignition/modules/voting/TokenWeightedVote.ts --network localhost
npx hardhat ignition deploy ignition/modules/intro/HelloWorld.ts --network localhost
npx hardhat ignition deploy ignition/modules/tokens/XCAD.ts --network localhost
npx hardhat ignition deploy ignition/modules/tokens/BITGOV.ts --network localhost

Next Steps

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

License

MIT

Used by

Contributors

Languages