Skip to content

[P0] Nested map updates do not write back outer map (lost update) #29

@ngmachado

Description

@ngmachado

Problem

Assignments like allowances[owner][spender] = amount lower to map_store on the inner map value, but the updated inner map is not written back into the outer map.

Impact

approve / transferFrom postconditions over allowances fail; runtime storage semantics are incorrect for nested maps.

Acceptance Criteria

Nested map assignment lowers to:

  • load outer map value,
  • update inner map,
  • store updated inner map back into outer map.

Add regression for map[address, map[address, u256]] write/read roundtrip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions