Skip to content

Latest commit

 

History

History
 
 

Examples

Smart Contract Examples

This repository contains contract examples with a wide range of difficulty: If pyethereum is installed (see main repository) simply run python [filename].py from \Examples directory in terminal

easy_bank.py - an introductory contract implementing a simple send_currency function

namecoin.py - beginner contract that implements a simple altcoin

new_bank.contract.py - a moderate bank contract implementing deposit, withdraw, and transfer functions

version1.py - a moderate rock paper scissor example. More practice with functions and parameter passing

version3.py - an advanced contract (refer to the smart contract guide for complete explanation). Implements state machine, commitment scheme, and secures against several blockchain vulnerabilities