Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Fix stack layout comment in GET_SLOT_FROM_KEYS_2D (#90)
Browse files Browse the repository at this point in the history
In the `concat the two keys` step of GET_SLOT_FROM_KEYS_2D (Hashmap.huff), one of the stack layout comments was missing `slot1` before that value is removed from the stack. Added it in the comment.
  • Loading branch information
goncaloMagalhaes authored Jan 27, 2023
1 parent 3a81d5a commit e870794
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/data-structures/Hashmap.huff
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
sha3 // [slot1, key2]

// concat the two keys
<mem_ptr> 0x20 add // [<mem_ptr> + 0x20, key2] put slot1 in memory
<mem_ptr> 0x20 add // [<mem_ptr> + 0x20, slot1, key2] put slot1 in memory
mstore // [key2]

// next byte
Expand Down Expand Up @@ -102,4 +102,4 @@
// Input stack: [slot, key1, key2, value]
GET_SLOT_FROM_KEYS_2D(<mem_ptr>) // [slot, value]
sstore // []
}
}

0 comments on commit e870794

Please sign in to comment.