Skip to content

Commit

Permalink
Fix abi.decode tuple result with udt
Browse files Browse the repository at this point in the history
  • Loading branch information
smonicas committed Jul 17, 2023
1 parent 3e39026 commit ec30934
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion slither/slithir/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,12 @@ def convert_to_solidity_func(
and len(new_ir.arguments) == 2
and isinstance(new_ir.arguments[1], list)
):
types = list(new_ir.arguments[1])
types = []
for arg_type in new_ir.arguments[1]:
decode_type = arg_type
if isinstance(decode_type, (Structure, Enum, Contract)):
decode_type = UserDefinedType(decode_type)
types.append(decode_type)
new_ir.lvalue.set_type(types)
# abi.decode where the type to decode is a singleton
# abi.decode(a, (uint))
Expand Down

0 comments on commit ec30934

Please sign in to comment.