From 2c5ec638ed5e1fd1eaafda2de95d5cf89bfa993a Mon Sep 17 00:00:00 2001 From: Laurent Castillo Date: Thu, 26 Mar 2026 15:29:00 +0100 Subject: [PATCH] fix: allow colon in EIP-712 type names in encodeType parser Hyperliquid uses colon-separated type names (e.g. "HyperliquidTransaction:Withdraw") in their EIP-712 primaryType. The encodeType regex only accepted \w (letters, digits, underscore), causing the parser to truncate the type name at the colon. Widen the regex to [\w:] so that colon-containing type names are correctly captured. Made-with: Cursor --- src/erc7730/common/abi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/erc7730/common/abi.py b/src/erc7730/common/abi.py index fe5fdc46..1c496725 100644 --- a/src/erc7730/common/abi.py +++ b/src/erc7730/common/abi.py @@ -152,7 +152,7 @@ def get_functions(abis: list[ABI], *, include_read_only: bool = False) -> Functi return functions -_ENCODE_TYPE_RE = re.compile(r"(\w+)\(([^)]*)\)") +_ENCODE_TYPE_RE = re.compile(r"([\w:]+)\(([^)]*)\)") def parse_encode_type(encode_type: str) -> tuple[str, dict[str, list[tuple[str, str]]]]: