更新时间:2021-07-02 13:13:35
coverpage
Title Page
Copyright and Credits
Hands-On Blockchain for Python Developers
About Packt
Why subscribe?
Packt.com
Foreword
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Blockchain and Smart Contracts
Introduction to Blockchain Programming
The rise of cryptocurrency and blockchain
Blockchain technology
Signing data in blockchain
From linked list to blockchain
Cryptography
Symmetric and asymmetric cryptography
The hashing function
Proof of work
Consensus
Coding on the blockchain
Other types of blockchain programmers
Summary
References
Smart Contract Fundamentals
Installing an Ethereum development environment
Installing Node.js
Installing Truffle and Solidity
Installing Ganache
Writing a smart contract
Deploying a smart contract to Ethereum blockchain
Interacting with smart contracts
Sending ether to smart contracts
Why smart contracts?
Further reading
Implementing Smart Contracts Using Vyper
Motivations behind Vyper
Installing Vyper
Creating a smart contract with Vyper
Deploying a smart contract to Ganache
Going deeper into Vyper
Data types
Withdrawing ethers
Other data types
Useful built-in functions
Events
Interacting with other smart contracts
Compiling code programmatically
Other tricks
Section 2: Web3 and Populus
Interacting with Smart Contracts Using Web3
Introduction to decentralized applications
Installing web3
Geth
Geth console
Understanding the web3.py library
Gas and gas price
Nonce
Creating a transaction on Rinkeby
Interacting with smart contracts using web3.py
Launching a smart contract with Geth
Launching a smart contract with web3
Playing with a smart contract
Populus Development Framework
Setting up Populus
Adding support for Vyper
Smart contract unit test
Using arguments in the constructor
Deploying a smart contract with Populus
Building a Practical Decentralized Application
Developing a simple voting application
Deploying a smart contract that has arguments in its constructor
Developing a commercial voting application
Developing a token-based voting application
Section 3: Frontend Decentralized Applications
Frontend Decentralized Application
Setting up the Qt GUI library
Choosing a GUI library
Installing Qt for Python
Crash course on Qt for Python
Layout