anchor.diff:          {ok, ChainState1} ->
               UnitReturn = {ok, <<0:256>>},
               GasSpent   = 0,         %% Already costs lots of gas
  -            {ok, UnitReturn, GasSpent,
  -             aevm_eeevm_state:set_chain_state(ChainState1, State)};
  +            {ok, UnitReturn, GasSpent, ChainState1};
           {ok, Retval, ChainState1} ->
               GasSpent   = 0,         %% Already costs lots of gas
               Return     = {ok, aeso_data:to_binary(Retval, 0)},
  -            {ok, Return, GasSpent,
  -             aevm_eeevm_state:set_chain_state(ChainState1, State)};
  +            {ok, Return, GasSpent, ChainState1};
           {error, _} = Err -> Err
       end.
   
  
positive.code:     {error, out_of_gas}.
  
  call_chain1(Callback, State) ->
      ChainAPI   = aevm_eeevm_state:chain_api(State),
      ChainState = aevm_eeevm_state:chain_state(State),
      Callback(ChainAPI, ChainState).
  
  query_chain(Callback, State) ->
      case call_chain1(Callback, State) of
          {ok, Res} ->
              Return = {ok, aeso_data:to_binary(Res, 0)},
              {ok, Return, 0, State};
          {error, _} = Err -> Err
      end.
  
  
negative.code: -export([call/3]).
  
  -include_lib("aebytecode/include/aeb_opcodes.hrl").
  
  -record(chain, {api, state}).
  
  -define(BASE_ADDRESS, 32). %% Byte offset for data
  
  