Skip to content

Commit

Permalink
Merge pull request #96 from z80dev/fix-precompiles
Browse files Browse the repository at this point in the history
fix precompile arg type parsing in decorator
  • Loading branch information
charles-cooper authored Aug 31, 2023
2 parents dac877c + d04d587 commit 7d8a5ed
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 7d8a5ed

Please sign in to comment.