Skip to content

Commit

Permalink
fix: ups, reverse storage
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Dec 5, 2024
1 parent 45e999b commit c2e89a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/CustomCollector.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ contract CollectorWithCustomImplZkSync is Collector {
/// @inheritdoc ICollector
function initialize(uint256) external virtual override initializer {
assembly {
sstore(53, 100000) // this slot was _fundsAdmin, but is now _nextStreamId
sstore(54, 0) // this slot was _nextStreamId, but is now _streams
sstore(51, 0) // this slot was _status, but is now part of the gap
sstore(52, 1) // this slot was the funds admin, but is now _status
}
}
}
4 changes: 2 additions & 2 deletions src/CustomCollectorZkSync.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ contract CollectorWithCustomImpl is Collector {
/// @inheritdoc ICollector
function initialize(uint256) external virtual override initializer {
assembly {
sstore(51, 0) // this slot was _status, but is now part of the gap
sstore(52, 1) // this slot was the funds admin, but is now "status"
sstore(53, 100000) // this slot was _fundsAdmin, but is now _nextStreamId
sstore(54, 0) // this slot was _nextStreamId, but is now _streams
}
}
}

0 comments on commit c2e89a5

Please sign in to comment.