Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(store): order load function arguments [N-02] #2033

Merged
merged 6 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/store/src/Storage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ library Storage {
// Store length
mstore(result, length)
}
load(storagePointer, length, offset, memoryPointer);
load(storagePointer, offset, memoryPointer, length);
return result;
}

Expand All @@ -180,7 +180,7 @@ library Storage {
* @param offset Offset within the storage location.
* @param memoryPointer Pointer to the location in memory to append the data.
*/
function load(uint256 storagePointer, uint256 length, uint256 offset, uint256 memoryPointer) internal view {
function load(uint256 storagePointer, uint256 offset, uint256 memoryPointer, uint256 length) internal view {
if (offset > 0) {
// Support offsets that are greater than 32 bytes by incrementing the storagePointer and decrementing the offset
if (offset >= 32) {
Expand Down
Loading