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.
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)
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 installThen copy the .env.dist file as .env:
cp .env.dist .envEdit 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"cd hardhat
yarn buildcd hardhat
yarn documentationcd hardhat
yarn testcd hardhat
yarn coverageLocal
cd hardhat
yarn deploy:devGoerli
cd hardhat
yarn deploy:goerliSepolia
cd hardhat
yarn deploy:sepoliaMumbai
cd hardhat
yarn deploy:mumbaiYou can start a local JSON-RPC node to be able to interact with HardHat network using a JSON-RPC client like a wallet.
yarn devWhen using MetaMask, you should prefer to start Ganache (https://trufflesuite.com/ganache/).
The front app allows you to easily interact with voting contract and manage a complete vote.
To build the front app, use the following commands:
cd client
yarn buildYou can start it using these commands:
cd client
yarn start