Add some no_implicit_stdlib for now

This commit is contained in:
Hans Svensson 2019-08-22 15:21:41 +02:00
parent bde76c8580
commit 2620aa64b4

View File

@ -317,7 +317,7 @@ to_sophia_value(_, _, revert, Data, Options) ->
{ok, {app, [], {id, [], "abort"}, [{string, [], Err}]}}
end;
to_sophia_value(ContractString, FunName, ok, Data, Options0) ->
Options = [no_code | Options0],
Options = [no_implicit_stdlib, no_code | Options0],
try
Code = string_to_code(ContractString, Options),
#{ typed_ast := TypedAst, type_env := TypeEnv} = Code,
@ -378,7 +378,7 @@ create_calldata(Code, Fun, Args) ->
{ok, binary()}
| {error, term()}.
create_calldata(Code, Fun, Args, Options0) ->
Options = [no_code | Options0],
Options = [no_implicit_stdlib, no_code | Options0],
case proplists:get_value(backend, Options, aevm) of
aevm ->
case check_call(Code, Fun, Args, Options) of
@ -401,7 +401,7 @@ decode_calldata(ContractString, FunName, Calldata) ->
decode_calldata(ContractString, FunName, Calldata, [{backend, aevm}]).
decode_calldata(ContractString, FunName, Calldata, Options0) ->
Options = [no_code | Options0],
Options = [no_implicit_stdlib, no_code | Options0],
try
Code = string_to_code(ContractString, Options),
#{ typed_ast := TypedAst, type_env := TypeEnv} = Code,