Skip to content

Commit

Permalink
👽️ Fix hardfork names camel case in Anvil
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Nov 2, 2024
1 parent c640fc7 commit d20e87d
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions wake/development/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
fixed_bytes_map,
fixed_list_map,
int_map,
uint_map,
uint256,
uint_map,
)

if TYPE_CHECKING:
Expand Down Expand Up @@ -198,7 +198,11 @@ def _normalize_input(cls, arguments: Iterable) -> List:
inputs.append(getattr(arg, f.name))
ret.append(cls._normalize_input(inputs))
else:
ret.append(cls._normalize_input([getattr(arg, f.name) for f in dataclasses.fields(arg)]))
ret.append(
cls._normalize_input(
[getattr(arg, f.name) for f in dataclasses.fields(arg)]
)
)
else:
ret.append(arg)
return ret
Expand Down Expand Up @@ -1612,17 +1616,26 @@ def _connect(
hardfork = info["hardFork"]
if hardfork in {
"FRONTIER",
"Frontier",
"HOMESTEAD",
"Homestead",
"TANGERINE",
"Tangerine",
"SPURIOUS_DRAGON",
"SpuriousDragon",
"BYZANTIUM",
"Byzantium",
"CONSTANTINOPLE",
"Constantinople",
"PETERSBURG",
"Petersburg",
"ISTANBUL",
"Istanbul",
"MUIR_GLACIER",
"MuirGlacier",
}:
self._default_tx_type = 0
elif hardfork == "BERLIN":
elif hardfork in {"BERLIN", "Berlin"}:
self._default_tx_type = 1
else:
self._default_tx_type = 2
Expand Down

0 comments on commit d20e87d

Please sign in to comment.