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 Truffle console.
This chapter will cover the following topics:
- Introduction to decentralized applications
- Geth
- Understanding the...