All Projects → adamyala → Your_first_decentralized_application_python

adamyala / Your_first_decentralized_application_python

Licence: mit
An up to date and bare minimum tutorial on deploying smart contracts with python

Programming Languages

115432 projects - #7 most used programming language
903 projects

Projects that are alternatives of or similar to Your first decentralized application python

Learn Solidity
Code base for "Learn Solidity: Programming Language for Ethereum Smart Contracts" course in Tosh Academy & Blockchain Council
Stars: ✭ 44 (-66.67%)
Mutual labels:  blockchain, ethereum, smart-contracts, tutorial
Eth Crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
Stars: ✭ 420 (+218.18%)
Mutual labels:  blockchain, ethereum, smart-contracts, tutorial
Ethereum Development With Go Book
📖 A little book on Ethereum Development with Go (golang)
Stars: ✭ 754 (+471.21%)
Mutual labels:  blockchain, ethereum, smart-contracts, tutorial
This has been moved to
Stars: ✭ 1,063 (+705.3%)
Mutual labels:  blockchain, ethereum, smart-contracts
Smart Contracts Example
Simple example of token market. Based on blockchain technology using Ethereum platform.
Stars: ✭ 37 (-71.97%)
Mutual labels:  blockchain, ethereum, smart-contracts
Mastering Ethereum, by Andreas M. Antonopoulos, Gavin Wood
Stars: ✭ 11,663 (+8735.61%)
Mutual labels:  blockchain, ethereum, smart-contracts
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (+599.24%)
Mutual labels:  blockchain, ethereum, smart-contracts
General interoperability framework for trustless cross-system interaction
Stars: ✭ 122 (-7.58%)
Mutual labels:  blockchain, ethereum, smart-contracts
Smart Contracts
Ethereum smart contracts for security and utility tokens
Stars: ✭ 1,187 (+799.24%)
Mutual labels:  blockchain, ethereum, smart-contracts
Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
Stars: ✭ 1,968 (+1390.91%)
Mutual labels:  blockchain, ethereum, smart-contracts
Learn Solidity With Examples
A repo full of smart contracts written in Solidity
Stars: ✭ 106 (-19.7%)
Mutual labels:  blockchain, ethereum, smart-contracts
Ethereum book
精通以太坊 (中文版)
Stars: ✭ 875 (+562.88%)
Mutual labels:  blockchain, ethereum, smart-contracts
Smart Contract Sanctuary
🐦🌴🌴🌴🦕 A home for ethereum smart contracts. 🏠
Stars: ✭ 99 (-25%)
Mutual labels:  blockchain, ethereum, smart-contracts
A tool for developing smart contracts. Crafted with the finest cacaos.
Stars: ✭ 11,909 (+8921.97%)
Mutual labels:  blockchain, ethereum, smart-contracts
Remix Ide
Documentation for Remix IDE
Stars: ✭ 1,768 (+1239.39%)
Mutual labels:  blockchain, ethereum, smart-contracts
gDAI - Gas less DAI transfers by using GSN, Fulcrum and KyberNetwork
Stars: ✭ 26 (-80.3%)
Mutual labels:  blockchain, ethereum, smart-contracts
Run an Ethereum node (Geth or Openethereum) for development
Stars: ✭ 74 (-43.94%)
Mutual labels:  blockchain, ethereum, smart-contracts
Cryptocurrency study materials resources
Stars: ✭ 118 (-10.61%)
Mutual labels:  blockchain, ethereum, smart-contracts
An Analysis Tool for Smart Contracts
Stars: ✭ 820 (+521.21%)
Mutual labels:  blockchain, ethereum, smart-contracts
Indy Leaderboard
Example game leaderboard dApp utilizing EbakusDB on Ebakus blockchain
Stars: ✭ 103 (-21.97%)
Mutual labels:  blockchain, ethereum, smart-contracts


This code borrows heavily from llSourcell's turtorial which in turn borrows heavily from maheshmurthy's tutorial.

Please head over to each and toss a star on the repositories. Both of them created a wonderful tutorials to learn from.


We will be building a decentralized voting application!

The functionality of this repo is nearly identical to llSourcell's but the entire implementation is done in python!



  • Python 3.6+
  • Solidity 4.23+
  • Node.js 9.8+


  1. Create and activate a virtual environment
  2. Install dependencies with pip install -r requirements.txt
  3. Install the ganache-cli command line tool with npm install -g ganache-cli
    1. What does this cli do? It runs an ethereum node locally. Normally we'd have to download a lot of blockchain transactions and run a test ethereum node locally. This tool lets us run a small local node for easy peasey development. This tool used to be called the testrpc.
    2. Uh... This tool isn't python... True, but I have found the JavaScript tooling for testrpc to be fantastic and easy to use. If you don't want to bother with npm or just want to try out a full python stack, try out eth-testrpc. It's pip installable but not as maintained as ganache-cli.


Open up two tabs. In the first tab run ganache-cli. This will start a block chain locally that we can play with.

In the second tab activate your virtual environment and run This will start our little flask app in debug mode, deploying our contract in the process.

After the python file runs you should see something like:

  Transaction: 0xd3d96eb1d0b8ca8b327d0eca60ff405d0000c5cd249d06712877effbcf73095f
  Contract created: 0x9e4fab9629b8768730d107ae909567974c4c8e35
  Gas usage: 352112
  Block Number: 1
  Block Time: Sat Dec 23 2017 22:31:13 GMT+0200 (SAST)

in the first tab. This is your contract being deployed to the chain on your local node! is where the bulk of our logic happens. It deploys our smart contract to our test ethereum node and starts serving our flask app. and voting.sol are heavily commented so please give those a read to understand what each is doing.

Next open in your browser of choice. The web application will connect to our deployed contract and use it as the backend.

Congrats! You setup your first decentralized application with python!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected]