anchor.diff:                   }, maps:without([height, return_gas_used, return_logs], Options)), S),
       Height   = maps:get(height, Options, 1),
       PrivKey  = aect_test_utils:priv_key(Caller, S),
  -    {ok, S1} = sign_and_apply_transaction(CallTx, PrivKey, S, Height),
  -    CallKey  = aect_call:id(Caller, Nonce, ContractKey),
  -    CallTree = aect_test_utils:calls(S1),
  -    Call     = aect_call_state_tree:get_call(ContractKey, CallKey, CallTree),
  -    Result   =
  -        case aect_call:return_type(Call) of
  -            ok     -> {ok, Res} = aeso_heap:from_binary(Type, aect_call:return_value(Call)),
  -                      Res;
  -            error  -> {error, aect_call:return_value(Call)};
  -            revert -> revert
  -        end,
  -    Result1 = case maps:get(return_logs, Options, false) of
  -                true -> {Result, aect_call:log(Call)};
  -                false -> Result end,
  -    case maps:get(return_gas_used, Options, false) of
  -        false -> {Result1, S1};
  -        true  -> {{Result1, aect_call:gas_used(Call)}, S1}
  +    case sign_and_apply_transaction(CallTx, PrivKey, S, Height) of
  +        {ok, S1} ->
  +            CallKey  = aect_call:id(Caller, Nonce, ContractKey),
  +            CallTree = aect_test_utils:calls(S1),
  +            Call     = aect_call_state_tree:get_call(ContractKey, CallKey, CallTree),
  +            Result   =
  +                case aect_call:return_type(Call) of
  +                    ok     -> {ok, Res} = aeso_heap:from_binary(Type, aect_call:return_value(Call)),
  +                              Res;
  +                    error  -> {error, aect_call:return_value(Call)};
  +                    revert -> revert
  +                end,
  +            Result1 = case maps:get(return_logs, Options, false) of
  +                        true -> {Result, aect_call:log(Call)};
  +                        false -> Result end,
  +            case maps:get(return_gas_used, Options, false) of
  +                false -> {Result1, S1};
  +                true  -> {{Result1, aect_call:gas_used(Call)}, S1}
  +            end;
  +        {error, R, S1} ->
  +            {{error, R}, S1}
       end.
   
   account_balance(PubKey, S) ->
  
positive.code:     S2     = aect_test_utils:set_account_balance(PubKey, 0, S1),
      Trees2 = aect_test_utils:trees(S2),
      RTx2   = aect_test_utils:create_tx(PubKey, S2),
      {error, S2} = sign_and_apply_transaction(RTx2, PrivKey, S2),
      {error, insufficient_funds} = aetx:check(RTx2, Trees2, Env),
  
      %% Test too high account nonce
      RTx3 = aect_test_utils:create_tx(PubKey, #{nonce => 0}, S1),
      {error, S1} = sign_and_apply_transaction(RTx3, PrivKey, S1),
      {error, account_nonce_too_high} = aetx:check(RTx3, Trees, Env),
  
      ok.
  
negative.code:     Tx   = aect_test_utils:call_tx(Acc1, IdC, #{gas_price => 0}, S),
      ?assertEqual(0, aect_call_tx:gas_price(aetx:tx(Tx))),
  
      {error, _, _} = sign_and_apply_transaction(Tx, aect_test_utils:priv_key(Acc1, S), S),
      Env           = aetx_env:tx_env(_Height = 1),
      {error, too_low_gas_price} = aetx:check(Tx, aect_test_utils:trees(S), Env),
      ok.
  
  