This is a demo portfolio server project of a DAO / Governance Protocol. It provides an API with endpoints to connect a client to the protocol
- Governance Service:
- Get proposals list
- Get proposal details (votes, stats)
- Create new proposal
- Vote on proposals
- Network Service:
- Get network status
Config environment in a new .env
file.
Currently supporting networks 'hardhat', 'sepolia', 'mainnet'
Default configuration Every env variable has a default to be used with Sepolia test network
# .env
NETWORK=<NETWORK_NAME>
ETHERSCAN_API_KEY=<KEY>
DEPLOYER_ACCOUNT_PRIVATE_KEY=<KEY>
COINMARKETCAP_API_KEY=<KEY>
# Install project dependencies
$ yarn install
To run and test the protocol using the local blockchain. As the protocol is automatically deployed when using the local blockchain, the next step should be skipped.
# .env
NETWORK="hardhat"
Open a new terminal window and navigate ($ cd /<project directory>
) into project's main folder. Leave it open, as it will be running the local network.
Fake Accounts list will be needed to use with the Metamask wallet provider in the browser.
Account #0: Is the protocol deployer's account and will own all governance tokens that should be distributed among the other accounts (community members)
# Run hardhat node and mount local blockchain
$ npx hardhat node
To deploy
# Deploy protocol in local hardhat blockchain
$ yarn hardhat deploy --network hardhat
# Deploy protocol in testnet blockchain (for example 'sepolia')
$ yarn hardhat deploy --network sepolia
# development
$ yarn run start
# Development watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod