diff --git a/cairo/ethereum/rlp.cairo b/cairo/ethereum/rlp.cairo index bd56ff674..c79872d42 100644 --- a/cairo/ethereum/rlp.cairo +++ b/cairo/ethereum/rlp.cairo @@ -121,7 +121,7 @@ namespace ExtendedImpl { return extended; } - func uint(value: Uint) -> Extended { + func uint(value: Uint*) -> Extended { tempvar extended = Extended( new ExtendedEnum( sequence=SequenceExtended(cast(0, SequenceExtendedStruct*)), @@ -136,7 +136,7 @@ namespace ExtendedImpl { return extended; } - func fixed_uint(value: Uint) -> Extended { + func fixed_uint(value: Uint*) -> Extended { tempvar extended = Extended( new ExtendedEnum( sequence=SequenceExtended(cast(0, SequenceExtendedStruct*)), diff --git a/cairo/tests/fixtures/compiler.py b/cairo/tests/fixtures/compiler.py index 0573e7f60..558d3ce13 100644 --- a/cairo/tests/fixtures/compiler.py +++ b/cairo/tests/fixtures/compiler.py @@ -19,7 +19,7 @@ def cairo_compile(path): module_reader = get_module_reader(cairo_path=[str(Path(__file__).parents[2])]) pass_manager = default_pass_manager( - prime=DEFAULT_PRIME, read_module=module_reader.read + prime=DEFAULT_PRIME, read_module=module_reader.read, opt_unused_functions=False ) return compile_cairo( diff --git a/cairo/tests/fixtures/runner.py b/cairo/tests/fixtures/runner.py index c66114a7c..4723421f5 100644 --- a/cairo/tests/fixtures/runner.py +++ b/cairo/tests/fixtures/runner.py @@ -58,19 +58,20 @@ def cairo_run(request, cairo_program, cairo_file, main_path): """ def _factory(entrypoint, *args, **kwargs): + entrypoint_path = ("__main__", *entrypoint.split(".")) implicit_args = list( cairo_program.identifiers.get_by_full_name( - ScopedName(path=("__main__", entrypoint, "ImplicitArgs")) + ScopedName(path=entrypoint_path + ("ImplicitArgs",)) ).members.keys() ) _args = { k: to_python_type(resolve_main_path(main_path)(v.cairo_type)) for k, v in cairo_program.identifiers.get_by_full_name( - ScopedName(path=("__main__", entrypoint, "Args")) + ScopedName(path=entrypoint_path + ("Args",)) ).members.items() } return_data = cairo_program.identifiers.get_by_full_name( - ScopedName(path=("__main__", entrypoint, "Return")) + ScopedName(path=entrypoint_path + ("Return",)) ) # Fix builtins runner based on the implicit args since the compiler doesn't find them cairo_program.builtins = [