Stop trying to pull the AACI from the build directly

This commit is contained in:
Craig Everett 2025-08-14 14:00:47 +09:00
parent f92c5fbde0
commit 5ebb532b86

View File

@ -837,7 +837,8 @@ open_hash3(State, Address, Source) ->
% TODO: Compile on load and verify the deployed hash for validity.
Options = sophia_options(),
case so_compiler:from_string(Source, Options) of
{ok, Build = #{aaci := AACI}} ->
{ok, Build} ->
AACI = hz:prepare_aaci(Build),
{Defs = #{functions := Funs}, ConIfaces} = find_main(AACI),
Callable = maps:remove("init", Funs),
FunDefs = {maps:put(functions, Callable, Defs), ConIfaces},