Skip to content

Commit

Permalink
Fixed code
Browse files Browse the repository at this point in the history
  • Loading branch information
zomglings committed Aug 8, 2023
1 parent 0567ce0 commit 73f2591
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions moonworm/generators/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion moonworm/generators/brownie.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 73f2591

Please sign in to comment.