Need help with Your_First_Decentralized_Application?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

llSourcell
408 Stars 227 Forks 19 Commits 14 Opened issues

Description

This is the code for "A Guide to Building Your First Decentralized Application" by Siraj Raval on Youtube

Services available

!
?

Need anything else?

Contributors list

# 11,867
Jupyter...
MATLAB
Lua
IPFS
7 commits
# 191,036
django-...
oauth2
Django
HTML
3 commits
# 55,029
yahoo-f...
algorit...
CSS
HTML
1 commit
# 243,712
wasm
webasse...
assembl...
TypeScr...
1 commit
# 59,297
HTML
Linux
Tensorf...
PHP
1 commit

YourFirstDecentralized_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 video on Youtube by Siraj Raval. It's a guide on how to build your first decentralized application.

Dependencies

Install missing dependencies with npm.

> git clone [email protected]: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 tutorial for more details.

Credits

The credits for this code go to maheshmurthy. I've merely created a wrapper to get people started.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.