e-vo
所属分类:以太坊
开发工具:Python
文件大小:684KB
下载次数:0
上传日期:2021-07-12 19:11:40
上 传 者:
sh-1993
说明: 一个基于python的去中心化投票应用程序,使用以太坊、布朗尼和django
(A decentralised voting application built on python using ethereum, brownie and django)
文件列表:
.prettierrc (26, 2021-07-12)
assets (0, 2021-07-12)
assets\bootstrap-5.0.1 (0, 2021-07-12)
assets\bootstrap-5.0.1\css (0, 2021-07-12)
assets\bootstrap-5.0.1\css\bootstrap.min.css (155631, 2021-07-12)
assets\bootstrap-5.0.1\css\bootstrap.min.css.map (429472, 2021-07-12)
assets\bootstrap-5.0.1\js (0, 2021-07-12)
assets\bootstrap-5.0.1\js\bootstrap.bundle.min.js (78748, 2021-07-12)
assets\bootstrap-5.0.1\js\bootstrap.bundle.min.js.map (326390, 2021-07-12)
assets\logo.png (47682, 2021-07-12)
assets\style.css (612, 2021-07-12)
assets\test (0, 2021-07-12)
assets\test\test.jpg (59692, 2021-07-12)
assets\voters (0, 2021-07-12)
assets\voters\1.jpg (126447, 2021-07-12)
assets\voters\3.jpg (194499, 2021-07-12)
candidates (0, 2021-07-12)
candidates\__init__.py (0, 2021-07-12)
candidates\admin.py (61, 2021-07-12)
candidates\apps.py (94, 2021-07-12)
candidates\forms.py (976, 2021-07-12)
candidates\migrations (0, 2021-07-12)
candidates\migrations\0001_initial.py (604, 2021-07-12)
candidates\migrations\0002_auto_20210427_1517.py (359, 2021-07-12)
candidates\migrations\0003_delete_candidate.py (301, 2021-07-12)
candidates\migrations\__init__.py (0, 2021-07-12)
candidates\migrations\__pycache__ (0, 2021-07-12)
candidates\migrations\__pycache__\0001_initial.cpython-38.pyc (736, 2021-07-12)
candidates\migrations\__pycache__\0001_initial.cpython-39.pyc (712, 2021-07-12)
candidates\migrations\__pycache__\0002_auto_20210427_1517.cpython-38.pyc (571, 2021-07-12)
candidates\migrations\__pycache__\0002_auto_20210427_1517.cpython-39.pyc (547, 2021-07-12)
candidates\migrations\__pycache__\__init__.cpython-38.pyc (180, 2021-07-12)
candidates\migrations\__pycache__\__init__.cpython-39.pyc (156, 2021-07-12)
candidates\models.py (76, 2021-07-12)
candidates\templates (0, 2021-07-12)
candidates\templates\admin_home.html (5220, 2021-07-12)
candidates\templates\admin_login.html (866, 2021-07-12)
candidates\templates\candidate_registration.html (1389, 2021-07-12)
... ...
# E-vo
An e-voting system using Blockchain
## Initial Setup:
1. Install [Ganache](https://www.trufflesuite.com/ganache) on your system.
###### Ganache is a personal Ethereum blockchain which you can use to run tests, execute commands, and inspect state while controlling how the chain operates.
2. Install the required packages by running:
```bash
pip install -r requirements.txt
```
3. Add a brownie development network by running the following command:
```bash
brownie networks add development gui host='http://127.0.0.1:7545' cmd=ganache
```
###### You have now told brownie that you have a blockchain network, meant for development purposes and named it gui, since it has a nice gui interface from ganache. We use this blockchain network to deploy our smart contracts from inside e-vo.
## Running the application:
1. Open Ganache.
2. Run the following commands.
```bash
cd path-to-evo/
python deploy.py
python manage.py runserver
```
## Recompiling Smart contracts:
###### If you wish to make any changes to the blockchain smart contracts, you mut recompile it after doing so. The following comand does it.
```bash
cd path-to-evo/ethereum/
brownie compile --all
```
## References:
* eth-brownie [documentation](https://readthedocs.org/projects/eth-brownie/downloads/pdf/v1.3.1_a/)
* web3.py [documentation](https://web3py.readthedocs.io/en/stable/)
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
近期下载者:
相关文件:
收藏者: