Compare commits

..

2 Commits

View File

@ -691,8 +691,10 @@ decode_bytearray_fate(EncodedStr) ->
Encoded = unicode:characters_to_binary(EncodedStr), Encoded = unicode:characters_to_binary(EncodedStr),
{contract_bytearray, Binary} = gmser_api_encoder:decode(Encoded), {contract_bytearray, Binary} = gmser_api_encoder:decode(Encoded),
case Binary of case Binary of
<<>> -> {ok, none}; <<>> ->
<<"Out of gas">> -> {error, out_of_gas}; {ok, none};
<<"Out of gas">> ->
{error, out_of_gas};
_ -> _ ->
% FIXME there may be other errors that are encoded directly into % FIXME there may be other errors that are encoded directly into
% the byte array. We could try and catch to at least return % the byte array. We could try and catch to at least return
@ -1044,8 +1046,9 @@ contract_create(CreatorID, Path, InitArgs) ->
%% <li> %% <li>
%% <b>Args:</b> %% <b>Args:</b>
%% This is a list of the arguments to provide to the function, listed in order %% This is a list of the arguments to provide to the function, listed in order
%% according to the function's spec, and represented as strings (that is, an integer %% according to the function's spec. Arguments can be represented as a list of
%% argument of `10' must be cast to the textual representation `"10"'). %% Sophia literals (a simple list of strings), or alternately as a list of compatible
%% Erlang, FATE or Sophia terms wrapped in a tuple which specifies the representation.
%% </li> %% </li>
%% </ul> %% </ul>
%% As should be obvious from the above description, it is pretty helpful to have a %% As should be obvious from the above description, it is pretty helpful to have a
@ -1405,8 +1408,9 @@ contract_call(CallerID, Gas, AACI, ConID, Fun, Args) ->
%% <li> %% <li>
%% <b>Args:</b> %% <b>Args:</b>
%% This is a list of the arguments to provide to the function, listed in order %% This is a list of the arguments to provide to the function, listed in order
%% according to the function's spec, and represented as strings (that is, an integer %% according to the function's spec. Arguments can be represented as a list of
%% argument of `10' must be cast to the textual representation `"10"'). %% Sophia literals (a simple list of strings), or alternately as a list of compatible
%% Erlang, FATE or Sophia terms wrapped in a tuple which specifies the representation.
%% </li> %% </li>
%% </ul> %% </ul>
%% As should be obvious from the above description, it is pretty helpful to have a %% As should be obvious from the above description, it is pretty helpful to have a