Skip to content

Commit

Permalink
fix precompile arg type parsing in decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
z80dev committed Aug 31, 2023
1 parent dac877c commit d04d587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boa/precompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def decorator(func):
vy_ast = parse_to_ast(user_signature + ": view").body[0]
func_t = ContractFunctionT.from_FunctionDef(vy_ast, is_interface=True)

args_t = TupleT(tuple(func_t.arguments.values()))
args_t = TupleT(tuple(func_t.argument_types))

def wrapper(computation):
# Decode input arguments from message data
Expand All @@ -92,7 +92,7 @@ def wrapper(computation):
address = keccak256(user_signature.encode("utf-8"))[:20]
register_raw_precompile(address, wrapper, force=force)

args = list(func_t.arguments.items())
args = [(arg.name, arg.typ) for arg in func_t.arguments]
fn_name = func_t.name
builtin = PrecompileBuiltin(fn_name, args, func_t.return_type, address)

Expand Down

0 comments on commit d04d587

Please sign in to comment.