Skip to Content
Hands-On Blockchain for Python Developers
book

Hands-On Blockchain for Python Developers

by Arjuna Sky Kok
February 2019
Intermediate to advanced
450 pages
9h 59m
English
Packt Publishing
Content preview from Hands-On Blockchain for Python Developers

Interacting with Smart Contracts Using Web3

In this chapter, you're going to learn how to connect to a smart contract programmatically. Here, you'll use the Python programming language to execute a method in a smart contract. To achieve that, you will use the web3.py library. In the previous chapter, you built a smart contract and deployed it to the Ethereum blockchain. You also used Vyper to write a smart contract. To interact with that smart contract, you fired up the Truffle console and typed in a number of commands. Those commands are sent to the smart contract in the blockchain. Depending on what command you type in, this could either read the state of the smart contract or change it. In this chapter, you are going to move beyond the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Blockchain in Action

Blockchain in Action

Bina Ramamurthy
Learn Python by Building a Blockchain and Cryptocurrency

Learn Python by Building a Blockchain and Cryptocurrency

Academind by Maximilian Schwarzmüller GmbH

Publisher Resources

ISBN: 9781788627856Supplemental Content