Skip to content

BlockchainEtSociete/DAO

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockchain & Société DAO License: MIT

Table of Contents

Presentation

This project allows to manage tour membership to B&S. It also gives you access to the association services using a secure SBT based authentication mechanism, and rights to participate at the association.

Structure

The project contains the following main folders:

front (Front UI)
|
+-- public (static files)
|
+-- src (React sources)

hardhat (Smart Contract)
|
+-- contracts (Solidity source file of the smart contract)
|
+-- deploy (Deployment script)
|
+-- test (Unit tests)
|
+-- coverage (Coverage of tests reports - created dynamically when running coverage)

Installation

To run the tests, you'll need to execute the following commands to install the required dependencies:

$ git clone https://github.com/BlockchainEtSociete/DAO.git
$ yarn install

Then copy the .env.dist file as .env:

cp .env.dist .env

Edit the .env file and set your mnemonic, infura id and alchemy id:

MNEMONIC="YOUR_MNEMONIC"
INFURA_ID="AN_INFURA_ID"
ALCHEMY_ID="AN_ALCHEMY_ID"

Commands

Compile smart contrat

cd hardhat
yarn build

Generate documentation

cd hardhat
yarn documentation

Run tests without coverage

cd hardhat
yarn test

Run tests with coverage

cd hardhat
yarn coverage

Deploy smart contrat

Local

cd hardhat
yarn deploy:dev

Goerli

cd hardhat
yarn deploy:goerli

Sepolia

cd hardhat
yarn deploy:sepolia

Mumbai

cd hardhat
yarn deploy:mumbai

Start a local JSON-RPC node

You can start a local JSON-RPC node to be able to interact with HardHat network using a JSON-RPC client like a wallet.

yarn dev

When using MetaMask, you should prefer to start Ganache (https://trufflesuite.com/ganache/).

Front commands

The front app allows you to easily interact with voting contract and manage a complete vote.

Build

To build the front app, use the following commands:

cd client
yarn build

Start the front app

You can start it using these commands:

cd client
yarn start

About

DAO application for Blockchain & Société NGO

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.3%
  • Solidity 40.4%
  • Other 2.3%