If you want to use Python to interact with a Solidity smart contract you need to know the contracts address or account number and the contracts ABI (application binary interface). The contracts ABI is the how you call functions in a contract and get data back. It is list of the contract’s functions and arguments (in JSON1 format). All of the contracts functions are specified in the contracts ABI.
The quickest way to get a contracts ABI is via Ether Scan.
- Visit Ether Scan
- Input the smart contract address into the search bar at the top of the screen
- Scroll down about half way and select the “Contract” tab
4. Scroll down a little further and you will see the contracts ABI.
5. There is a handy copy ABI to clipboard function which makes it very easy to copy this text into your code