Skip to content

Commit

Permalink
fix: gas price hack fix [APE-1199] (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Jul 18, 2023
1 parent 65489b6 commit 05c5ea3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ape_foundry/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@ def _test_config(self) -> TestConfig:
def auto_mine(self) -> bool:
return self._make_request("anvil_getAutomine", [])

@property
def gas_price(self) -> int:
# TODO: Remove this once Ape > 0.6.13
result = super().gas_price
if isinstance(result, str) and is_0x_prefixed(result):
return int(result, 16)

return result

def __setattr__(self, attr: str, value: Any) -> None:
# NOTE: Need to do this until https://github.com/pydantic/pydantic/pull/2625 is figured out
if attr == "auto_mine":
Expand Down

0 comments on commit 05c5ea3

Please sign in to comment.