diff --git a/moonworm/generators/basic.py b/moonworm/generators/basic.py index 1cfec03..130b7b3 100644 --- a/moonworm/generators/basic.py +++ b/moonworm/generators/basic.py @@ -95,11 +95,11 @@ def normalize_abi_name(name: str) -> str: def python_type(evm_type: str) -> List[str]: - if evm_type.endswith("]"): + if evm_type.endswith("]") and not evm_type.endswith("][]"): return ["List"] - if evm_type.startswith(("uint", "int")): + if evm_type.startswith(("uint", "int")) and "[" not in evm_type: return ["int"] - if evm_type.startswith(("int", "int")): + if evm_type.startswith(("int", "int")) and "[" not in evm_type: return ["int"] elif evm_type.startswith("bytes"): return ["bytes"] diff --git a/moonworm/generators/brownie.py b/moonworm/generators/brownie.py index f5b80f3..0035978 100644 --- a/moonworm/generators/brownie.py +++ b/moonworm/generators/brownie.py @@ -831,7 +831,7 @@ def generate_cli_generator( value=cst.parse_expression("eval"), ), ) - else: + elif param["type"] == "Any": # In general case, we just use a Python `eval` to parse the input from the command line. # This is similar to the way we handle `tuple` arguments. call_args.append(