Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Handle 0.7 breaking changes and updates [APE-1560] #8

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 23.12.0
hooks:
- id: black
name: black
Expand All @@ -21,7 +21,7 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.7.1
hooks:
- id: mypy
additional_dependencies: [types-requests, types-setuptools]
Expand Down
2 changes: 1 addition & 1 deletion ape_frame/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def sign_message(self, msg: SignableMessage) -> Optional[MessageSignature]:
def sign_transaction(self, txn: TransactionAPI, **signer_options) -> Optional[TransactionAPI]:
# TODO: need a way to deserialized from raw bytes
# raw_signed_txn_bytes = self.web3.eth.sign_transaction(txn.dict())
txn_data = txn.dict(exclude={"sender"})
txn_data = txn.model_dump(mode="json", by_alias=True)(exclude={"sender"})
unsigned_txn = serializable_unsigned_transaction_from_dict(txn_data)
try:
raw_signature = self.web3.eth.sign(self.address, hexstr=keccak(unsigned_txn).hex())
Expand Down
3 changes: 2 additions & 1 deletion ape_frame/providers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import Any

from ape.api import UpstreamProvider, Web3Provider
from ape.api import UpstreamProvider
from ape.exceptions import ProviderError
from ape_ethereum.provider import Web3Provider
from eth_utils import to_hex
from requests import HTTPError # type: ignore[import]
from web3 import HTTPProvider, Web3
Expand Down
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
"hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
],
"lint": [
"black>=23.11.0,<24", # Auto-formatter and linter
"mypy>=1.6.1,<2", # Static type analyzer
"types-requests", # Needed due to mypy typeshed
"types-setuptools", # Needed due to mypy typeshed
"types-PyYAML", # Needed due to mypy typeshed
"black>=23.12.0,<24", # Auto-formatter and linter
"mypy>=1.7.1,<2", # Static type analyzer
"types-setuptools", # Needed for mypy type shed
"flake8>=6.1.0,<7", # 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
"isort>=5.10.1,<6", # Import sorting linter
"mdformat>=0.7.17", # 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
],
"release": [ # `release` GitHub Action job uses this
"setuptools", # Installation tool
Expand Down Expand Up @@ -59,7 +60,7 @@
url="https://github.com/ApeWorX/ape-frame",
include_package_data=True,
install_requires=[
"eth-ape>=0.6.0,<0.7.0",
"eth-ape>=0.7.0,<0.8",
],
python_requires=">=3.8,<4",
extras_require=extras_require,
Expand Down
Loading