https://github.com/tigerengine124/voting-dapp
Web based Online Voting and Campaigning Portal with an AI Chatbot
https://github.com/tigerengine124/voting-dapp
decentralized-applications python-chat solidity solidity-dapps
Last synced: about 2 months ago
JSON representation
Web based Online Voting and Campaigning Portal with an AI Chatbot
- Host: GitHub
- URL: https://github.com/tigerengine124/voting-dapp
- Owner: TigerEngine124
- Created: 2025-03-20T07:41:31.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-20T07:51:39.000Z (over 1 year ago)
- Last Synced: 2025-04-01T04:33:08.848Z (about 1 year ago)
- Topics: decentralized-applications, python-chat, solidity, solidity-dapps
- Language: CSS
- Homepage:
- Size: 10.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Your_First_Decentralized_Application
This is the code for "A Guide to Building Your First Decentralized Application" by Siraj Raval on Youtube
## Overview
This is the code for [this](https://youtu.be/gSQXq2_j-mw) video on Youtube by Siraj Raval. It's a guide on how to build your first decentralized application.
## Dependencies
* ethereumjs-testrpc
* web3@0.20.1
* solc
Install missing dependencies with [npm](https://www.npmjs.com/).
```
> git clone git@github.com:llSourcell/Your_First_Decentralized_Application.git
> cd Your_First_Decentralized_Application
> npm install
```
## Usage
After all dependancies are installed, run the `testrpc` service with:
```
node_modules/ethereumjs-testrpc/build/cli.node.js
```
Run the following commands to open the node console then deploy your contract to the test chain
```
siraj:~/hello_world_voting$ node
> Web3 = require('web3')
> web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
> code = fs.readFileSync('Voting.sol').toString()
> solc = require('solc')
> compiledCode = solc.compile(code)
> abiDefinition = JSON.parse(compiledCode.contracts[':Voting'].interface)
> VotingContract = web3.eth.contract(abiDefinition)
> byteCode = compiledCode.contracts[':Voting'].bytecode
> deployedContract = VotingContract.new(['Rama','Nick','Jose'],{data: byteCode, from: web3.eth.accounts[0], gas: 4700000})
> deployedContract.address
> contractInstance = VotingContract.at(deployedContract.address)
```
Interact with the contract via the html page attached, just open it in your browser. See [this](https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-1-40d2d0d807c2) tutorial for more details.