Ethereum Python 开发教程及资料 V2022-04-10

web3.py 官方手册

https://web3py.readthedocs.io/en/stable/index.html

Looking for Ethereum Python tutorials? (Ethereum官方指南)→ ethereum.org/python

GETTING STARTED WITH SMART CONTRACTS AND THE SOLIDITY LANGUAGE

Take your first steps to integrating Python with Ethereum

Need a more basic primer first? Check out ethereum.org/learn or ethereum.org/developers.

BEGINNER ARTICLES

INTERMEDIATE ARTICLES

ADVANCED USE PATTERNS

PYTHON PROJECTS AND TOOLS

Active:

  • Web3.py - Python library for interacting with Ethereum

  • Ape - The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals

  • Brownie - Python framework for deploying, testing and interacting with Ethereum smart contracts

  • Vyper - Pythonic Smart Contract Language for the EVM

  • py-evm - implementation of the Ethereum Virtual Machine

  • eth-tester - tools for testing Ethereum-based applications

  • eth-utils - utility functions for working with Ethereum related codebases

  • py-solc-x - Python wrapper around the solc solidity compiler with 0.5.x support

  • py-wasm - Python implementation of the web assembly interpreter

  • pydevp2p - implementation of the Ethereum P2P stack

  • pymaker - Python API for Maker contracts

  • siwe - Sign in with Ethereum (siwe) for Python

  • Smart contracts for testing - A Python package that comes with ERC-20, Uniswap and other common contracts for writing tests with Web3.py

Archived / No longer maintained:

  • Trinity - Ethereum Python client

  • Mamba - framework to write, compile, and deploy smart contracts written in Vyper language

Looking for more resources? Check out ethereum.org/developers.

PROJECTS USING PYTHON TOOLING

The following Ethereum-based projects use tools mentioned on this page. The related open-source repositories serve as a good reference for example code and best practices.

其他教程

Getting started with Python and Web3.py

https://cryptomarketpool.com/getting-started-with-python-and-web3-py/

  1. How to connect to the Ethereum blockchain using a node

  2. How to install Web3.py in Python

  3. Test your connection to the Ethereum blockchain using Web3.py and Python

  4. How to get a smart contracts ABI for use in Web3 and Python

  5. Read Solidity smart contract data using Web3.py in Python

  6. Get gas prices from the ETH Gas Station using json in Python

  7. Call a uniswap function using Web3.py in Python

  8. Get market data from uniswap using Web3.py in Python

  9. How to listen for Ethereum events using Web3.py in Python

  10. Send an ETH transaction using Web3.py in Python

  11. Can you make money creating an arbitrage bot running on the Ethereum block chain?

  12. How to create a snipe bot to monitor IDO’s or new liquidity pairs in Python

  13. Use The Graph in Python to query Ethereum data

  14. How to airdrop crypto to multiple accounts using Python

  15. Crypto QR code generator in Python

  16. Create a blockchain in Python

  17. Convert a string to SHA256 in Python

  18. Use Python to monitor Twitter accounts for crypto tweets

  19. Reddit sentiment indicator for crypto in Python

  20. Build a crypto back running bot

  21. Compound Finance liquidation bot

  22. How to use Flashbots

Access Ethereum Data Using Web3.py, Infura, and The Graph

https://towardsdatascience.com/access-ethereum-data-using-web3-py-infura-and-the-graph-d6fb981c2dc9

Build your own Etherscan with web3.py

https://github.com/hackingthemarkets/web3py-etherscan#build-your-own-etherscan-with-web3py

带视频讲解

Play Video

get_price_on_dex_BSC_Web3.py

https://github.com/paowongsakorn/get_price_on_dex_BSC_Web3.py

一个简单的报价实例

web3py 解析智能合约交易结果(event事件日志解析、操作结果解析、log解析)

https://blog.csdn.net/tz_zs/article/details/121249588

一个获取tx详细信息的实例

如何从web3py获取事件数据?

https://www.cnpython.com/qa/284752

awesome-web合集

ahmet/awesome-web3#python

https://github.com/ahmet/awesome-web3#python

Development Environment

  • Brownie - Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.

Solidity

  • Date and Time tools - Contract which implements utilities for working with datetime values in ethereum.

Book

JoinColony/awesome-web3

https://github.com/JoinColony/awesome-web3

开头一堆列表

grandsmarquis/awesome-ethereum-analytics

https://github.com/grandsmarquis/awesome-ethereum-analytics

其中DEX trackers

只有这一个可用

Datasets(第三方数据集)

Perform data analysis using these publically available Ethereum datasets.

Blogs

很酷的数据挖掘博客

Interesting analytics blogs that cover data on the Ethereum blockchain.

三方学习网站

登链社区 中文文档库

https://learnblockchain.cn/manuals

Solidity 中文文档

Solidity 是一门面向合约的、为实现智能合约而创建的高级编程语言。Solidity 是静态类型语言,支持继承、库和复杂的用户定义类型等特性。

Web3.js 中文文档

web3.js 是一组使用HTTP或IPC连接来和本地或远程以太坊节点进行交互的库。

https://learnblockchain.cn/docs/ethers.js/

ethers.js 中文文档

Etherscan 中文文档

CoinGecko文档