Share E-Book

Hands-On Blockchain for Python Developers Empowering Python developers in the world of blockchain and smart contracts (Arjuna Sky Kok) (z-library.sk, 1lib.sk, z-lib.sk)

Author

Rating No ratings yet

Log in to rate

Python
Language English

Empowering Python developers in the world of blockchain and smart contracts

Format PDF
Size 9.7 MB
6
Views
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
(This page has no text content)
Page 2
Hands-On Blockchain for Python Developers Copyright © 2024 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Group Product Manager: Kunal Sawant Publishing Product Manager: Akash Sharma
Page 3
Senior Editor: Esha Banerjee Technical Editor: Jubit Pincy Copy Editor: Safis Editing Project Coordinator: Manisha Singh Indexer: Manju Arasan Production Designer: Jyoti Kadam Marketing Coordinator: Sonia Chauhan First published: February 2019 Second edition: June 2024 Production reference: 1130624 Published by Packt Publishing Ltd. Grosvenor House 11 St Paul's Square Birmingham B3 1RB, UK. ISBN 978-1-80512-136-7 www.packtpub.com OceanofPDF.com
Page 4
OceanofPDF.com To the memory of my brother, Hengdra Santoso, for the unbreakable bond we shared as brothers. – Arjuna Sky Kok
Page 5
Contributors About the author Arjuna Sky Kok is a skilled software engineer with a passion for all things related to finance and technology. He lives in Jakarta, where he studied mathematics and programming at Binus University. Arjuna’s academic achievements include double degrees in Computer Science and Mathematics. Currently, he is focusing his talent in the crypto space, as he believes that DeFi and NFT will serve as the foundation for future finance. He also has a keen interest in AI, especially Generative AI. Outside of work, Arjuna enjoys watching anime, listening to J-pop songs, and playing basketball. About the reviewers Ankit Anchila is a distinguished software development professional with over a decade of industry experience. With a background in software development, Ankit brings a wealth of expertise and insights to the table. Ankit has served as a judge at numerous hackathons and has evaluated projects for prestigious awards such as the Webby, Edison, and Globee Awards. Beyond his professional achievements, Ankit is an active contributor to the software development community. He regularly shares valuable insights through articles in tech blogs, influencing and inspiring fellow developers. As a member of The International Academy of Digital
Page 6
Arts and Sciences (IADAS), Ankit continues to shape the future of digital innovation. Shivanjan Chakravorty is a distinguished Member of Technical Staff 3 at Pure Storage, where he brings a wealth of expertise to the forefront of technological innovation. Renowned for his contributions to open-source projects, especially libopenstorage, Shivanjan excels in Golang and Python. His expertise covers a wide range of technologies including Kubernetes, Machine Learning, and Generative AI. He has also worked extensively with Large Language Models (LLMs). Additionally, his scholarly work includes two published research papers in the domain of mathematical optimization. Beyond his professional pursuits, Shivanjan is an avid adventurer and a chess enthusiast, embodying a dynamic blend of intellect and passion. OceanofPDF.com
Page 7
Table of Contents Preface
Page 8
Part 1: Blockchain and Smart Contract 1 Introduction to Blockchain Programming Technical requirements 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
Page 9
Blockchain as a technology that prevents cheating Proof of stake Coding on the blockchain Other types of blockchain programmers What does it mean to be a blockchain programmer? The scope of this book Summary References 2 Smart Contract Fundamentals Technical requirements Smart contract Secure from cheating
Page 10
Censorship resistance Practical applications Summary 3 Using Vyper to Implement a Smart Contract Technical requirements Setting up Vyper Data types Boolean Signed integer Unsigned integer Decimal Address Fixed-size byte array
Page 11
Byte array String Enum List Dynamic arrays Struct Mapping Functions Mutability Control structures Environment variables Event logging Interface Summary
Page 12
Part 2: Web3 and Ape Framework 4 Using Web3.py to Interact with Smart Contracts Technical requirements Installing web3.py Ganache Geth Deploying a smart contract Interacting with smart contracts Summary 5 Ape Framework
Page 13
Technical requirements Installing Ape Framework Developing smart contracts Compiling a smart contract Deploying the smart contract Testing smart contracts Networks in blockchain Summary 6 Building a Practical Decentralized Application Technical requirements Writing the voting smart contract Writing the unit test of the voting smart contract
Page 14
Adding delegation to the voting smart contract The benefits of the decentralized nature of a voting smart contract Ideas for improvements Summary
Page 15
Part 3: Graphical User Interface Applications 7 Front-End Decentralized Application Technical requirements Using the voting smart contract with scripts Compiling the smart contract Creating accounts Setting up the Geth development blockchain Deploying the smart contract onto blockchain Creating and running the scripts Installing the PySide library Creating the voting GUI application
Page 16
Connecting the GUI application with the smart contract Summary 8 Cryptocurrency Wallet Technical requirements What is a wallet? Mnemonic keys Developing a cryptocurrency wallet Wallet UX Summary
Page 17
Part 4: Related Technologies 9 InterPlanetary: A Brave New File System Technical requirements The motivation behind IPFS Merkle DAG Merkle tree Directed Acrylic Graph Content addressing The Merkle DAG data structure Peer-to-peer networking The notion of proximity of data and nodes XOR distance
Page 18
Buckets Summary 10 Implementing a Decentralized Application Using IPFS Technical requirements Installing the IPFS software and its library Exploring the IPFS Python library The architecture of the decentralized video- sharing application The architecture of the video-sharing smart contract The architecture of the video-sharing web application Writing the video-sharing smart contract Creating a Bootstrap script
Page 19
Building the video-sharing web application Views Models Templates URLs Demo Summary 11 Exploring Layer 2 Technical requirements Understanding L2 How L2 works Optimistic rollups Zk rollups
Page 20
Looking at examples of L2 Polygon Arbitrum Optimism Base Starknet zkSync Deploying smart contracts to L2 Introducing the bridge technology Bridging ETH Bridging ERC-20 tokens Native ERC-20 tokens Messages Sending messages from L1 to L2 Sending messages from L2 to L1
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
← Back to List