Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soumwadeep/indian-crypto-geeks
Basic Voting App Made For "MAKE CRYPTO MOBILE INDIA HACKATHON!"
https://github.com/soumwadeep/indian-crypto-geeks
blockchain dapp ethereum html js json smart-contracts solidity
Last synced: 6 days ago
JSON representation
Basic Voting App Made For "MAKE CRYPTO MOBILE INDIA HACKATHON!"
- Host: GitHub
- URL: https://github.com/soumwadeep/indian-crypto-geeks
- Owner: soumwadeep
- Created: 2021-11-07T06:41:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-10T01:36:43.000Z (about 3 years ago)
- Last Synced: 2024-11-17T09:42:36.860Z (2 months ago)
- Topics: blockchain, dapp, ethereum, html, js, json, smart-contracts, solidity
- Language: JavaScript
- Homepage: https://soumwadeep.github.io/Indian-Crypto-Geeks/
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Indian Crypto Geeks Voting DApp
This is the code of our project## Overview
This is a simple voting web dapp which performs as a voting machine for few persons.
## Dependencies
* ethereumjs-testrpc
* [email protected]
* solcInstall missing dependencies with [npm](https://www.npmjs.com/).
```
> git clone https://github.com/soumwadeep/Indian-Crypto-Geeks.git
> cd Indian Crypto Geeks
> 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
```
soumwadeep:~/indian_crypto_geeks$ 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.
## Credits
The credits for this code goes to the owners of this repo:Soumwadeep And Shreshtha.