anchor.diff:                      {NewMapId, State1}  = aevm_eeevm_maps:put(MapId, KeyBin, ValBin, State),
                       {ok, {ok, <<NewMapId:256>>}, GasUsed + GasUsed1, State1};
                   {error, _} = Err ->
  -                    {ok, Err, aevm_eeevm_state:gas(State), State}
  +                    {ok, Err, Gas, State}
               end;
           {error, _} = Err ->
  -            {ok, Err, aevm_eeevm_state:gas(State), State}
  -    end.
  -
  -map_call_delete(Data, State) ->
  +            {ok, Err, Gas, State}
  +    end.
  +
  +map_call_delete(Gas, Data, State) ->
       [MapId]      = get_args([word], Data),
       {KeyType, _} = aevm_eeevm_maps:map_type(MapId, State),
       [_, KeyPtr]  = get_args([word, word], Data),
  
positive.code: %% Map operations.
  %% ------------------------------------------------------------------
  
  map_call(?PRIM_CALL_MAP_EMPTY, _Value, Data, State) ->
      map_call_empty(Data, State);
  map_call(?PRIM_CALL_MAP_GET, _Value, Data, State) ->
      map_call_get(Data, State);
  map_call(?PRIM_CALL_MAP_PUT, _Value, Data, State) ->
      map_call_put(Data, State);
  map_call(?PRIM_CALL_MAP_DELETE, _Value, Data, State) ->
      map_call_delete(Data, State);
  map_call(?PRIM_CALL_MAP_SIZE, _Value, Data, State) ->
      map_call_size(Data, State);
  map_call(?PRIM_CALL_MAP_TOLIST, _Value, Data, State) ->
      map_call_tolist(Data, State);
  map_call(_, _, _, _) ->
      {error, out_of_gas}.
  
  map_call_empty(Data, State) ->
      [KeyType, ValType] = get_args([typerep, typerep], Data),
      {MapId, State1} = aevm_eeevm_maps:empty(KeyType, ValType, State),
      {ok, {ok, <<MapId:32/unit:8>>}, 0, State1}.
  
  map_call_size(Data, State) ->
      [MapId] = get_args([word], Data),
      Size = aevm_eeevm_maps:size(MapId, State),
      {ok, {ok, <<Size:256>>}, 0, State}.
  
  map_call_get(Data, State) ->
      [MapId]   = get_args([word], Data),
      {KeyType, _ValType} = aevm_eeevm_maps:map_type(MapId, State),
      [_, KeyPtr]  = get_args([word, word], Data),
  
negative.code:                   end,
              {ok, {ok, Res}, GasUsed, State};
          {error, _} = Err ->
              {ok, Err, Gas, State}
      end.
  
  map_call_put(Gas, Data, State) ->
      [MapId]             = get_args([word], Data),
      {KeyType, ValType}  = aevm_eeevm_maps:map_type(MapId, State),
      [_, KeyPtr, ValPtr] = get_args([word, word, word], Data),
  