Skip to content

Commit

Permalink
fix: old implementation for older evm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladyslav Burtsevych committed Dec 23, 2024
1 parent aca0882 commit 331e8e2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zksync/src/contracts/utils/ScriptUtilsZkSync.sol
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,13 @@ library Create2UtilsZkSync {
let dataPtr := add(data, 32)
let resultPtr := add(result, 32)

// Use mcopy to efficiently copy the slice
mcopy(resultPtr, add(dataPtr, start), length)
// Copy the slice
let words := div(add(length, 31), 32)
let srcPtr := add(dataPtr, start)

for { let i := 0 } lt(i, words) { i := add(i, 1) } {
mstore(add(resultPtr, mul(i, 32)), mload(add(srcPtr, mul(i, 32))))
}

mstore(result, length)
}
Expand Down

0 comments on commit 331e8e2

Please sign in to comment.