Skip to content

Commit

Permalink
Merge pull request #257 from 0xPolygonHermez/feature/update-storage
Browse files Browse the repository at this point in the history
add onUpdateStorage in SLOAD/SSTORE oopcodes
  • Loading branch information
krlosMata authored Feb 20, 2023
2 parents fb251a0 + c390711 commit b0194d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/opcodes/storage-memory.zkasm
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ opSLOAD:
$ => A :MLOAD(storageAddr)
; set key for smt storage query
%SMT_KEY_SC_STORAGE => B
$${eventLog(onUpdateStorage)}
$ => E :SLOAD
; set key(C) as warmed storage for address(A)
E :MSTORE(SP++), CALL(isColdSlot); [value(E) => SP]
Expand Down Expand Up @@ -305,4 +306,5 @@ opSSTOREsr:
; set key for smt storage query
%SMT_KEY_SC_STORAGE => B
$ => C :MLOAD(tmpVarCsstore); key => C
$${eventLog(onUpdateStorage)}
$ => SR :SSTORE, JMP(readCode)

0 comments on commit b0194d3

Please sign in to comment.