Hedera Governance Software
This repository contains tools that easily facilitate on-chain governance utilizing the Hedera public network. It leverages the Hedera Consensus Service (HCS) to enable decentralized communities (like a DAO) to vote with their account's 'weight' of fungible token holdings created on the Hedera Token Service (HTS).
It is comprised of a read-only server that computes state based off of HCS message history, and a web application that enables users to easily participate in governance. Additionally it includes cli's written in both TypeScipt and .NET that can be used to validate that the system works as intended, regardless of what client you are using to interact with the Hedera network.
This is alpha software. It has not been audited. Use at your own risk.
This software adheres to the standards defined within CGIP-4 to facilitate decentralized voting utilizing the Hedera network. It leverages an HCS topic that is created without submission keys allowing anyone to submit messages to the topic. CGIP-4 defines the messages that need to be sent to the HCS topic to create a new proposal, vote on an existing proposal (with the weight of a specific HTS token holding), and validate the results of a proposal. While this is a convenient interface and API to utilize, notably users can interact with the Hedera network directly and do not need to utilize any of this software, as long as their interactions adhere to the standards defined within CGIP-4.
This project and it's components can be ran through Docker.
git clone https://github.com/the-creators-galaxy/hcs-governance
cd hcs-governance
cp example.env .env
docker-compose build
docker-compose up
Update the .env
with which network to connect to, the HCS topic, and HTS voting token.
Presently there is an issue with docker compose and the format of this project that not all source
code changes are necessarily identified by docker - in order to to ensure code changes are included when starting the suite of services, include --force-recreate
with the docker-compose up
command. Or alternatively issue a docker-compose build
command prior to docker-compose up
.
Open a browser at http://localhost:3001/api/v1/info
The results returned should contain something similar to the following:
{
"mirrorGrpc": "hcs.testnet.mirrornode.hedera.com:5600",
"mirrorRest": "testnet.mirrornode.hedera.com",
"htsToken": "0.0.29582024",
"hcsTopic": "0.0.29582032",
"lastUpdated": "1643835023.175810829"
}