DAO-Test-Fractio is a decentralized autonomous organization (DAO) implementation project built using Solidity smart contracts and a React frontend. This project aims to demonstrate the core functionalities of a DAO for Fractio's platform, including membership management, proposal creation, voting, and execution.
DAO-Test/
│
├── contracts/
│ └── Governance.sol
│
├── migrations/
│ └── 2_deploy_contracts.js
│
├── test/
│ └── governance.js
│
├── Dockerfile
├── update-docker-image.sh
├── truffle-config.js
├── package.json
└── README.md
This is the main smart contract for the DAO. It includes functionality for:
- Membership management (adding/removing members, updating KYC status)
- Proposal creation
- Voting on proposals
- Proposal execution
- Admin functions (setting quorum percentage and voting period)
-
Clone the repository:
git clone https://github.com/your-username/DAO-Test.git cd DAO-Test
-
Install dependencies:
npm install
-
Install Truffle globally (if not already installed):
npm install -g truffle
-
Compile the smart contracts:
truffle compile
-
Run tests:
truffle test
To deploy the smart contracts to a local blockchain (like Ganache):
-
Start Ganache (or your preferred local blockchain)
-
Deploy the contracts:
truffle migrate
To deploy to a testnet or mainnet, update the truffle-config.js
file with the appropriate network settings and use:
truffle migrate --network <network-name>
This project includes a Dockerfile for easy containerization.
To build the Docker image:
docker build -t dao-test .
To run the Docker container:
docker run -p 3000:3000 dao-test
The project includes a script to automatically update the Docker image after each truffle migrate
.
-
Make the script executable:
chmod +x update-docker-image.sh
-
Run the script:
./update-docker-image.sh
-
Ensure the script is named
update-docker-image.bat
-
Run the script:
`.\update-docker-image.bat`
This script will run truffle migrate
, and if successful, it will rebuild the Docker image.
The project includes a comprehensive test suite for the Governance contract. To run the tests:
truffle console - runs truffle development console
test - runs the test script, 'truffle' is not needed when using the truffle dev suite.
- Frontend development using React
- Integration with Web3.js for interacting with the smart contract
- Implementation of additional DAO features and improvements
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
DAO-Test/
│
├── contracts/
│ └── Governance.sol
│
├── migrations/
│ └── 2_deploy_contracts.js
│
├── test/
│ └── governance.js
│
├── truffle-config.js
├── package.json
└── README.md
This is the main smart contract for the DAO. It includes functionality for:
- Membership management (adding/removing members, updating KYC status)
- Proposal creation
- Voting on proposals
- Proposal execution
- Admin functions (setting quorum percentage and voting period)
-
Clone the repository:
git clone https://github.com/your-username/DAO-Test.git cd DAO-Test
-
Install dependencies:
npm install
-
Install Truffle globally (if not already installed):
npm install -g truffle
-
Compile the smart contracts:
truffle compile
-
Run tests:
truffle test
To deploy the smart contracts to a local blockchain (like Ganache):
-
Start Ganache (or your preferred local blockchain)
-
Deploy the contracts:
truffle migrate
To deploy to a testnet or mainnet, update the truffle-config.js
file with the appropriate network settings and use:
truffle migrate --network <network-name>
The project includes a comprehensive test suite for the Governance contract. To run the tests:
truffle test
- Frontend development using React
- Integration with Web3.js for interacting with the smart contract
- Implementation of additional DAO features and improvements
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.