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 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"
cd hardhat
yarn build
cd hardhat
yarn documentation
cd hardhat
yarn test
cd hardhat
yarn coverage
Local
cd hardhat
yarn deploy:dev
Goerli
cd hardhat
yarn deploy:goerli
Sepolia
cd hardhat
yarn deploy:sepolia
Mumbai
cd hardhat
yarn deploy:mumbai
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/).
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 build
You can start it using these commands:
cd client
yarn start