diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2c55069..081d138 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -21,7 +21,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -e .[release] - + - name: Build run: python setup.py sdist bdist_wheel diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9908bdf..b2bac9f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -62,10 +62,8 @@ jobs: strategy: matrix: - # TODO: Replace with macos-latest when works again. - # https://github.com/actions/setup-python/issues/808 - os: [ubuntu-latest, macos-12] # eventually add `windows-latest` - python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] + os: [ubuntu-latest, macos-latest] # eventually add `windows-latest` + python-version: [3.9, "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -83,7 +81,7 @@ jobs: - name: Run Tests run: pytest -m "not fuzzing" -n 0 -s --cov env: - TENDERLY_FORK_ID: ${{ secrets.TENDERLY_FORK_ID }} + TENDERLY_GATEWAY_ACCESS_KEY: ${{ secrets.TENDERLY_GATEWAY_ACCESS_KEY }} # NOTE: uncomment this block after you've marked tests with @pytest.mark.fuzzing # fuzzing: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90c0d69..1a28cc4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,10 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks +<<<<<<< HEAD rev: v4.6.0 +======= + rev: v5.0.0 +>>>>>>> 3721525 (feat: support web3.py dependencies (#16)) hooks: - id: check-yaml @@ -10,24 +14,36 @@ repos: - id: isort - repo: https://github.com/psf/black +<<<<<<< HEAD rev: 24.4.2 +======= + rev: 24.10.0 +>>>>>>> 3721525 (feat: support web3.py dependencies (#16)) hooks: - id: black name: black - repo: https://github.com/pycqa/flake8 +<<<<<<< HEAD rev: 7.0.0 +======= + rev: 7.1.1 +>>>>>>> 3721525 (feat: support web3.py dependencies (#16)) hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy +<<<<<<< HEAD rev: v1.10.0 +======= + rev: v1.13.0 +>>>>>>> 3721525 (feat: support web3.py dependencies (#16)) hooks: - id: mypy additional_dependencies: [types-requests, types-setuptools, pydantic] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.19 hooks: - id: mdformat additional_dependencies: [mdformat-gfm, mdformat-frontmatter] diff --git a/README.md b/README.md index e19b65a..65913ae 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Ecosystem plugin for Tenderly support in Ape. ## Dependencies -- [python3](https://www.python.org/downloads) version 3.8 up to 3.12. +- [python3](https://www.python.org/downloads) version 3.9 up to 3.13. ## Installation diff --git a/ape_tenderly/__init__.py b/ape_tenderly/__init__.py index 98760d5..60fd154 100644 --- a/ape_tenderly/__init__.py +++ b/ape_tenderly/__init__.py @@ -12,8 +12,8 @@ "polygon": [ ("mainnet", TenderlyGatewayProvider), ("mainnet-fork", TenderlyForkProvider), - ("mumbai", TenderlyGatewayProvider), - ("mumbai-fork", TenderlyForkProvider), + ("amoy", TenderlyGatewayProvider), + ("amoy-fork", TenderlyForkProvider), ], "arbitrum": [ ("mainnet-fork", TenderlyForkProvider), @@ -31,7 +31,7 @@ ("sepolia", TenderlyGatewayProvider), ("sepolia-fork", TenderlyForkProvider), ], - "avalance": [ + "avalanche": [ ("mainnet-fork", TenderlyForkProvider), ], "fantom": [ diff --git a/ape_tenderly/provider.py b/ape_tenderly/provider.py index 871aaee..4ec996d 100644 --- a/ape_tenderly/provider.py +++ b/ape_tenderly/provider.py @@ -7,7 +7,11 @@ from ape_ethereum.provider import Web3Provider from web3 import HTTPProvider, Web3 from web3.gas_strategies.rpc import rpc_gas_price_strategy -from web3.middleware import geth_poa_middleware + +try: + from web3.middleware import ExtraDataToPOAMiddleware # type: ignore +except ImportError: + from web3.middleware import geth_poa_middleware as ExtraDataToPOAMiddleware # type: ignore from .client import Fork, TenderlyClient @@ -95,7 +99,7 @@ def connect(self): polygon = (137, 80001) if chain_id in (*optimism, *polygon): - self._web3.middleware_onion.inject(geth_poa_middleware, layer=0) + self._web3.middleware_onion.inject(ExtraDataToPOAMiddleware, layer=0) self._web3.eth.set_gas_price_strategy(rpc_gas_price_strategy) diff --git a/pyproject.toml b/pyproject.toml index 38fb644..11b5011 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ write_to = "ape_tenderly/version.py" [tool.black] line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] +target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] include = '\.pyi?$' [tool.pytest.ini_options] diff --git a/setup.py b/setup.py index b4e4365..fc93aba 100644 --- a/setup.py +++ b/setup.py @@ -10,18 +10,20 @@ "hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer ], "lint": [ - "black>=24.4.2,<25", # Auto-formatter and linter - "mypy>=1.10.0,<2", # Static type analyzer + "black>=24.10.0,<25", # Auto-formatter and linter + "mypy>=1.13.0,<2", # Static type analyzer "types-setuptools", # Needed for mypy type shed "types-requests", # Needed for mypy type shed - "flake8>=7.0.0,<8", # Style linter + "flake8>=7.1.1,<8", # Style linter "flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code "flake8-print>=5.0.0,<6", # Detect print statements left in code + "flake8-pydantic", # For detecting issues with Pydantic models + "flake8-type-checking", # Detect imports to move in/out of type-checking blocks "isort>=5.13.2,<6", # Import sorting linter - "mdformat>=0.7.17", # Auto-formatter for markdown + "mdformat>=0.7.19", # Auto-formatter for markdown "mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown "mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates - "mdformat-pyproject>=0.0.1", # Allows configuring in pyproject.toml + "mdformat-pyproject>=0.0.2", # Allows configuring in pyproject.toml ], "release": [ # `release` GitHub Action job uses this "setuptools", # Installation tool @@ -61,11 +63,12 @@ url="https://github.com/ApeWorX/ape-tenderly", include_package_data=True, install_requires=[ - "eth-ape>=0.7.0,<0.8", - "eth-pydantic-types", # Use same version as eth-ape - "requests", # Use same version as eth-ape + "eth-ape>=0.8.21,<0.9", + "eth-pydantic-types>=0.1.3,<0.2", + "web3>=6.20.1,<8", + "requests>=2.28.1,<3", ], - python_requires=">=3.8,<4", + python_requires=">=3.9,<4", extras_require=extras_require, py_modules=["ape_tenderly"], license="Apache-2.0", @@ -81,10 +84,10 @@ "Operating System :: MacOS", "Operating System :: POSIX", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], )