Breaking Into the Blockchain for Fun and Profit
Using Ethereum JSON-RPC directly with Python
Using Ethereum JSON-RPC directly with Python
While the data in the blockchain is public and free to access, getting to that data you need can be a little bit tricky. We could use Web3.py, but it has some drawbacks and limitations. We’ll go direct to the source a query the JSON-RPC API directly.
In the shore time we’ll have together we’ll cover the following:
- Intro to the Blockchain Data Hierarchy:
- Blocks
- Transactions/Transaction Receipts
- Logs
- Intro to the Ethereum JSON-RPC API
- Documentation
- How to Get Access to the API
- Structure of Requests and Responses
- Querying the Easy Stuff
- Blocks
- Transaction Receipts
- Basic Log Searching
- Querying the Hard Stuff
- Advanced Log Searching and Parsing Log Data
- Contract Interaction