**Note:** There is a section for disputed findings below the usual findings sections ## Summary ### Medium Risk Issues | |Issue|Instances| |-|:-|:-:| | [[M‑01](#m01-the-owner-is-a-single-point-of-failure-and-a-centralization-risk)] | The `owner` is a single point of failure and a centralization risk | 24 | Total: 24 instances over 1 issues ### Low Risk Issues | |Issue|Instances| |-|:-|:-:| | [[L‑01](#l01-addresses-upcast-and-compared-to-values-larger-than-a-uint160-may-result-in-collisions)] | `address`es upcast and compared to values larger than a `uint160`, may result in collisions | 1 | | [[L‑02](#l02-approvesafeapprove-may-revert-if-the-current-approval-is-not-zero)] | `approve()`/`safeApprove()` may revert if the current approval is not zero | 1 | | [[L‑03](#l03-receivepayable-fallback-function-does-not-authorize-requests)] | `receive()`/`payable fallback()` function does not authorize requests | 4 | | [[L‑04](#l04-require-should-be-used-instead-of-assert)] | `require()` should be used instead of `assert()` | 4 | | [[L‑05](#l05-safeapprove-is-deprecated)] | `safeApprove()` is deprecated | 2 | | [[L‑06](#l06-a-year-is-not-always-365-days)] | A year is not always 365 days | 2 | | [[L‑07](#l07-additionmultiplication-in-unchecked-block-is-unsafe)] | Addition/multiplication in `unchecked` block is unsafe | 9 | | [[L‑08](#l08-code-does-not-follow-the-best-practice-of-check-effects-interaction)] | Code does not follow the best practice of check-effects-interaction | 9 | | [[L‑09](#l09-consider-implementing-two-step-procedure-for-updating-protocol-addresses)] | Consider implementing two-step procedure for updating protocol addresses | 13 | | [[L‑10](#l10-division-by-zero-not-prevented)] | Division by zero not prevented | 1 | | [[L‑11](#l11-empty-receivefallback-function)] | Empty `receive()`/`fallback()` function | 4 | | [[L‑12](#l12-external-call-recipient-may-consume-all-transaction-gas)] | External call recipient may consume all transaction gas | 6 | | [[L‑13](#l13-external-calls-in-an-un-bounded-for-loop-may-result-in-a-dos)] | External calls in an un-bounded `for-`loop may result in a DOS | 2 | | [[L‑14](#l14-file-allows-a-version-of-solidity-that-is-susceptible-to-an-assembly-optimizer-bug)] | File allows a version of solidity that is susceptible to an assembly optimizer bug | 5 | | [[L‑15](#l15-file-allows-a-version-of-solidity-that-is-susceptible-to-an-assembly-storage-bug)] | File allows a version of solidity that is susceptible to an assembly storage bug | 4 | | [[L‑16](#l16-function-called-does-not-exist-in-the-contract-interface)] | Function called does not exist in the contract interface | 1 | | [[L‑17](#l17-function-doesnt-perform-any-updates)] | Function doesn't perform any updates | 1 | | [[L‑18](#l18-initialization-can-be-front-run)] | Initialization can be front-run | 6 | | [[L‑19](#l19-loss-of-precision)] | Loss of precision | 13 | | [[L‑20](#l20-missing-checks-for-address0x0-in-the-constructorinitializer)] | Missing checks for `address(0x0)` in the constructor/initializer | 8 | | [[L‑21](#l21-missing-checks-for-address0x0-when-updating-address-state-variables)] | Missing checks for `address(0x0)` when updating `address` state variables | 4 | | [[L‑22](#l22-missing-contract-existence-checks-before-low-level-calls)] | Missing contract-existence checks before low-level calls | 9 | | [[L‑23](#l23-missing-contract-existence-checks-before-yul-call)] | Missing contract-existence checks before yul `call()` | 12 | | [[L‑24](#l24-multiplication-on-the-result-of-a-division)] | Multiplication on the result of a division | 2 | | [[L‑25](#l25-numbers-downcast-to-addresses-may-result-in-collisions)] | Numbers downcast to `address`es may result in collisions | 16 | | [[L‑26](#l26-reviews-of-the-input-files-to-solpp-are-not-the-same-as-reviews-of-its-output)] | Reviews of the input files to `solpp` are not the same as reviews of its output | 94 | | [[L‑27](#l27-solidity-version-0820-may-not-work-on-other-chains-due-to-push0)] | Solidity version 0.8.20 may not work on other chains due to `PUSH0` | 94 | | [[L‑28](#l28-some-tokens-may-revert-when-large-transfers-are-made)] | Some tokens may revert when large transfers are made | 2 | | [[L‑29](#l29-state-variables-not-capped-at-reasonable-values)] | State variables not capped at reasonable values | 4 | | [[L‑30](#l30-subtraction-may-underflow-if-multiplication-is-too-large)] | Subtraction may underflow if multiplication is too large | 1 | | [[L‑31](#l31-unsafe-downcast)] | Unsafe downcast | 64 | | [[L‑32](#l32-upgradeable-contract-is-missing-a-__gap50-storage-variable-to-allow-for-new-storage-variables-in-later-versions)] | Upgradeable contract is missing a `__gap[50]` storage variable to allow for new storage variables in later versions | 2 | | [[L‑33](#l33-use-of-txorigin-is-unsafe-in-almost-every-context)] | Use of `tx.origin` is unsafe in almost every context | 3 | | [[L‑34](#l34-use-of-a-single-step-ownership-transfer)] | Use of a single-step ownership transfer | 3 | Total: 406 instances over 34 issues ### Non-critical Issues | |Issue|Instances| |-|:-|:-:| | [[N‑01](#n01-2n---1-should-be-re-written-as-typeuintnmaxnn)] | `2** - 1` should be re-written as `type(uint).max` | 6 | | [[N‑02](#n02-addresses-shouldnt-be-hard-coded)] | `address`es shouldn't be hard-coded | 1 | | [[N‑03](#n03-constants-should-be-defined-rather-than-using-magic-numbers)] | `constant`s should be defined rather than using magic numbers | 174 | | [[N‑04](#n04-else-block-not-required)] | `else`-block not required | 2 | | [[N‑05](#n05-if-statement-can-be-converted-to-a-ternary)] | `if`-statement can be converted to a ternary | 3 | | [[N‑06](#n06-internal-functions-not-called-by-the-contract-should-be-removed)] | `internal` functions not called by the contract should be removed | 1 | | [[N‑07](#n07-public-functions-not-called-by-the-contract-should-be-declared-external-instead)] | `public` functions not called by the contract should be declared `external` instead | 18 | | [[N‑08](#n08-pure-function-accesses-storage)] | `pure` function accesses storage | 1 | | [[N‑09](#n09-requirerevert-statements-should-have-descriptive-reason-strings)] | `require()`/`revert()` statements should have descriptive reason strings | 3 | | [[N‑10](#n10-add-inline-comments-for-unnamed-variables)] | Add inline comments for unnamed variables | 12 | | [[N‑11](#n11-adding-a-return-statement-when-the-function-defines-a-named-return-variable-is-redundant)] | Adding a `return` statement when the function defines a named return variable, is redundant | 1 | | [[N‑12](#n12-array-indices-should-be-referenced-via-enums-rather-than-via-numeric-literals)] | Array indices should be referenced via `enum`s rather than via numeric literals | 39 | | [[N‑13](#n13-assembly-block-creates-dirty-bits)] | Assembly block creates dirty bits | 2 | | [[N‑14](#n14-assembly-blocks-should-have-extensive-comments)] | Assembly blocks should have extensive comments | 55 | | [[N‑15](#n15-avoid-the-use-of-sensitive-terms)] | Avoid the use of sensitive terms | 56 | | [[N‑16](#n16-cast-to-bytes-or-bytes32-for-clearer-semantic-meaning)] | Cast to `bytes` or `bytes32` for clearer semantic meaning | 3 | | [[N‑17](#n17-common-functions-should-be-refactored-to-a-common-base-contract)] | Common functions should be refactored to a common base contract | 1 | | [[N‑18](#n18-complex-casting)] | Complex casting | 69 | | [[N‑19](#n19-consider-adding-a-blockdeny-list)] | Consider adding a block/deny-list | 5 | | [[N‑20](#n20-consider-adding-emergency-stop-functionality)] | Consider adding emergency-stop functionality | 3 | | [[N‑21](#n21-consider-adding-formal-verification-proofs)] | Consider adding formal verification proofs | 1 | | [[N‑22](#n22-consider-bounding-input-array-length)] | Consider bounding input array length | 18 | | [[N‑23](#n23-consider-disallowing-transfers-to-addressthis)] | Consider disallowing transfers to `address(this)` | 1 | | [[N‑24](#n24-consider-implementing-eip-5267-to-securely-describe-eip-712-domains-being-used)] | Consider implementing EIP-5267 to securely describe EIP-712 domains being used | 1 | | [[N‑25](#n25-consider-moving-msgsender-checks-to-a-common-authorization-modifier)] | Consider moving `msg.sender` checks to a common authorization `modifier` | 13 | | [[N‑26](#n26-consider-splitting-long-calculations)] | Consider splitting long calculations | 5 | | [[N‑27](#n27-consider-using-delete-rather-than-assigning-zerofalse-to-clear-values)] | Consider using `delete` rather than assigning zero/false to clear values | 1 | | [[N‑28](#n28-consider-using-safetransferlibsafetransfereth-or-addresssendvalue-for-clearer-semantic-meaning)] | Consider using `SafeTransferLib.safeTransferETH()` or `Address.sendValue()` for clearer semantic meaning | 2 | | [[N‑29](#n29-consider-using-descriptive-constants-when-passing-zero-as-a-function-argument)] | Consider using descriptive `constant`s when passing zero as a function argument | 29 | | [[N‑30](#n30-consider-using-named-mappings)] | Consider using named mappings | 36 | | [[N‑31](#n31-constant-redefined-elsewhere)] | Constant redefined elsewhere | 6 | | [[N‑32](#n32-constants-in-comparisons-should-appear-on-the-left-side)] | Constants in comparisons should appear on the left side | 110 | | [[N‑33](#n33-contract-should-expose-an-interface)] | Contract should expose an `interface` | 149 | | [[N‑34](#n34-contract-timekeeping-will-break-earlier-than-the-ethereum-network-itself-will-stop-working)] | Contract timekeeping will break earlier than the Ethereum network itself will stop working | 2 | | [[N‑35](#n35-contracts-should-have-full-test-coverage)] | Contracts should have full test coverage | 1 | | [[N‑36](#n36-custom-errors-should-be-used-rather-than-revertrequire)] | Custom errors should be used rather than `revert()`/`require()` | 272 | | [[N‑37](#n37-duplicated-requirerevert-checks-should-be-refactored-to-a-modifier-or-function)] | Duplicated `require()`/`revert()` checks should be refactored to a modifier or function | 3 | | [[N‑38](#n38-error-messages-should-descriptive-rather-that-cryptic)] | Error messages should descriptive, rather that cryptic | 138 | | [[N‑39](#n39-event-is-not-properly-indexed)] | Event is not properly `indexed` | 4 | | [[N‑40](#n40-events-are-missing-sender-information)] | Events are missing sender information | 53 | | [[N‑41](#n41-events-may-be-emitted-out-of-order-due-to-reentrancy)] | Events may be emitted out of order due to reentrancy | 12 | | [[N‑42](#n42-events-should-use-parameters-to-convey-information)] | Events should use parameters to convey information | 2 | | [[N‑43](#n43-events-that-mark-critical-parameter-changes-should-contain-both-the-old-and-the-new-value)] | Events that mark critical parameter changes should contain both the old and the new value | 8 | | [[N‑44](#n44-expressions-for-constant-values-should-use-immutable-rather-than-constant)] | Expressions for constant values should use `immutable` rather than `constant` | 79 | | [[N‑45](#n45-high-cyclomatic-complexity)] | High cyclomatic complexity | 1 | | [[N‑46](#n46-import-declarations-should-import-specific-identifiers-rather-than-the-whole-file)] | Import declarations should import specific identifiers, rather than the whole file | 124 | | [[N‑47](#n47-imports-could-be-organized-more-systematically)] | Imports could be organized more systematically | 3 | | [[N‑48](#n48-inconsistent-method-of-specifying-a-floating-pragma)] | Inconsistent method of specifying a floating pragma | 1 | | [[N‑49](#n49-interfaces-should-be-defined-in-separate-files-from-their-usage)] | Interfaces should be defined in separate files from their usage | 2 | | [[N‑50](#n50-large-multiples-of-ten-should-use-scientific-notation-eg-1e6-rather-than-decimal-literals-eg-1000000-for-readability)] | Large multiples of ten should use scientific notation (e.g. `1e6`) rather than decimal literals (e.g. `1000000`), for readability | 2 | | [[N‑51](#n51-large-numeric-literals-should-use-underscores-for-readability)] | Large numeric literals should use underscores for readability | 19 | | [[N‑52](#n52-large-or-complicated-code-bases-should-implement-invariant-tests)] | Large or complicated code bases should implement invariant tests | 1 | | [[N‑53](#n53-libraries-should-be-defined-in-separate-files-from-their-usage)] | Libraries should be defined in separate files from their usage | 2 | | [[N‑54](#n54-long-functions-should-be-refactored-into-multiple-smaller-functions)] | Long functions should be refactored into multiple, smaller, functions | 13 | | [[N‑55](#n55-memory-safe-annotation-preferred-over-comment-variant)] | Memory-safe annotation preferred over comment variant | 1 | | [[N‑56](#n56-misplaced-spdx-identifier)] | Misplaced SPDX identifier | 94 | | [[N‑57](#n57-missing-checks-constructorinitializer-assignments)] | Missing checks constructor/initializer assignments | 2 | | [[N‑58](#n58-missing-checks-for-state-variable-assignments)] | Missing checks for state variable assignments | 4 | | [[N‑59](#n59-missing-event-and-or-timelock-for-critical-parameter-change)] | Missing event and or timelock for critical parameter change | 4 | | [[N‑60](#n60-multiple-addressid-mappings-can-be-combined-into-a-single-mapping-of-an-addressid-to-a-struct-for-readability)] | Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, for readability | 1 | | [[N‑61](#n61-named-imports-of-parent-contracts-are-missing)] | Named imports of parent contracts are missing | 43 | | [[N‑62](#n62-natspec-contract-declarations-should-have-author-tags)] | NatSpec: Contract declarations should have `@author` tags | 29 | | [[N‑63](#n63-natspec-contract-declarations-should-have-dev-tags)] | NatSpec: Contract declarations should have `@dev` tags | 57 | | [[N‑64](#n64-natspec-contract-declarations-should-have-notice-tags)] | NatSpec: Contract declarations should have `@notice` tags | 26 | | [[N‑65](#n65-natspec-contract-declarations-should-have-title-tags)] | NatSpec: Contract declarations should have `@title` tags | 83 | | [[N‑66](#n66-natspec-contract-declarations-should-have-descriptions)] | NatSpec: Contract declarations should have descriptions | 26 | | [[N‑67](#n67-natspec-event-declarations-should-have-descriptions)] | NatSpec: Event declarations should have descriptions | 24 | | [[N‑68](#n68-natspec-file-is-missing-natspec)] | NatSpec: File is missing NatSpec | 22 | | [[N‑69](#n69-natspec-function-param-tag-is-missing)] | NatSpec: Function `@param` tag is missing | 538 | | [[N‑70](#n70-natspec-function-return-tag-is-missing)] | NatSpec: Function `@return` tag is missing | 250 | | [[N‑71](#n71-natspec-function-declarations-should-have-notice-tags)] | NatSpec: Function declarations should have `@notice` tags | 182 | | [[N‑72](#n72-natspec-function-declarations-should-have-descriptions)] | NatSpec: Function declarations should have descriptions | 182 | | [[N‑73](#n73-natspec-modifier-declarations-should-have-descriptions)] | NatSpec: Modifier declarations should have descriptions | 7 | | [[N‑74](#n74-natspec-state-variable-declarations-should-have-descriptions)] | NatSpec: State variable declarations should have descriptions | 13 | | [[N‑75](#n75-non-libraryinterface-files-should-use-fixed-compiler-versions-not-floating-ones)] | Non-library/interface files should use fixed compiler versions, not floating ones | 35 | | [[N‑76](#n76-not-using-the-named-return-variables-anywhere-in-the-function-is-confusing)] | Not using the named return variables anywhere in the function is confusing | 2 | | [[N‑77](#n77-open-todos)] | Open TODOs | 2 | | [[N‑78](#n78-overflows-in-unchecked-blocks)] | Overflows in unchecked blocks | 4 | | [[N‑79](#n79-polymorphic-functions-make-security-audits-more-time-consuming-and-error-prone)] | Polymorphic functions make security audits more time-consuming and error-prone | 5 | | [[N‑80](#n80-setters-should-prevent-re-setting-of-the-same-value)] | Setters should prevent re-setting of the same value | 15 | | [[N‑81](#n81-style-guide-mapping-definitions-do-not-follow-the-solidity-style-guide)] | Style guide: `mapping` definitions do not follow the Solidity Style Guide | 1 | | [[N‑82](#n82-style-guide-contract-does-not-follow-the-solidity-style-guides-suggested-layout-ordering)] | Style guide: Contract does not follow the Solidity style guide's suggested layout ordering | 16 | | [[N‑83](#n83-style-guide-function-names-should-use-lowercamelcase)] | Style guide: Function names should use lowerCamelCase | 2 | | [[N‑84](#n84-style-guide-function-ordering-does-not-follow-the-solidity-style-guide)] | Style guide: Function ordering does not follow the Solidity style guide | 46 | | [[N‑85](#n85-style-guide-lines-are-too-long)] | Style guide: Lines are too long | 121 | | [[N‑86](#n86-style-guide-non-externalpublic-function-names-should-begin-with-an-underscore)] | Style guide: Non-`external`/`public` function names should begin with an underscore | 5 | | [[N‑87](#n87-style-guide-non-externalpublic-variable-names-should-begin-with-an-underscore)] | Style guide: Non-`external`/`public` variable names should begin with an underscore | 44 | | [[N‑88](#n88-style-guide-state-and-local-variables-should-be-named-using-lowercamelcase)] | Style guide: State and local variables should be named using lowerCamelCase | 6 | | [[N‑89](#n89-style-guide-strings-should-use-double-quotes-rather-than-single-quotes)] | Style guide: Strings should use double quotes rather than single quotes | 2 | | [[N‑90](#n90-style-guide-top-level-declarations-should-be-separated-by-at-least-two-lines)] | Style guide: Top-level declarations should be separated by at least two lines | 1 | | [[N‑91](#n91-style-guide-variable-names-for-constants-are-improperly-named)] | Style guide: Variable names for `constant`s are improperly named | 6 | | [[N‑92](#n92-style-guide-variable-names-for-immutables-should-use-constant_case)] | Style guide: Variable names for `immutable`s should use CONSTANT_CASE | 6 | | [[N‑93](#n93-typos)] | Typos | 20 | | [[N‑94](#n94-unnecessary-cast)] | Unnecessary cast | 6 | | [[N‑95](#n95-unused-event-definition)] | Unused `event` definition | 2 | | [[N‑96](#n96-unused-public-contract-variable)] | Unused `public` contract variable | 6 | | [[N‑97](#n97-unused-file)] | Unused file | 2 | | [[N‑98](#n98-unused-function-parameter)] | Unused function parameter | 3 | | [[N‑99](#n99-unused-import)] | Unused import | 22 | | [[N‑00](#n00-unusual-loop-variable)] | Unusual loop variable | 1 | | [[N‑01](#n01-use-bytesconcat-on-bytes-instead-of-abiencodepacked-for-clearer-semantic-meaning)] | Use `bytes.concat()` on bytes instead of `abi.encodePacked()` for clearer semantic meaning | 2 | | [[N‑02](#n02-use-bit-shifts-in-an-imutable-variable-rather-than-long-bit-masks-of-a-single-bit-for-readability)] | Use bit shifts in an imutable variable rather than long bit masks of a single bit, for readability | 1 | | [[N‑03](#n03-use-of-override-is-unnecessary)] | Use of `override` is unnecessary | 52 | | [[N‑04](#n04-use-openzeppelins-merkleproof-rather-than-rolling-your-own)] | Use OpenZeppelin's `MerkleProof` rather than rolling your own | 1 | | [[N‑05](#n05-use-the-latest-solidity-prior-to-0820-if-on-l2s-for-deployment)] | Use the latest solidity (prior to 0.8.20 if on L2s) for deployment | 35 | | [[N‑06](#n06-using--without-specifying-an-upper-bound-is-unsafe)] | Using `>`/`>=` without specifying an upper bound is unsafe | 1 | | [[N‑07](#n07-variables-need-not-be-initialized-to-zero)] | Variables need not be initialized to zero | 36 | | [[N‑08](#n08-visibility-should-be-set-explicitly-rather-than-defaulting-to-internal)] | Visibility should be set explicitly rather than defaulting to `internal` | 14 | | [[N‑09](#n09-vulnerable-versions-of-packages-are-being-used)] | Vulnerable versions of packages are being used | 1 | Total: 3681 instances over 109 issues ### Gas Optimizations | |Issue|Instances|Total Gas Saved| |-|:-|:-:|:-:| | [[G‑01](#g01-require-or-revert-statements-that-check-input-arguments-should-be-at-the-top-of-the-function)] | `require()` or `revert()` statements that check input arguments should be at the top of the function | 8 | - | | [[G‑02](#g02-enable-ir-based-code-generation)] | Enable IR-based code generation | 1 | - | | [[G‑03](#g03-inline-modifiers-that-are-only-used-once-to-save-gas)] | Inline `modifier`s that are only used once, to save gas | 4 | - | | [[G‑04](#g04-multiple-addressid-mappings-can-be-combined-into-a-single-mapping-of-an-addressid-to-a-struct-where-appropriate)] | Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, where appropriate | 1 | - | | [[G‑05](#g05-reduce-gas-usage-by-moving-to-solidity-0819-or-later)] | Reduce gas usage by moving to Solidity 0.8.19 or later | 94 | - | | [[G‑06](#g06-use-uint2561uint2562-instead-of-truefalse-to-save-gas-for-changes)] | Use `uint256(1)`/`uint256(2)` instead of `true`/`false` to save gas for changes | 3 | 25650 | | [[G‑07](#g07-using-storage-instead-of-memory-for-state-variables-saves-gas)] | Using `storage` instead of `memory` for state variables saves gas | 13 | 27300 | | [[G‑08](#g08-state-variables-only-set-in-their-definitions-should-be-declared-constant)] | State variables only set in their definitions should be declared `constant` | 3 | 6291 | | [[G‑09](#g09-state-variables-only-set-in-the-constructor-should-be-declared-immutable)] | State variables only set in the constructor should be declared `immutable` | 1 | 2097 | | [[G‑10](#g10-structs-can-be-packed-into-fewer-storage-slots)] | Structs can be packed into fewer storage slots | 3 | 6000 | | [[G‑11](#g11-structs-can-be-packed-into-fewer-storage-slots-by-truncating-timestamp-bytes)] | Structs can be packed into fewer storage slots by truncating timestamp bytes | 3 | 6000 | | [[G‑12](#g12-state-variables-can-be-packed-into-fewer-storage-slots-by-truncating-timestamp-bytes)] | State variables can be packed into fewer storage slots by truncating timestamp bytes | 1 | 2000 | | [[G‑13](#g13-state-variables-can-be-packed-into-fewer-storage-slots)] | State variables can be packed into fewer storage slots | 1 | 2000 | | [[G‑14](#g14-avoid-updating-storage-when-the-value-hasnt-changed)] | Avoid updating storage when the value hasn't changed | 15 | 12000 | | [[G‑15](#g15-events-should-be-emitted-outside-of-loops)] | Events should be emitted outside of loops | 3 | 1125 | | [[G‑16](#g16--has-the-same-value-as-new-bytes0-but-costs-less-gas)] | `""` has the same value as `new bytes(0)` but costs less gas | 4 | 1036 | | [[G‑17](#g17-avoid-fetching-a-low-level-calls-return-data-by-using-assembly)] | Avoid fetching a low-level call's return data by using assembly | 4 | 636 | | [[G‑18](#g18-using-calldata-instead-of-memory-for-read-only-arguments-in-external-functions-saves-gas)] | Using `calldata` instead of `memory` for read-only arguments in `external` functions saves gas | 12 | 1440 | | [[G‑19](#g19-using-bools-for-storage-incurs-overhead)] | Using `bool`s for storage incurs overhead | 3 | 300 | | [[G‑20](#g20-avoid-transferring-amounts-of-zero-in-order-to-save-gas)] | Avoid transferring amounts of zero in order to save gas | 3 | 300 | | [[G‑21](#g21-using-this-to-access-functions-results-in-an-external-call-wasting-gas)] | Using `this` to access functions results in an external call, wasting gas | 1 | 100 | | [[G‑22](#g22-state-variables-should-be-cached-in-stack-variables-rather-than-re-reading-them-from-storage)] | State variables should be cached in stack variables rather than re-reading them from storage | 76 | 7372 | | [[G‑23](#g23-use-local-variables-for-emitting)] | Use local variables for emitting | 7 | 679 | | [[G‑24](#g24-storage-re-read-via-storage-pointer)] | Storage re-read via storage pointer | 4 | 388 | | [[G‑25](#g25-state-variable-read-in-a-loop)] | State variable read in a loop | 3 | 291 | | [[G‑26](#g26-use-the-inputsresults-of-assignments-rather-than-re-reading-state-variables)] | Use the inputs/results of assignments rather than re-reading state variables | 2 | 194 | | [[G‑27](#g27-use-assembly-for-small-keccak256-hashes-in-order-to-save-gas)] | Use assembly for small keccak256 hashes, in order to save gas | 20 | 1600 | | [[G‑28](#g28-ii-should-be-uncheckediuncheckedi-when-it-is-not-possible-for-them-to-overflow-as-is-the-case-when-used-in-for--and-while-loops)] | `++i`/`i++` should be `unchecked{++i}`/`unchecked{i++}` when it is not possible for them to overflow, as is the case when used in `for`- and `while`-loops | 9 | 540 | | [[G‑29](#g29-internal-functions-not-called-by-the-contract-should-be-removed-to-save-deployment-gas)] | `internal` functions not called by the contract should be removed to save deployment gas | 1 | - | | [[G‑30](#g30-avoid-contract-existence-checks-by-using-low-level-calls)] | Avoid contract existence checks by using low-level calls | 2 | 200 | | [[G‑31](#g31-keccak256-should-only-need-to-be-called-on-a-specific-string-literal-once)] | `keccak256()` should only need to be called on a specific string literal once | 5 | 210 | | [[G‑32](#g32-assigning-state-variables-directly-with-named-struct-constructors-wastes-gas)] | Assigning state variables directly with named struct constructors wastes gas | 1 | 28 | | [[G‑33](#g33-initializers-can-be-marked-payable)] | Initializers can be marked `payable` | 3 | - | | [[G‑34](#g34-multiple-accesses-of-a-mappingarray-should-use-a-local-variable-cache)] | Multiple accesses of a mapping/array should use a local variable cache | 1 | 42 | | [[G‑35](#g35-remove-or-replace-unused-state-variables)] | Remove or replace unused state variables | 4 | - | | [[G‑36](#g36-same-cast-is-done-multiple-times)] | Same cast is done multiple times | 2 | - | | [[G‑37](#g37-use-assembly-to-emit-events-in-order-to-save-gas)] | Use assembly to emit events, in order to save gas | 39 | 1482 | | [[G‑38](#g38-add-unchecked--for-subtractions-where-the-operands-cannot-underflow-because-of-a-previous-require-or-if-statement)] | Add `unchecked {}` for subtractions where the operands cannot underflow because of a previous `require()` or `if`-statement | 2 | 60 | | [[G‑39](#g39-optimize-names-to-save-gas)] | Optimize names to save gas | 44 | 968 | | [[G‑40](#g40-usage-of-uintsints-smaller-than-32-bytes-256-bits-incurs-overhead)] | Usage of `uints`/`ints` smaller than 32 bytes (256 bits) incurs overhead | 14 | 308 | | [[G‑41](#g41-functions-guaranteed-to-revert-when-called-by-normal-users-can-be-marked-payable)] | Functions guaranteed to revert when called by normal users can be marked `payable` | 58 | 1218 | | [[G‑42](#g42-constructors-can-be-marked-payable)] | Constructors can be marked `payable` | 11 | 231 | | [[G‑43](#g43-internalprivate-functions-only-called-once-can-be-inlined-to-save-gas)] | `internal`/`private` functions only called once can be inlined to save gas | 60 | 1200 | | [[G‑44](#g44-unchecked---can-be-used-on-the-division-of-two-uints-in-order-to-save-gas)] | `unchecked {}` can be used on the division of two `uint`s in order to save gas | 7 | 140 | | [[G‑45](#g45-division-by-powers-of-two-should-use-bit-shifting)] | Division by powers of two should use bit shifting | 4 | 80 | | [[G‑46](#g46-x--y-costs-more-gas-than-x--x--y-for-basic-typed-state-variablesyxxyx)] | ` += ` costs more gas than ` = + ` for basic-typed state variables | 3 | 30 | | [[G‑47](#g47-simple-checks-for-zero-can-be-done-using-assembly-to-save-gas)] | Simple checks for zero can be done using assembly to save gas | 14 | 84 | | [[G‑48](#g48-using--0-costs-more-gas-than--0-when-used-on-a-uint-in-a-require-statement)] | Using `> 0` costs more gas than `!= 0` when used on a `uint` in a `require()` statement | 6 | 36 | | [[G‑49](#g49-nesting-if-statements-is-cheaper-than-using-)] | Nesting `if`-statements is cheaper than using `&&` | 5 | 30 | | [[G‑50](#g50-i-costs-less-gas-than-i-especially-when-its-used-in-for-loops---ii---too)] | `++i` costs less gas than `i++`, especially when it's used in `for`-loops (`--i`/`i--` too) | 5 | 25 | | [[G‑51](#g51-requirerevert-strings-longer-than-32-bytes-cost-extra-gas)] | `require()`/`revert()` strings longer than 32 bytes cost extra gas | 81 | 243 | | [[G‑52](#g52--costs-less-gas-than-)] | `>=` costs less gas than `>` | 17 | 51 | | [[G‑53](#g53-arraylength-should-not-be-looked-up-in-every-loop-of-a-for-looparray)] | `.length` should not be looked up in every loop of a `for`-loop | 8 | 24 | | [[G‑54](#g54-remove-unused-local-variable)] | Remove unused local variable | 1 | - | | [[G‑55](#g55-stack-variable-used-as-a-cheaper-cache-for-a-state-variable-is-only-used-once)] | Stack variable used as a cheaper cache for a state variable is only used once | 3 | 9 | | [[G‑56](#g56-splitting-require-statements-that-use--saves-gas)] | Splitting `require()` statements that use `&&` saves gas | 3 | 9 | | [[G‑57](#g57-use-custom-errors-rather-than-revertrequire-strings-to-save-gas)] | Use custom errors rather than `revert()`/`require()` strings to save gas | 272 | - | | [[G‑58](#g58-using-constants-directly-rather-than-caching-the-value-saves-gas)] | Using `constant`s directly, rather than caching the value, saves gas | 31 | - | | [[G‑59](#g59-using-msg-globals-directly-rather-than-caching-the-value-saves-gas)] | Using `msg` globals directly, rather than caching the value, saves gas | 3 | - | | [[G‑60](#g60-using-globals-directly-is-cheaper-than-assigning-them-to-variables)] | Using globals directly is cheaper than assigning them to variables | 2 | 10 | Total: 1014 instances over 60 issues with **112057 gas** saved Gas totals are estimates based on data from the Ethereum Yellowpaper. The estimates use the lower bounds of ranges and count two iterations of each `for`-loop. All values above are runtime, not deployment, values; deployment values are listed in the individual issue descriptions. The table above as well as its gas numbers do not include any of the excluded findings. ### Disputed Issues The issues below may be reported by other bots/wardens, but can be penalized/ignored since either the rule or the specified instances are invalid | |Issue|Instances| |-|:-|:-:| | [[D‑01](#d01-abiencode-is-less-efficient-than-abiencodepacked)] | ~~`abi.encode()` is less efficient than `abi.encodepacked()`~~ | 5 | | [[D‑02](#d02-abiencodepacked-should-not-be-used-with-dynamic-types-when-passing-the-result-to-a-hash-function-such-as-keccak256)] | ~~`abi.encodePacked()` should not be used with dynamic types when passing the result to a hash function such as `keccak256()`~~ | 6 | | [[D‑03](#d03-internal-functions-not-called-by-the-contract-should-be-removed)] | ~~`internal` functions not called by the contract should be removed~~ | 112 | | [[D‑04](#d04-selfbalance-is-cheaper-than-addressthisbalance)] | ~~`selfbalance()` is cheaper than `address(this).balance`~~ | 3 | | [[D‑05](#d05-all-interfaces-used-within-a-project-should-be-imported)] | ~~All interfaces used within a project should be imported~~ | 54 | | [[D‑06](#d06-array-is-pushed-but-not-poped)] | ~~Array is `push()`ed but not `pop()`ed~~ | 2 | | [[D‑07](#d07-array-lengths-not-checked)] | ~~Array lengths not checked~~ | 49 | | [[D‑08](#d08-assembly-blocks-should-have-comments)] | ~~Assembly blocks should have comments~~ | 9 | | [[D‑09](#d09-avoid-fetching-a-low-level-calls-return-data-by-using-assembly)] | ~~Avoid fetching a low-level call's return data by using assembly~~ | 13 | | [[D‑10](#d10-bad-bot-rules)] | ~~Bad bot rules~~ | 1 | | [[D‑11](#d11-cast-to-bytes-or-bytes32-for-clearer-semantic-meaning)] | ~~Cast to `bytes` or `bytes32` for clearer semantic meaning~~ | 9 | | [[D‑12](#d12-change-public-function-visibility-to-external-to-save-gas)] | ~~Change `public` function visibility to `external` to save gas~~ | 9 | | [[D‑13](#d13-constant-redefined-elsewhere)] | ~~Constant redefined elsewhere~~ | 10 | | [[D‑14](#d14-contracts-containing-only-utility-functions-should-be-made-into-libraries)] | ~~Contracts containing only utility functions should be made into libraries~~ | 3 | | [[D‑15](#d15-contracts-do-not-work-with-fee-on-transfer-tokens)] | ~~Contracts do not work with fee-on-transfer tokens~~ | 14 | | [[D‑16](#d16-default-bool-values-are-manually-reset)] | ~~Default `bool` values are manually reset~~ | 8 | | [[D‑17](#d17-duplicated-requirerevert-checks-should-be-refactored-to-a-modifier-or-function)] | ~~Duplicated `require()`/`revert()` checks should be refactored to a modifier or function~~ | 280 | | [[D‑18](#d18-duplicated-requirerevert-checks-should-be-refactored-to-a-modifier-or-function-to-save-gas)] | ~~Duplicated require()/revert() checks should be refactored to a modifier Or function to save gas~~ | 3 | | [[D‑19](#d19-event-names-should-use-camelcase)] | ~~Event names should use CamelCase~~ | 59 | | [[D‑20](#d20-events-that-mark-critical-parameter-changes-should-contain-both-the-old-and-the-new-value)] | ~~Events that mark critical parameter changes should contain both the old and the new value~~ | 57 | | [[D‑21](#d21-functions-which-are-either-private-or-internal-should-have-a-preceding-_-in-their-name)] | ~~Functions which are either private or internal should have a preceding _ in their name~~ | 107 | | [[D‑22](#d22-getter-for-public-state-variables-are-redundant)] | ~~Getter for public state variables are redundant~~ | 2 | | [[D‑23](#d23-ierc20-approve-is-deprecated)] | ~~IERC20 approve() Is Deprecated~~ | 1 | | [[D‑24](#d24-inconsistent-comment-spacing)] | ~~Inconsistent comment spacing~~ | 6 | | [[D‑25](#d25-interfaces-should-be-defined-in-separate-files-from-their-usage)] | ~~Interfaces should be defined in separate files from their usage~~ | 35 | | [[D‑26](#d26-it-is-standard-for-all-external-and-public-functions-to-be-override-from-an-interface)] | ~~It is standard for all external and public functions to be override from an interface~~ | 52 | | [[D‑27](#d27-its-not-standard-to-end-and-begin-a-code-object-on-the-same-line)] | ~~It's not standard to end and begin a code object on the same line~~ | 76 | | [[D‑28](#d28-lack-of-unchecked-in-loops)] | ~~Lack of unchecked in loops~~ | 4 | | [[D‑29](#d29-large-approvals-may-not-work-with-some-erc20-tokens)] | ~~Large approvals may not work with some ERC20 tokens~~ | 2 | | [[D‑30](#d30-low-level-calls-with-solidity-before-0814-result-in-an-optimiser-bug)] | ~~Low level calls with Solidity before 0.8.14 result in an optimiser bug~~ | 59 | | [[D‑31](#d31-missing-checks-for-ecrecover-signature-malleability)] | ~~Missing checks for `ecrecover()` signature malleability~~ | 1 | | [[D‑32](#d32-missing-checks-for-state-variable-assignments)] | ~~Missing checks for state variable assignments~~ | 12 | | [[D‑33](#d33-missing-contract-existence-checks-before-low-level-calls)] | ~~Missing contract-existence checks before low-level calls~~ | 4 | | [[D‑34](#d34-multiple-addressid-mappings-can-be-combined-into-a-single-mapping-of-an-addressid-to-a-struct-for-readability)] | ~~Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, for readability~~ | 2 | | [[D‑35](#d35-multiple-addressid-mappings-can-be-combined-into-a-single-mapping-of-an-addressid-to-a-struct-where-appropriate)] | ~~Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, where appropriate~~ | 2 | | [[D‑36](#d36-multiplications-of-powers-2-of-can-be-replaced-by-a-left-shift-operation-to-save-gas)] | ~~Multiplications of powers 2 of can be replaced by a left shift operation to save gas~~ | 25 | | [[D‑37](#d37-must-approve-or-increase-allowance-first)] | ~~Must approve or increase allowance first~~ | 2 | | [[D‑38](#d38-natspec-contract-declarations-should-have-notice-tags)] | ~~NatSpec: Contract declarations should have `@notice` tags~~ | 64 | | [[D‑39](#d39-natspec-function-declarations-should-have-notice-tags)] | ~~NatSpec: Function declarations should have `@notice` tags~~ | 217 | | [[D‑40](#d40-natspec-invalid-comment-style)] | ~~NatSpec: Invalid comment style~~ | 1 | | [[D‑41](#d41-nesting-if-statements-is-cheaper-than-using-)] | ~~Nesting `if`-statements is cheaper than using `&&`~~ | 5 | | [[D‑42](#d42-non-assembly-method-available)] | ~~Non-assembly method available~~ | 1 | | [[D‑43](#d43-non-libraryinterface-files-should-use-fixed-compiler-versions-not-floating-ones)] | ~~Non-library/interface files should use fixed compiler versions, not floating ones~~ | 59 | | [[D‑44](#d44-not-initializing-local-variables-to-zero-saves-gas)] | ~~Not initializing local variables to zero saves gas~~ | 33 | | [[D‑45](#d45-not-using-the-named-return-variables-anywhere-in-the-function-is-confusing)] | ~~Not using the named return variables anywhere in the function is confusing~~ | 29 | | [[D‑46](#d46-numeric-values-having-to-do-with-time-should-use-time-units-for-readability)] | ~~Numeric values having to do with time should use time units for readability~~ | 3 | | [[D‑47](#d47-operator--costs-more-gas-than---for-state-variables)] | ~~Operator += costs more gas than = + for state variables~~ | 6 | | [[D‑48](#d48-overly-complicated-arithmetic)] | ~~Overly complicated arithmetic~~ | 1 | | [[D‑49](#d49-public-functions-not-used-internally-can-be-marked-as-external-to-save-gas)] | ~~Public functions not used internally can be marked as external to save gas~~ | 18 | | [[D‑50](#d50-re-org-attack)] | ~~Re-org attack~~ | 2 | | [[D‑51](#d51-remove-or-replace-unused-state-variables)] | ~~Remove or replace unused state variables~~ | 2 | | [[D‑52](#d52-save-gas-with-the-use-of-specific-import-statements)] | ~~Save gas with the use of specific import statements~~ | 124 | | [[D‑53](#d53-shorten-the-array-rather-than-copying-to-a-new-one)] | ~~Shorten the array rather than copying to a new one~~ | 1 | | [[D‑54](#d54-state-variable-read-in-a-loop)] | ~~State variable read in a loop~~ | 3 | | [[D‑55](#d55-state-variables-not-capped-at-reasonable-values)] | ~~State variables not capped at reasonable values~~ | 4 | | [[D‑56](#d56-storage-write-removal-bug-on-conditional-early-termination)] | ~~Storage Write Removal Bug On Conditional Early Termination~~ | 60 | | [[D‑57](#d57-style-guide-constantimmutable-variable-names-should-use-capital-letters-and-underscores)] | ~~Style guide: `constant`/`immutable` variable names should use capital letters and underscores~~ | 50 | | [[D‑58](#d58-style-guide-contract-does-not-follow-the-solidity-style-guides-suggested-layout-ordering)] | ~~Style guide: Contract does not follow the Solidity style guide's suggested layout ordering~~ | 75 | | [[D‑59](#d59-style-guide-do-not-use-underscore-at-the-end-of-variable-name)] | ~~Style guide: Do not use underscore at the end of variable name~~ | 1 | | [[D‑60](#d60-style-guide-function-names-not-in-mixedcase)] | ~~Style guide: Function Names Not in mixedCase~~ | 83 | | [[D‑61](#d61-style-guide-prefer-double-quotes-for-string-quoting)] | ~~Style guide: Prefer double quotes for string quoting~~ | 2 | | [[D‑62](#d62-the-result-of-function-calls-should-be-cached-rather-than-re-calling-the-function)] | ~~The result of function calls should be cached rather than re-calling the function~~ | 6 | | [[D‑63](#d63-timestamp-may-be-manipulation)] | ~~Timestamp may be manipulation~~ | 8 | | [[D‑64](#d64-tokens-may-be-minted-to-address0x0)] | ~~Tokens may be minted to `address(0x0)`~~ | 2 | | [[D‑65](#d65-unnecessary-look-up-in-if-condition)] | ~~Unnecessary look up in if condition~~ | 26 | | [[D‑66](#d66-unsafe-downcast)] | ~~Unsafe downcast~~ | 3 | | [[D‑67](#d67-unused-event-definition)] | ~~Unused `event` definition~~ | 46 | | [[D‑68](#d68-unused-struct-definition)] | ~~Unused `struct` definition~~ | 27 | | [[D‑69](#d69-unused-function-parameter)] | ~~Unused function parameter~~ | 43 | | [[D‑70](#d70-unused-import)] | ~~Unused import~~ | 212 | | [[D‑71](#d71-unused-local-variable)] | ~~Unused local variable~~ | 43 | | [[D‑72](#d72-unused-modifier)] | ~~Unused modifier~~ | 10 | | [[D‑73](#d73-unused-named-return-variables-without-optimizer-waste-gas)] | ~~Unused named return variables without optimizer waste gas~~ | 2 | | [[D‑74](#d74-unusual-loop-variable)] | ~~Unusual loop variable~~ | 30 | | [[D‑75](#d75-upgradeable-contract-not-initialized)] | ~~Upgradeable contract not initialized~~ | 2 | | [[D‑76](#d76-usage-of-intsuints-smaller-than-32-bytes-incurs-overhead)] | ~~Usage of ints/uints smaller than 32 bytes incurs overhead~~ | 3 | | [[D‑77](#d77-use--0-instead-of--0-for-unsigned-integer-comparison)] | ~~Use != 0 instead of > 0 for unsigned integer comparison~~ | 10 | | [[D‑78](#d78-use-_safemint-instead-of-_mint-for-erc721)] | ~~Use `_safeMint` instead of `_mint` for ERC721~~ | 2 | | [[D‑79](#d79-use-inheritdoc-rather-than-using-a-non-standard-annotation)] | ~~Use `@inheritdoc` rather than using a non-standard annotation~~ | 49 | | [[D‑80](#d80-use-assembly-to-write-addresscontract-type-storage-values)] | ~~Use `assembly` to write address/contract type storage values~~ | 29 | | [[D‑81](#d81-use-bytesconcat-on-bytes-instead-of-abiencodepacked-for-clearer-semantic-meaning)] | ~~Use `bytes.concat()` on bytes instead of `abi.encodePacked()` for clearer semantic meaning~~ | 10 | | [[D‑82](#d82-use-assembly-to-emit-events-in-order-to-save-gas)] | ~~Use assembly to emit events, in order to save gas~~ | 5 | | [[D‑83](#d83-use-constants-instead-of-typeuintxmax)] | ~~Use constants instead of type(uintx).max~~ | 12 | | [[D‑84](#d84-use-delete-instead-of-setting-mappingstate-variable-to-zero-to-save-gas)] | ~~Use delete instead of setting mapping/state variable to zero, to save gas~~ | 2 | | [[D‑85](#d85-use-multiple-require-and-if-statements-instead-of-)] | ~~Use multiple `require()` and `if` statements instead of `&&`~~ | 10 | | [[D‑86](#d86-use-replace-and-pop-instead-of-the-delete-keyword-to-removing-an-item-from-an-array)] | ~~Use replace and pop instead of the delete keyword to removing an item from an array~~ | 4 | | [[D‑87](#d87-using-calldata-instead-of-memory-for-read-only-arguments-in-external-functions-saves-gas)] | ~~Using `calldata` instead of `memory` for read-only arguments in `external` functions saves gas~~ | 3 | | [[D‑88](#d88-using-storage-instead-of-memory-for-structsarrays-saves-gas)] | ~~Using `storage` instead of `memory` for structs/arrays saves gas~~ | 2 | | [[D‑89](#d89-using-this-to-access-functions-results-in-an-external-call-wasting-gas)] | ~~Using `this` to access functions results in an external call, wasting gas~~ | 3 | | [[D‑90](#d90-using-this-to-access-functions-results-in-an-external-call-wasting-gas)] | ~~Using `this` to access functions results in an external call, wasting gas~~ | 2 | | [[D‑91](#d91-using-storage-instead-of-memory-for-structsarrays-saves-gas)] | ~~Using `storage` instead of `memory` for structs/arrays saves gas~~ | 1 | | [[D‑92](#d92-using-bitmap-to-store-bool-states-can-save-gas)] | ~~Using bitmap to store bool states can save gas~~ | 5 | | [[D‑93](#d93-using-named-function-calls-is-a-much-safer)] | ~~Using named function calls is a much safer~~ | 5 | Total: 2559 instances over 93 issues ## Medium Risk Issues ### [M‑01] The `owner` is a single point of failure and a centralization risk Having a single EOA as the only owner of contracts is a large centralization risk and a single point of failure. A single private key may be taken in a hack, or the sole holder of the key may become unable to retrieve the key when necessary, or the single owner can become malicious and perform a rug-pull. Consider changing to a multi-signature setup, and or having a role-based authorization model. *There are 24 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 51: function setAccessMode(address _target, AccessMode _accessMode) external onlyOwner { 60: function setBatchAccessMode(address[] calldata _targets, AccessMode[] calldata _accessModes) external onlyOwner { 85 function setBatchPermissionToCall( 86 address[] calldata _callers, 87 address[] calldata _targets, 88 bytes4[] calldata _functionSigs, 89 bool[] calldata _enables 90: ) external onlyOwner { 108 function setPermissionToCall( 109 address _caller, 110 address _target, 111 bytes4 _functionSig, 112 bool _enable 113: ) external onlyOwner { 131: function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L49-L49), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L58-L58), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L83-L88), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L106-L111), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129-L129) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 131: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external onlyOwner { 144: function scheduleShadow(bytes32 _id, uint256 _delay) external onlyOwner { 156: function cancel(bytes32 _id) external onlyOwnerOrSecurityCouncil { 169: function execute(Operation calldata _operation) external onlyOwnerOrSecurityCouncil { ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L129-L129), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L142-L142), [156](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L154-L154), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L167-L167) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 54: function setValidator(address _newValidator) external onlyOwner { 61: function setExecutionDelay(uint32 _executionDelay) external onlyOwner { ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L52-L52), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L59-L59) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 22: function setPendingGovernor(address _newPendingGovernor) external onlyGovernor { 46: function setPendingAdmin(address _newPendingAdmin) external onlyGovernorOrAdmin { 70: function setValidator(address _validator, bool _active) external onlyGovernorOrAdmin { 77: function setPorterAvailability(bool _zkPorterIsAvailable) external onlyGovernor { 85: function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external onlyGovernor { 100: function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external onlyGovernor { 111: function freezeDiamond() external onlyGovernor { 122: function unfreezeDiamond() external onlyGovernorOrAdmin { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L20-L20), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L44-L44), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L68-L68), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L75-L75), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L83-L83), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L98-L98), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L109-L109), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 84: function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82-L82) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89: function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 95: function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 314 function setL2Block( 315 uint128 _l2BlockNumber, 316 uint128 _l2BlockTimestamp, 317 bytes32 _expectedPrevL2BlockHash, 318 bool _isFirstInBatch, 319 uint128 _maxVirtualBlocksToCreate 320: ) external onlyCallFromBootloader { 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423: ) external onlyCallFromBootloader { ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87-L87), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93-L93), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L312-L318), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L421) ## Low Risk Issues ### [L‑01] `address`es upcast and compared to values larger than a `uint160`, may result in collisions If the value is being compared to an input value in order to reject it, rather than allowing it to be converted to an address, the check will pass if the value is larger than `type(uint160).max`, even if, when cast, it matches the gating address. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 97: return _addr == uint256(uint160(address(ETH_TOKEN_SYSTEM_CONTRACT))) || _addr == 0; ``` *GitHub*: [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L95-L95) ### [L‑02] `approve()`/`safeApprove()` may revert if the current approval is not zero Calling `approve()` without first calling `approve(0)` if the current approval is non-zero will revert with some tokens, such as Tether (USDT). While Tether is known to do this, it applies to other tokens as well, which are trying to protect against [this attack vector](https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit). `safeApprove()` itself also implements this protection. Always reset the approval to zero before changing it to a new value (`SafeERC20.forceApprove()` does this for you), or use `safeIncreaseAllowance()`/`safeDecreaseAllowance()` *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 385: IERC20(token).safeApprove(paymaster, minAllowance); ``` *GitHub*: [385](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L383-L383) ### [L‑03] `receive()`/`payable fallback()` function does not authorize requests Having no access control on the function (e.g. `require(msg.sender == address(weth))`) means that someone may send Ether to the contract, and have no way to get anything back out, which is a loss of funds. If the concern is having to spend a small amount of gas to check the sender against an immutable address, the code should at least have a function to rescue mistakenly-sent Ether. *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 264: receive() external payable {} ``` *GitHub*: [264](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L262) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 231 receive() external payable { 232 // If the contract is called directly, behave like an EOA 233: } ``` *GitHub*: [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L229-L231) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 14: fallback() external payable {} 16: receive() external payable {} ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L14) ### [L‑04] `require()` should be used instead of `assert()` Prior to solidity version 0.8.0, hitting an assert consumes the **remainder of the transaction's available gas** rather than returning it, as `require()`/`revert()` do. `assert()` should be avoided even past solidity version 0.8.0 as its [documentation](https://docs.soliditylang.org/en/v0.8.14/control-structures.html#panic-via-assert-and-error-via-require) states that "The assert function creates an error of type Panic(uint256). ... Properly functioning code should never create a Panic, not even on invalid external input. If this happens, then there is a bug in your contract which you should fix". *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 89: assert(L2_TO_L1_LOG_SERIALIZE_SIZE != 2 * 32); ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L87) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 352: assert(block.chainid != 1); ``` *GitHub*: [352](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L350) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 226: assert(msg.sender != BOOTLOADER_FORMAL_ADDRESS); ``` *GitHub*: [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L224) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 52: assert(_len != 1); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L50) ### [L‑05] `safeApprove()` is deprecated [Deprecated](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/bfff03c0d2a59bcd8e2ead1da9aed9edf0080d05/contracts/token/ERC20/utils/SafeERC20.sol#L38-L45) in favor of `safeIncreaseAllowance()` and `safeDecreaseAllowance()`. If only setting the initial allowance to the value that means infinite, `safeIncreaseAllowance()` can be used instead. The function may currently work, but if a bug is found in this version of OpenZeppelin, and the version that you're forced to upgrade to no longer has this function, you'll encounter unnecessary delays in porting and testing replacement contracts. *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 384: IERC20(token).safeApprove(paymaster, 0); 385: IERC20(token).safeApprove(paymaster, minAllowance); ``` *GitHub*: [384](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L382), [385](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L383) ### [L‑06] A year is not always 365 days On leap years, the number of days is 366, so calculations during those years will return the wrong value *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 56: uint256 constant COMMIT_TIMESTAMP_NOT_OLDER = 365 days; 60: uint256 constant COMMIT_TIMESTAMP_APPROXIMATION_DELTA = 365 days; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L54-L54), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L58-L58) ### [L‑07] Addition/multiplication in `unchecked` block is unsafe The additions/multiplications may silently overflow because they're in `unchecked` blocks with no preceding value checks, which may lead to unexpected results *There are 9 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 21: return _lhs + _rhs; ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L19-L19) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 107 uint256 listLength = encodedNonce.length + 108 encodedGasParam.length + 109 encodedTo.length + 110 encodedValue.length + 111 encodedDataLength.length + 112: _transaction.data.length + 200 uint256 listLength = encodedFixedLengthParams.length + 201 encodedDataLength.length + 202: _transaction.data.length + 295 uint256 listLength = encodedFixedLengthParams.length + 296 encodedDataLength.length + 297: _transaction.data.length + ``` *GitHub*: [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L105-L110), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L198-L200), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L293-L295) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 148: pubdataLen = 4 + _message.length + L2_TO_L1_LOG_SERIALIZE_SIZE; ``` *GitHub*: [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L146-L146) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 66: encoded[0] = bytes1(uint8(_len + _offset)); ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L64-L64) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 192 uint256 listLength = encodedNonce.length + 193 encodedGasParam.length + 194 encodedTo.length + 195 encodedValue.length + 196 encodedDataLength.length + 197: _transaction.data.length + 267 uint256 listLength = encodedFixedLengthParams.length + 268 encodedDataLength.length + 269: _transaction.data.length + 339 uint256 listLength = encodedFixedLengthParams.length + 340 encodedDataLength.length + 341: _transaction.data.length + ``` *GitHub*: [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L190-L195), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L265-L267), [339](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L337-L339) ### [L‑08] Code does not follow the best practice of check-effects-interaction Code should follow the best-practice of [check-effects-interaction](https://blockchain-academy.hs-mittweida.de/courses/solidity-coding-beginners-to-intermediate/lessons/solidity-11-coding-patterns/topic/checks-effects-interactions/), where state variables are updated before any external calls are made. Doing so prevents a large class of reentrancy bugs. *There are 9 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit safeTransferFrom() called prior to this assignment 125 l2Bridge = BridgeInitializationHelper.requestDeployTransaction( 126 zkSync, 127 _deployBridgeProxyFee, 128 l2BridgeProxyBytecodeHash, 129 l2BridgeProxyConstructorData, 130 // No factory deps are needed for L2 bridge proxy, because it is already passed in previous step 131 new bytes[](0) 132: ); ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L123-L130) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit safeTransferFrom() called prior to this assignment 128 l2Bridge = BridgeInitializationHelper.requestDeployTransaction( 129 zkSync, 130 _deployBridgeProxyFee, 131 l2WethBridgeProxyBytecodeHash, 132 l2WethBridgeProxyConstructorData, 133 // No factory deps are needed for L2 bridge proxy, because it is already passed in the previous step 134 new bytes[](0) 135: ); /// @audit finalizeEthWithdrawal() called prior to this assignment 267: isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex] = true; ``` *GitHub*: [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L126-L133), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L265-L265) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit null() called prior to this assignment 282: s.totalDepositedAmountPerUser[_depositor] += _amount; ``` *GitHub*: [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L280-L280) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit decodeString() called prior to this assignment 98: availableGetters = getters; ``` *GitHub*: [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L96-L96) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit verifyCompressedStateDiffs() called prior to this assignment 334: chainedLogsHash = bytes32(0); /// @audit verifyCompressedStateDiffs() called prior to this assignment 335: numberOfLogsToProcess = 0; /// @audit verifyCompressedStateDiffs() called prior to this assignment 336: chainedMessagesHash = bytes32(0); /// @audit verifyCompressedStateDiffs() called prior to this assignment 337: chainedL1BytecodesRevealDataHash = bytes32(0); ``` *GitHub*: [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L332-L332), [335](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L333-L333), [336](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L334-L334), [337](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L335-L335) ### [L‑09] Consider implementing two-step procedure for updating protocol addresses A copy-paste error or a typo may end up bricking protocol functionality, or sending tokens to an address with no known private key. Consider implementing a two-step procedure for updating protocol addresses, where the recipient is set as pending, and must 'accept' the assignment by making an affirmative call. A straight forward way of doing this would be to have the target contracts implement [EIP-165](https://eips.ethereum.org/EIPS/eip-165), and to have the 'set' functions ensure that the recipient is of the right interface type. *There are 13 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 131 function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { 132 tokenDeposit[_l1Token].depositLimitation = _depositLimitation; 133 tokenDeposit[_l1Token].depositCap = _depositCap; 134: } ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129-L132) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 251 function updateDelay(uint256 _newDelay) external onlySelf { 252 emit ChangeMinDelay(minDelay, _newDelay); 253 minDelay = _newDelay; 254: } 258 function updateSecurityCouncil(address _newSecurityCouncil) external onlySelf { 259 emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); 260 securityCouncil = _newSecurityCouncil; 261: } ``` *GitHub*: [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L249-L252), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L256-L259) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 54 function setValidator(address _newValidator) external onlyOwner { 55 address oldValidator = validator; 56 validator = _newValidator; 57 emit NewValidator(oldValidator, _newValidator); 58: } 61 function setExecutionDelay(uint32 _executionDelay) external onlyOwner { 62 executionDelay = _executionDelay; 63 emit NewExecutionDelay(_executionDelay); 64: } ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L52-L56), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L59-L62) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 70 function setValidator(address _validator, bool _active) external onlyGovernorOrAdmin { 71 s.validators[_validator] = _active; 72 emit ValidatorStatusUpdate(_validator, _active); 73: } 77 function setPorterAvailability(bool _zkPorterIsAvailable) external onlyGovernor { 78 // Change the porter availability 79 s.zkPorterIsAvailable = _zkPorterIsAvailable; 80 emit IsPorterAvailableStatusUpdate(_zkPorterIsAvailable); 81: } 85 function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external onlyGovernor { 86 require(_newPriorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "n5"); 87 88 uint256 oldPriorityTxMaxGasLimit = s.priorityTxMaxGasLimit; 89 s.priorityTxMaxGasLimit = _newPriorityTxMaxGasLimit; 90 emit NewPriorityTxMaxGasLimit(oldPriorityTxMaxGasLimit, _newPriorityTxMaxGasLimit); 91: } ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L68-L71), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L75-L79), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L83-L89) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 64 function updateAccountVersion(AccountAbstractionVersion _version) external onlySystemCall { 65 accountInfo[msg.sender].supportedAAVersion = _version; 66 67 emit AccountVersionUpdated(msg.sender, _version); 68: } ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L62-L66) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 84 function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 85 IContractDeployer.AccountInfo memory accountInfo = DEPLOYER_SYSTEM_CONTRACT.getAccountInfo(msg.sender); 86 87 require(_value != 0, "Nonce value cannot be set to 0"); 88 // If an account has sequential nonce ordering, we enforce that the previous 89 // nonce has already been used. 90 if (accountInfo.nonceOrdering == IContractDeployer.AccountNonceOrdering.Sequential && _key != 0) { 91 require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 92 } 93 94 uint256 addressAsKey = uint256(uint160(msg.sender)); 95 96 nonceValues[addressAsKey][_key] = _value; 97 98 emit ValueSetUnderNonce(msg.sender, _key, _value); 99: } ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82-L97) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89 function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 90 origin = _newOrigin; 91: } 95 function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 96 gasPrice = _gasPrice; 97: } 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423 ) external onlyCallFromBootloader { 424 (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = getBatchNumberAndTimestamp(); 425 require(_newTimestamp > previousBatchTimestamp, "Timestamps should be incremental"); 426 require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); 427 428 _ensureBatchConsistentWithL2Block(_newTimestamp); 429 430 batchHash[previousBatchNumber] = _prevBatchHash; 431 432 // Setting new block number and timestamp 433 BlockInfo memory newBlockInfo = BlockInfo({number: previousBatchNumber + 1, timestamp: _newTimestamp}); 434 435 currentBatchInfo = newBlockInfo; 436 437 baseFee = _baseFee; 438 439 // The correctness of this block hash: 440 SystemContractHelper.toL1(false, bytes32(uint256(SystemLogKey.PREV_BATCH_HASH_KEY)), _prevBatchHash); 441: } ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87-L89), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93-L95), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L439)
### [L‑10] Division by zero not prevented The divisions below take an input parameter or state variable which does not have any zero-value checks, which may lead to the functions reverting when zero is passed. *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 180 /// @return The price of L2 gas in ETH 181 function _deriveL2GasPrice(uint256 _l1GasPrice, uint256 _gasPricePerPubdata) internal pure returns (uint256) { 182 uint256 pubdataPriceETH = L1_GAS_PER_PUBDATA_BYTE * _l1GasPrice; 183: uint256 minL2GasPriceETH = (pubdataPriceETH + _gasPricePerPubdata - 1) / _gasPricePerPubdata; ``` *GitHub*: [180](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L178-L181) ### [L‑11] Empty `receive()`/`fallback()` function If the intention is for Ether sent by a caller to be used for an actual purpose (i.e. the function is not just a WETH `withdraw()` handler), the function should call another function (e.g. call `weth.deposit()` and use the token on the caller's behalf) or at least emit an event to track that funds were sent directly to it. *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 264: receive() external payable {} ``` *GitHub*: [264](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L262-L262) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 231 receive() external payable { 232 // If the contract is called directly, behave like an EOA 233: } ``` *GitHub*: [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L229-L231) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 14: fallback() external payable {} 16: receive() external payable {} ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L14-L14) ### [L‑12] External call recipient may consume all transaction gas There is no limit specified on the amount of gas used, so the recipient can use up all of the transaction's gas, causing it to revert. Use `addr.call{gas: }("")` or [this](https://github.com/nomad-xyz/ExcessivelySafeCall) library instead. *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit `_execute()` 228: (bool success, bytes memory returnData) = _calls[i].target.call{value: _calls[i].value}(_calls[i].data); ``` *GitHub*: [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L226-L226) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol /// @audit `bridgeBurn()` 83: (bool success, ) = msg.sender.call{value: _amount}(""); /// @audit `withdrawTo()` 108: (bool success, ) = _to.call{value: _amount}(""); ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L81-L81), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L106-L106) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit `()` 44: (bool success, ) = address(ETH_TOKEN_SYSTEM_CONTRACT).call( ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L42-L42) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol /// @audit `sendValue()` 68: (bool success, ) = recipient.call{value: amount}(""); /// @audit `functionCallWithValue()` 161: (bool success, bytes memory returndata) = target.call{value: value}( ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L66-L66), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L159-L159) ### [L‑13] External calls in an un-bounded `for-`loop may result in a DOS Consider limiting the number of iterations in `for-`loops that make external calls *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 228: (bool success, bytes memory returnData) = _calls[i].target.call{value: _calls[i].value}(_calls[i].data); ``` *GitHub*: [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L226-L226) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 256: this.forceDeployOnAddress{value: _deployments[i].value}(_deployments[i], msg.sender); ``` *GitHub*: [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L254-L254) ### [L‑14] File allows a version of solidity that is susceptible to an assembly optimizer bug In solidity versions 0.8.13 and 0.8.14, there is an [optimizer bug](https://github.com/ethereum/solidity-blog/blob/499ab8abc19391be7b7b34f88953a067029a5b45/_posts/2022-06-15-inline-assembly-memory-side-effects-bug.md) where, if the use of a variable is in a separate `assembly` block from the block in which it was stored, the `mstore` operation is optimized out, leading to uninitialized memory. The code currently does not have such a pattern of execution, but it does use `mstore`s in `assembly` blocks, so it is a risk for future changes. The affected solidity versions should be avoided if at all possible. *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 401 assembly { 402 mstore(add(hashedFactoryDeps, mul(add(i, 1), 32)), hashedBytecode) 403: } ``` *GitHub*: [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L399-L401) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 43 assembly { 44 mstore(0x00, _lhs) 45 mstore(0x20, _rhs) 46 result := keccak256(0x00, 0x40) 47: } ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L41-L45) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 18 assembly { 19 // In the first byte we write the encoded length as 0x80 + 0x14 == 0x94. 20 mstore(add(encoded, 0x20), 0x9400000000000000000000000000000000000000000000000000000000000000) 21 // Write address data without stripping zeros. 22 mstore(add(encoded, 0x21), shiftedVal) 23: } 41 assembly { 42 mstore(add(encoded, 0x21), shiftedVal) 43: } 76 assembly { 77 mstore(add(encoded, 0x21), shiftedVal) 78: } ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L16-L21), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L39-L41), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L74-L76) ### [L‑15] File allows a version of solidity that is susceptible to an assembly storage bug In solidity versions 0.8.13 through 0.8.16, there is a [bug](https://blog.soliditylang.org/2022/09/08/storage-write-removal-before-conditional-termination/) involving the use of the Yul functions `return()` and `stop()`. The affected solidity versions should be avoided if at all possible. *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 35 assembly { 36 // The pointer to the free memory slot 37 let ptr := mload(0x40) 38 // Copy function signature and arguments from calldata at zero position into memory at pointer position 39 calldatacopy(ptr, 0, calldatasize()) 40 // Delegatecall method of the implementation contract returns 0 on error 41 let result := delegatecall(gas(), facetAddress, ptr, calldatasize(), 0, 0) 42 // Get the size of the last return data 43 let size := returndatasize() 44 // Copy the size length of bytes from return data at zero position to pointer position 45 returndatacopy(ptr, 0, size) 46 // Depending on the result value 47 switch result 48 case 0 { 49 // End execution and revert state changes 50 revert(ptr, size) 51 } 52 default { 53 // Return data with length of size at pointers position 54 return(ptr, size) 55 } 56: } ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L33-L54) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 136 assembly { 137 // Copy function signature and arguments from calldata at zero position into memory at pointer position 138 calldatacopy(0, 0, calldatasize()) 139 // Call method of the zkSync contract returns 0 on error 140 let result := call(gas(), contractAddress, 0, 0, calldatasize(), 0, 0) 141 // Get the size of the last return data 142 let size := returndatasize() 143 // Copy the size length of bytes from return data at zero position to pointer position 144 returndatacopy(0, 0, size) 145 // Depending on the result value 146 switch result 147 case 0 { 148 // End execution and revert state changes 149 revert(0, size) 150 } 151 default { 152 // Return data with length of size at pointers position 153 return(0, size) 154 } 155: } ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L134-L153) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 33 assembly { 34 return(0, 0) 35: } 51 assembly { 52 return(0, 0) 53: } ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L31-L33), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L49-L51) ### [L‑16] Function called does not exist in the contract interface *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit safeApprove(address,uint256) 385: IERC20(token).safeApprove(paymaster, minAllowance); ``` *GitHub*: [385](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L383) ### [L‑17] Function doesn't perform any updates The function's purpose appears to be to change a configuration value, but no such change is made. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 191 function setValueForNextFarCall(uint128 _value) internal returns (bool success) { 192 uint256 cleanupMask = UINT128_MASK; 193 address callAddr = SET_CONTEXT_VALUE_CALL_ADDRESS; 194 assembly { 195 // Clearing input params as they are not cleaned by Solidity by default 196 _value := and(_value, cleanupMask) 197 success := call(0, callAddr, _value, 0, 0xFFFF, 0, 0) 198 } 199: } ``` *GitHub*: [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L189-L197) ### [L‑18] Initialization can be front-run The `initialize()` functions below are not called by another contract atomically after the contract is deployed, so it's possible for a malicious user to call `initialize()` which, if it's noticed in time, would require the project to re-deploy the contract in order to properly initialize. Consider creating a factory contract, which will `new` and `initialize()` each contract atomically. *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 85 function initialize( 86 bytes[] calldata _factoryDeps, 87 address _l2TokenBeacon, 88 address _governor, 89 uint256 _deployBridgeImplementationFee, 90 uint256 _deployBridgeProxyFee 91: ) external payable reentrancyGuardInitializer { ``` *GitHub*: [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L83-L89) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 83 function initialize( 84 bytes[] calldata _factoryDeps, 85 address _l2WethAddress, 86 address _governor, 87 uint256 _deployBridgeImplementationFee, 88 uint256 _deployBridgeProxyFee 89: ) external payable reentrancyGuardInitializer { ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L81-L87) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 57: function initialize(InitializeData calldata _initalizeData) external reentrancyGuardInitializer returns (bytes32) { ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L55-L55) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 42 function initialize( 43 address _l1Bridge, 44 bytes32 _l2TokenProxyBytecodeHash, 45 address _governor 46: ) external initializer { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L44) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 41: function initialize(string memory name_, string memory symbol_) external initializer { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L39-L39) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 47 function initialize( 48 address _l1Bridge, 49 address _l1WethAddress, 50 address _l2WethAddress 51: ) external initializer { ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L45-L49) ### [L‑19] Loss of precision Division by large numbers may result in the result being zero, due to solidity not supporting fractions. Consider requiring a minimum amount for the numerator to ensure that it is always larger than the denominator *There are 13 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 27: uint256 bytecodeLenInWords = _bytecode.length / 32; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L25) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 90: uint256 constant BATCH_OVERHEAD_PUBDATA = BATCH_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE; ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L88) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 183: uint256 minL2GasPriceETH = (pubdataPriceETH + _gasPricePerPubdata - 1) / _gasPricePerPubdata; ``` *GitHub*: [183](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L181) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 23: uint256 mapValue = _map.map[_index / 8]; 47: uint256 mapIndex = _index / 8; ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L21), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L45) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 35: _index /= 2; ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L33) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 34: require(l2GasForTxBody / _transaction.gasPerPubdataByteLimit <= PRIORITY_TX_MAX_PUBDATA, "uk"); 167: overheadForGas = (numerator - 1) / denominator; ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L32), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L165) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 61: return KECCAK_ROUND_GAS_COST * (_length / KECCAK_ROUND_NUMBER_OF_BYTES + 1); 72: return SHA256_ROUND_GAS_COST * ((_length + 8) / SHA256_ROUND_NUMBER_OF_BYTES + 1); 230: nodesOnCurrentLevel /= 2; ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L59), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L70), [230](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L228) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 175: deploymentNonce = _rawMinNonce / DEPLOY_NONCE_MULTIPLIER; ``` *GitHub*: [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L173) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 88: uint256 bytecodeLenInWords = _bytecode.length / 32; ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L86)
### [L‑20] Missing checks for `address(0x0)` in the constructor/initializer *There are 8 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 68: zkSync = _zkSync; 69: allowList = _allowList; ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L66-L66), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L67-L67) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 67: l1WethAddress = _l1WethAddress; 68: zkSync = _zkSync; 69: allowList = _allowList; ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L65-L65), [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L66-L66), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L67-L67) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 48: securityCouncil = _securityCouncil; ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L46-L46) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 48: zkSyncContract = _zkSyncContract; 50: validator = _validator; ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L46-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L48-L48) ### [L‑21] Missing checks for `address(0x0)` when updating `address` state variables *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 56: validator = _newValidator; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L54-L54) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 26: s.pendingGovernor = _newPendingGovernor; 50: s.pendingAdmin = _newPendingAdmin; ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L24-L24), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L48-L48) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 90: origin = _newOrigin; ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L88-L88) ### [L‑22] Missing contract-existence checks before low-level calls Low-level calls return success if there is no code present at the specified address. In addition to the zero-address checks, add a check to verify that `
.code.length > 0` *There are 9 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 243 (, bytes memory data1) = _token.staticcall(abi.encodeCall(IERC20Metadata.name, ())); 244 (, bytes memory data2) = _token.staticcall(abi.encodeCall(IERC20Metadata.symbol, ())); 245 (, bytes memory data3) = _token.staticcall(abi.encodeCall(IERC20Metadata.decimals, ())); 246 data = abi.encode(data1, data2, data3); 247: } 244 (, bytes memory data2) = _token.staticcall(abi.encodeCall(IERC20Metadata.symbol, ())); 245 (, bytes memory data3) = _token.staticcall(abi.encodeCall(IERC20Metadata.decimals, ())); 246 data = abi.encode(data1, data2, data3); 247: } 245 (, bytes memory data3) = _token.staticcall(abi.encodeCall(IERC20Metadata.decimals, ())); 246 data = abi.encode(data1, data2, data3); 247: } ``` *GitHub*: [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L241-L245), [244](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L242-L245), [245](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L243-L245) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 228 (bool success, bytes memory returnData) = _calls[i].target.call{value: _calls[i].value}(_calls[i].data); 229 if (!success) { 230 // Propage an error if the call fails. 231 assembly { 232 revert(add(returnData, 0x20), mload(returnData)) 233: } ``` *GitHub*: [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L226-L231) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 290 (bool success, bytes memory data) = _init.delegatecall(_calldata); 291 if (!success) { 292 // If the returndata is too small, we still want to produce some meaningful error 293 if (data.length <= 4) { 294 revert("I"); // delegatecall failed 295: } ``` *GitHub*: [290](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L288-L293) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 44 (bool success, ) = address(ETH_TOKEN_SYSTEM_CONTRACT).call( 45 abi.encodeCall(ETH_TOKEN_SYSTEM_CONTRACT.transferFromTo, (msg.sender, to, value)) 46 ); 47 48 // If the transfer of ETH fails, we do the most Ethereum-like behaviour in such situation: revert(0,0) 49: if (!success) { ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L42-L47) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 161 (bool success, bytes memory returndata) = target.call{value: value}( 162 data 163 ); 164 return 165 verifyCallResultFromTarget( 166: target, 203 (bool success, bytes memory returndata) = target.staticcall(data); 204 return 205 verifyCallResultFromTarget( 206 target, 207 success, 208: returndata, 242 (bool success, bytes memory returndata) = target.delegatecall(data); 243 return 244 verifyCallResultFromTarget( 245 target, 246 success, 247: returndata, ``` *GitHub*: [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L159-L164), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L201-L206), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L240-L245) ### [L‑23] Missing contract-existence checks before yul `call()` Low-level calls return success if there is no code present at the specified address. In addition to the zero-address checks, add a check to verify that `extcodesize()` is non-zero. *There are 12 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 136 assembly { 137 // Copy function signature and arguments from calldata at zero position into memory at pointer position 138 calldatacopy(0, 0, calldatasize()) 139 // Call method of the zkSync contract returns 0 on error 140 let result := call(gas(), contractAddress, 0, 0, calldatasize(), 0, 0) 141 // Get the size of the last return data 142 let size := returndatasize() 143 // Copy the size length of bytes from return data at zero position to pointer position 144 returndatacopy(0, 0, size) 145 // Depending on the result value 146 switch result 147 case 0 { 148 // End execution and revert state changes 149 revert(0, size) 150 } 151 default { 152 // Return data with length of size at pointers position 153 return(0, size) 154 } 155: } ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L134-L153) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 118 assembly { 119 callSuccess := call(gas(), _to, _amount, 0, 0, 0, 0) 120: } ``` *GitHub*: [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L116-L118) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 150 assembly { 151 success := call(msgValueSimulator, callAddr, _value, _address, 0xFFFF, forwardMask, 0) 152: } 137 assembly { 138 success := call(_address, callAddr, 0, 0, 0xFFFF, 0, 0) 139: } 205 assembly { 206 // Clearing values before usage in assembly, since Solidity 207 // doesn't do it by default 208 _whoToMimic := and(_whoToMimic, cleanupMask) 209 210 success := call(_address, callAddr, 0, 0, _whoToMimic, 0, 0) 211: } ``` *GitHub*: [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L148-L150), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L135-L137), [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L203-L209) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 79 assembly { 80 // Ensuring that the type is bool 81 _isService := and(_isService, 1) 82 // This `success` is always 0, but the method always succeeds 83 // (except for the cases when there is not enough gas) 84 let success := call(_isService, callAddr, _key, _value, 0xFFFF, 0, 0) 85: } 194 assembly { 195 // Clearing input params as they are not cleaned by Solidity by default 196 _value := and(_value, cleanupMask) 197 success := call(0, callAddr, _value, 0, 0xFFFF, 0, 0) 198: } 206 assembly { 207 pop(call(initializer, callAddr, value1, 0, 0xFFFF, 0, 0)) 208: } 216 assembly { 217 pop(call(value1, callAddr, value2, 0, 0xFFFF, 0, 0)) 218: } ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L77-L83), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L192-L196), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L204-L206), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L214-L216) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 111 assembly { 112 success := call(msgValueSimulator, callAddr, value, to, farCallAbi, forwardMask, 0) 113: } 102 assembly { 103 success := call(to, callAddr, 0, 0, farCallAbi, 0, 0) 104: } ``` *GitHub*: [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L109-L111), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L100-L102) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 401 assembly { 402 success := call(gas(), bootloaderAddr, amount, 0, 0, 0, 0) 403: } ``` *GitHub*: [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L399-L401) ### [L‑24] Multiplication on the result of a division Dividing an integer by another integer will often result in loss of precision. When the result is multiplied by another number, the loss of precision is magnified, often to material magnitudes. `(X / Z) * Y` should be re-written as `(X * Y) / Z` *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 61: return KECCAK_ROUND_GAS_COST * (_length / KECCAK_ROUND_NUMBER_OF_BYTES + 1); 72: return SHA256_ROUND_GAS_COST * ((_length + 8) / SHA256_ROUND_NUMBER_OF_BYTES + 1); ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L59-L59), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L70-L70) ### [L‑25] Numbers downcast to `address`es may result in collisions If a number is downcast to an `address` the upper bytes are truncated, which may mean that more than one value will map to the `address` *There are 16 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 73: return address(uint160(uint256(data))); ``` *GitHub*: [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L71-L71) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 94: address account = address(uint160(_input)); 122: address account = address(uint160(_input)); ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L92-L92), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 63: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 149: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 243: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L61-L61), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L147-L147), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L241-L241) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 108: newAddress = address(uint160(uint256(hash))); 124: newAddress = address(uint160(uint256(hash))); ``` *GitHub*: [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L106-L106), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L122-L122) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 136: address to = address(uint160(_transaction.to)); ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L134-L134) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 59: return balance[address(uint160(_account))]; ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L57-L57) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 34: to = address(uint160(addressAsUint)); ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L32-L32) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 166: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 234: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 305: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 377: address paymaster = address(uint160(_transaction.paymaster)); 408: if (address(uint160(_transaction.paymaster)) != address(0)) { ``` *GitHub*: [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L164-L164), [234](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L232-L232), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L303-L303), [377](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L375-L375), [408](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L406-L406)
### [L‑26] Reviews of the input files to `solpp` are not the same as reviews of its output Looking at what was [deployed](https://etherscan.io/address/0x7fb17101a744e156e63d5ff6a4775fb48756577c#code#F1#L4), there is an issue where the `SPDX-License-Identifier` is not the first line of the file, even though the audited file had as the first line. This is because of a [bug](https://github.com/merklejerk/solpp/issues/21) in the deprecated `solpp` tool in use by the project. Audits should be done of the `solpp` output, rather than its inputs, in case there are other lurking bugs. I've run this bot on the output of `solpp` rather than the original templated dot-sol files, which are not strictly Solidity files. *There are 94 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: Apache-2.0 ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/L2ContractAddresses.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: Apache-2.0 ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: UNLICENSED ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 1 pragma solidity ^0.8.13; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 1 pragma solidity ^0.8; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 1 pragma solidity ^0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 1 pragma solidity >=0.8.0; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 1 pragma solidity ^0.8.1; 2 3: // SPDX-License-Identifier: MIT ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L1-L1)
### [L‑27] Solidity version 0.8.20 may not work on other chains due to `PUSH0` The compiler for Solidity 0.8.20 switches the default target EVM version to [Shanghai](https://blog.soliditylang.org/2023/05/10/solidity-0.8.20-release-announcement/#important-note), which includes the new `PUSH0` op code. This op code may not yet be implemented on all L2s, so deployment on these chains will fail. To work around this issue, use an earlier [EVM](https://docs.soliditylang.org/en/v0.8.20/using-the-compiler.html?ref=zaryabs.com#setting-the-evm-version-to-target) [version](https://book.getfoundry.sh/reference/config/solidity-compiler#evm_version). While the project itself may or may not compile with 0.8.20, other projects with which it integrates, or which extend this project may, and those projects will have problems deploying these contracts/libraries. *There are 94 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/L2ContractAddresses.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 1: pragma solidity ^0.8; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 1: pragma solidity >=0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 1: pragma solidity ^0.8.1; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L1-L1)
### [L‑28] Some tokens may revert when large transfers are made Tokens such as COMP or UNI will revert when an address' balance reaches [`type(uint96).max`](https://github.com/compound-finance/compound-protocol/blob/a3214f67b73310d547e00fc578e8355911c9d376/contracts/Governance/Comp.sol#L238). Ensure that the calls below can be broken up into smaller batches if necessary. *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit claimFailedDeposit() 274 require(proofValid, "yn"); 275 276 uint256 amount = depositAmount[_depositSender][_l1Token][_l2TxHash]; 277 require(amount > 0, "y1"); 278 279 // Change the total deposited amount by the user 280 _verifyDepositLimit(_l1Token, _depositSender, amount, true); 281 282 delete depositAmount[_depositSender][_l1Token][_l2TxHash]; 283 // Withdraw funds 284: IERC20(_l1Token).safeTransfer(_depositSender, amount); /// @audit finalizeWithdrawal() 309 310 (address l1Receiver, address l1Token, uint256 amount) = _parseL2WithdrawalMessage(l2ToL1Message.data); 311 // Preventing the stack too deep error 312 { 313 bool success = zkSync.proveL2MessageInclusion(_l2BatchNumber, _l2MessageIndex, l2ToL1Message, _merkleProof); 314 require(success, "nq"); 315 } 316 317 isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex] = true; 318 // Withdraw funds 319: IERC20(l1Token).safeTransfer(l1Receiver, amount); ``` *GitHub*: [274](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L272-L282), [309](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L307-L317) ### [L‑29] State variables not capped at reasonable values Consider adding minimum/maximum value checks to ensure that the state variables below can never be used to excessively harm users, including via griefing *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 133: tokenDeposit[_l1Token].depositCap = _depositCap; ``` *GitHub*: [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L131-L131) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 62: executionDelay = _executionDelay; ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L60-L60) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 96: gasPrice = _gasPrice; 437: baseFee = _baseFee; ``` *GitHub*: [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L94-L94), [437](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L435-L435) ### [L‑30] Subtraction may underflow if multiplication is too large *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 254: number >>= (256 - (_calldataSlice.length * 8)); ``` *GitHub*: [254](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L252-L252) ### [L‑31] Unsafe downcast When a type is downcast to a smaller type, the higher order bits are truncated, effectively applying a modulo to the original value. Without any other checks, this wrapping will lead to unexpected behavior and bugs *There are 64 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol /// @audit uint160 -> uint256 73: return address(uint160(uint256(data))); ``` *GitHub*: [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L71) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit uint32 86: uint32 timestamp = uint32(block.timestamp); ``` *GitHub*: [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L84) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit uint160 158: key: bytes32(uint256(uint160(_message.sender))), /// @audit uint64 297: uint64 expirationTimestamp = uint64(block.timestamp + PRIORITY_EXPIRATION); // Safe to cast /// @audit uint160 338: from: uint256(uint160(_priorityOpParams.sender)), /// @audit uint160 339: to: uint256(uint160(_priorityOpParams.contractAddressL2)), /// @audit uint160 348: reserved: [_priorityOpParams.valueToMint, uint256(uint160(_priorityOpParams.refundRecipient)), 0, 0], ``` *GitHub*: [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L156), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L295), [338](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L336), [339](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L337), [348](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L346) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol /// @audit uint32 30: result = uint32(mapValue >> bitOffset); /// @audit uint32 58: uint32 oldValue = uint32(mapValue >> bitOffset); ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L28), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L56) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol /// @audit uint256 _input -> uint160 94: address account = address(uint160(_input)); /// @audit uint256 _input -> uint160 122: address account = address(uint160(_input)); ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L92), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L120) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol /// @audit uint160 63: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); /// @audit uint64 70: uint64 txDataLen = uint64(_transaction.data.length); /// @audit uint8 93: uint256 vInt = uint256(uint8(_transaction.signature[64])); /// @audit uint256 listLength -> uint64 118: encodedListLength = RLPEncoder.encodeListLen(uint64(listLength)); /// @audit uint160 149: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); /// @audit uint64 166: uint64 txDataLen = uint64(_transaction.data.length); /// @audit uint8 192: uint256 vInt = uint256(uint8(_transaction.signature[64])); /// @audit uint256 listLength -> uint64 209: encodedListLength = RLPEncoder.encodeListLen(uint64(listLength)); /// @audit uint160 243: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); /// @audit uint64 261: uint64 txDataLen = uint64(_transaction.data.length); /// @audit uint8 287: uint256 vInt = uint256(uint8(_transaction.signature[64])); /// @audit uint256 listLength -> uint64 304: encodedListLength = RLPEncoder.encodeListLen(uint64(listLength)); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L61), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L68), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L91), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L116), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L147), [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L164), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L190), [209](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L207), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L241), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L259), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L285), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L302) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit uint160 -> uint256 108: newAddress = address(uint160(uint256(hash))); /// @audit uint160 -> uint256 124: newAddress = address(uint160(uint256(hash))); /// @audit uint256 value -> uint128 344: SystemContractHelper.setValueForNextFarCall(uint128(value)); ``` *GitHub*: [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L106), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L122), [344](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L342) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit uint160 136: address to = address(uint160(_transaction.to)); ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L134) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit uint8 78: uint8 version = uint8(_bytecodeHash[0]); ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L76) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit uint160 135: key: bytes32(uint256(uint160(msg.sender))), ``` *GitHub*: [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L133) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit uint256 _account -> uint160 59: return balance[address(uint160(_account))]; ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L57) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit uint256 addressAsUint -> uint160 34: to = address(uint160(addressAsUint)); ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L32) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit uint160 70: uint256 addressAsKey = uint256(uint160(msg.sender)); /// @audit uint160 94: uint256 addressAsKey = uint256(uint160(msg.sender)); /// @audit uint160 105: uint256 addressAsKey = uint256(uint160(msg.sender)); /// @audit uint160 113: uint256 addressAsKey = uint256(uint160(msg.sender)); ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L68), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L92), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L103), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L111) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit uint128 _blockNumber -> uint32 207: return keccak256(abi.encodePacked(uint32(_blockNumber))); /// @audit uint128 221: bytes32 correctPrevBlockHash = _calculateLegacyL2BlockHash(uint128(_l2BlockNumber - 1)); /// @audit uint128 228: _setL2BlockHash(uint128(_l2BlockNumber - 1), correctPrevBlockHash); /// @audit uint256 _number -> uint128 /// @audit uint256 _newTimestamp -> uint128 450: BlockInfo memory newBlockInfo = BlockInfo({number: uint128(_number), timestamp: uint128(_newTimestamp)}); ``` *GitHub*: [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L205), [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L219), [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L226), [450](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L448), [450](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L448) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol /// @audit uint256 dataOffset -> uint32 261: SystemContractHelper.ptrAddIntoActive(uint32(dataOffset)); /// @audit uint32 263: uint32 shrinkTo = uint32(msg.data.length - (_data.length + dataOffset)); ``` *GitHub*: [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L259), [263](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L261) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol /// @audit uint8 /// @audit uint256 _val -> uint8 31: encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val)); /// @audit uint8 36: encoded[0] = bytes1(uint8(hbs + 0x81)); /// @audit uint8 66: encoded[0] = bytes1(uint8(_len + _offset)); /// @audit uint8 71: encoded[0] = bytes1(uint8(_offset + hbs + 56)); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L29), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L29), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L34), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L64), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L69) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit uint160 357: return uint160(_address) <= uint160(MAX_SYSTEM_CONTRACT_ADDRESS); ``` *GitHub*: [357](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L355) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol /// @audit uint32 85: uint32 dataLength = uint32(Utils.safeCastToU32(data.length)); ``` *GitHub*: [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L83) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit uint160 166: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); /// @audit uint64 173: uint64 txDataLen = uint64(_transaction.data.length); /// @audit uint256 listLength -> uint64 201: encodedListLength = RLPEncoder.encodeListLen(uint64(listLength)); /// @audit uint160 234: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); /// @audit uint64 251: uint64 txDataLen = uint64(_transaction.data.length); /// @audit uint256 listLength -> uint64 273: encodedListLength = RLPEncoder.encodeListLen(uint64(listLength)); /// @audit uint160 305: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); /// @audit uint64 323: uint64 txDataLen = uint64(_transaction.data.length); /// @audit uint256 listLength -> uint64 345: encodedListLength = RLPEncoder.encodeListLen(uint64(listLength)); /// @audit uint160 377: address paymaster = address(uint160(_transaction.paymaster)); /// @audit uint160 408: if (address(uint160(_transaction.paymaster)) != address(0)) { ``` *GitHub*: [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L164), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L171), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L199), [234](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L232), [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L249), [273](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L271), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L303), [323](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L321), [345](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L343), [377](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L375), [408](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L406) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol /// @audit uint256 _x -> uint128 25: return uint128(_x); /// @audit uint256 _x -> uint32 31: return uint32(_x); /// @audit uint256 _x -> uint24 37: return uint24(_x); /// @audit uint8 48: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L23), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L29), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L35), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L46)
### [L‑32] Upgradeable contract is missing a `__gap[50]` storage variable to allow for new storage variables in later versions See [this](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps) link for a description of this storage variable. While some contracts may not currently be sub-classed, adding the variable now protects against forgetting to add it in the future. *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 13: contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 23: contract L2Weth is ERC20PermitUpgradeable, IL2Weth, IL2StandardToken { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21) ### [L‑33] Use of `tx.origin` is unsafe in almost every context According to [Vitalik Buterin](https://ethereum.stackexchange.com/questions/196/how-do-i-make-my-dapp-serenity-proof), contracts should _not_ `assume that tx.origin will continue to be usable or meaningful`. An example of this is [EIP-3074](https://eips.ethereum.org/EIPS/eip-3074#allowing-txorigin-as-signer-1) which explicitly mentions the intention to change its semantics when it's used with new op codes. There have also been calls to [remove](https://github.com/ethereum/solidity/issues/683) `tx.origin`, and there are [security issues](solidity.readthedocs.io/en/v0.4.24/security-considerations.html#tx-origin) associated with using it for authorization. For these reasons, it's best to completely avoid the feature. *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 197 if (_refundRecipient == address(0)) { 198: refundRecipient = msg.sender != tx.origin ? AddressAliasHelper.applyL1ToL2Alias(msg.sender) : msg.sender; ``` *GitHub*: [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L195-L196) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 184 if (_refundRecipient == address(0)) { 185: refundRecipient = msg.sender != tx.origin ? AddressAliasHelper.applyL1ToL2Alias(msg.sender) : msg.sender; ``` *GitHub*: [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L182-L183) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 249 address sender = msg.sender; 250: if (sender != tx.origin) { ``` *GitHub*: [249](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L247-L248) ### [L‑34] Use of a single-step ownership transfer The existing `transferOwnership` function immediately transfers ownership to the new addres. Consider implementing a two-step variant, where the 'acceptor' of the ownership must call a separate function in order for the transfer to take effect. This can help to prevent mistakes where the wrong address is used, and ownership is irrecoverably lost. *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 33 constructor(address _initialOwner) { 34 _transferOwnership(_initialOwner); 35: } ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L31-L33) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 43 constructor(address _admin, address _securityCouncil, uint256 _minDelay) { 44 require(_admin != address(0), "Admin should be non zero address"); 45 46 _transferOwnership(_admin); 47 48 securityCouncil = _securityCouncil; 49 emit ChangeSecurityCouncil(address(0), _securityCouncil); 50 51 minDelay = _minDelay; 52 emit ChangeMinDelay(0, _minDelay); 53: } ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L41-L51) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 46 constructor(address _initialOwner, address _zkSyncContract, uint32 _executionDelay, address _validator) { 47 _transferOwnership(_initialOwner); 48 zkSyncContract = _zkSyncContract; 49 executionDelay = _executionDelay; 50 validator = _validator; 51: } ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44-L49) ## Non-critical Issues ### [N‑01] `2** - 1` should be re-written as `type(uint).max` Earlier versions of solidity can use `uint(-1)` instead. Expressions not including the `- 1` can often be re-written to accomodate the change (e.g. by using a `>` rather than a `>=`, which will also save some gas) *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 28: require(bytecodeLenInWords < 2**16, "pp"); // bytecode length must be less than 2^16 words ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L26) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 64: require(dictionary.length <= 2 ** 16 * 8, "Dictionary is too big"); ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L62) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 75: uint256 constant MAX_MSG_VALUE = 2 ** 128 - 1; ``` *GitHub*: [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L73) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 30: uint256 constant DEPLOY_NONCE_MULTIPLIER = 2 ** 128; 33: uint256 constant MAXIMAL_MIN_NONCE_INCREMENT = 2 ** 32; ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L28), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L31) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 89: require(bytecodeLenInWords < 2 ** 16, "pp"); // bytecode length must be less than 2^16 words ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L87) ### [N‑02] `address`es shouldn't be hard-coded It is often better to declare `address`es as `immutable`, and assign them via constructor arguments. This allows the code to remain the same across deployments on different networks, and avoids recompilation when addresses need to change. *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 24: uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L22-L22) ### [N‑03] `constant`s should be defined rather than using magic numbers Even [assembly](https://github.com/code-423n4/2022-05-opensea-seaport/blob/9d7ce4d08bf3c3010304a0476a785c70c0e90ae7/contracts/lib/TokenTransferrer.sol#L35-L39) can benefit from using readable constants instead of hex/numeric literals *There are 174 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 95: require(_factoryDeps.length == 3, "mk"); 331: require(_l2ToL1message.length == 76, "kk"); ``` *GitHub*: [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L93-L93), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L329-L329) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 281: require(_message.length == 96, "Incorrect ETH message with additional data length"); ``` *GitHub*: [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L279-L279) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 25: require(_bytecode.length % 32 == 0, "pq"); 27: uint256 bytecodeLenInWords = _bytecode.length / 32; 28: require(bytecodeLenInWords < 2**16, "pp"); // bytecode length must be less than 2^16 words 30: hashedBytecode = sha256(_bytecode) & 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; 32: hashedBytecode = (hashedBytecode | bytes32(uint256(1 << 248))); 34: hashedBytecode = hashedBytecode | bytes32(bytecodeLenInWords << 224); 52: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L23-L23), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L25-L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L28-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L30-L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L32-L32), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L50-L50), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 89: assert(L2_TO_L1_LOG_SERIALIZE_SIZE != 2 * 32); ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L87-L87) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 27: require(msg.data.length >= 4 || msg.data.length == 0, "Ut"); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 83: uint256[7] __DEPRECATED_diamondCutStorage; ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L81-L81) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 82: uint256 batchTimestamp = _packedBatchAndL2BlockTimestamp >> 128; 171: require(processedLogs == 255, "b8"); 169: require(processedLogs == 127, "b7"); ``` *GitHub*: [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L80-L80), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L169-L169), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L167-L167) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 423: require(_message.length >= 56, "pm"); ``` *GitHub*: [423](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L421-L421) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 56: uint256[4] reserved; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L54-L54) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 293: if (data.length <= 4) { 304: require(data.length == 32, "lp"); ``` *GitHub*: [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L291-L291), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L302-L302) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 23: uint256 mapValue = _map.map[_index / 8]; 27: uint256 bitOffset = (_index & 7) * 32; 47: uint256 mapIndex = _index / 8; 52: uint256 bitOffset = (_index & 7) * 32; ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L21-L21), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L25-L25), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L25-L25), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L45-L45), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L50-L50), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 27: require(pathLength < 256, "bt"); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 59: require(_transaction.reserved[3] == 0, "uo"); 85: costForComputation += Math.ceilDiv(_encodingLength * L1_TX_DELTA_544_ENCODING_BYTES, 544); ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L57-L57), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L83-L83) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 48: emit Initialize(name_, symbol_, 18); ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 104: if (codeHash == 0x00 && NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(account) > 0) { 135: codeHash != 0x00 && ``` *GitHub*: [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L102-L102), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L133-L133) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 74: } else if (_transaction.data[0] >= 0x80) { 83: uint256 rInt = uint256(bytes32(_transaction.signature[0:32])); 88: uint256 sInt = uint256(bytes32(_transaction.signature[32:64])); 93: uint256 vInt = uint256(uint8(_transaction.signature[64])); 94: require(vInt == 27 || vInt == 28, "Invalid v value"); 99: vInt += 8 + block.chainid * 2; 170: } else if (_transaction.data[0] >= 0x80) { 182: uint256 rInt = uint256(bytes32(_transaction.signature[0:32])); 187: uint256 sInt = uint256(bytes32(_transaction.signature[32:64])); 192: uint256 vInt = uint256(uint8(_transaction.signature[64])); 193: require(vInt == 27 || vInt == 28, "Invalid v value"); 195: vEncoded = RLPEncoder.encodeUint256(vInt - 27); 265: } else if (_transaction.data[0] >= 0x80) { 277: uint256 rInt = uint256(bytes32(_transaction.signature[0:32])); 282: uint256 sInt = uint256(bytes32(_transaction.signature[32:64])); 287: uint256 vInt = uint256(uint8(_transaction.signature[64])); 288: require(vInt == 27 || vInt == 28, "Invalid v value"); 290: vEncoded = RLPEncoder.encodeUint256(vInt - 27); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L72-L72), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L81-L81), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L86-L86), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L86-L86), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L91-L91), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L92-L92), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L92-L92), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L97-L97), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L168-L168), [182](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L180-L180), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L185-L185), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L185-L185), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L190-L190), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191-L191), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191-L191), [195](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L193-L193), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L263-L263), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L275-L275), [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L280-L280), [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L280-L280), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L285-L285), [288](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L286-L286), [288](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L286-L286), [290](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L288-L288) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 63: require(dictionary.length % 8 == 0, "Dictionary length should be a multiple of 8"); 64: require(dictionary.length <= 2 ** 16 * 8, "Dictionary is too big"); 66: encodedData.length * 4 == _bytecode.length, 71: uint256 indexOfEncodedChunk = uint256(encodedData.readUint16(encodedDataPointer)) * 8; 75: uint64 realChunk = _bytecode.readUint64(encodedDataPointer * 4); 138: uint64 enumIndex = stateDiff.readUint64(84); 146: bytes32 derivedKey = stateDiff.readBytes32(52); 147: uint256 initValue = stateDiff.readUint256(92); 148: uint256 finalValue = stateDiff.readUint256(124); 150: stateDiffPtr += 32; 155: uint8 len = operation == 0 ? 32 : metadata >> LENGTH_BITS_OFFSET; 170: uint64 enumIndex = stateDiff.readUint64(84); 175: uint256 initValue = stateDiff.readUint256(92); 176: uint256 finalValue = stateDiff.readUint256(124); 184: uint8 len = operation == 0 ? 32 : metadata >> LENGTH_BITS_OFFSET; 210: dictionary = _rawCompressedData[2:2 + dictionaryLen * 8]; 211: encodedData = _rawCompressedData[2 + dictionaryLen * 8:]; 236: if (_operation == 0 || _operation == 3) { 254: number >>= (256 - (_calldataSlice.length * 8)); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L61-L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L62-L62), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L62-L62), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L64-L64), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L69-L69), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L73-L73), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L136-L136), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L144-L144), [147](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L145-L145), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L146-L146), [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L148-L148), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L153-L153), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L168-L168), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L173-L173), [176](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L174-L174), [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L182-L182), [210](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L208-L208), [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L209-L209), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L234-L234), [254](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L252-L252), [254](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L252-L252) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 266: require(_bytecodeHash != bytes32(0x0), "BytecodeHash cannot be zero"); 271: ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getCodeHash(uint256(uint160(_newAddress))) == 0x0, 275: require(NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(_newAddress) == 0x00, "Account is occupied"); ``` *GitHub*: [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L264-L264), [271](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L269-L269), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L273-L273) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 143: if (to == address(DEPLOYER_SYSTEM_CONTRACT) && data.length >= 4) { 144: bytes4 selector = bytes4(data[:4]); 164: require(_signature.length == 65, "Signature length is incorrect"); 177: require(v == 27 || v == 28, "v is neither 27 nor 28"); 188: require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "Invalid s"); ``` *GitHub*: [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L141-L141), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L142-L142), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L162-L162), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175-L175), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175-L175), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L186-L186) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 72: return SHA256_ROUND_GAS_COST * ((_length + 8) / SHA256_ROUND_NUMBER_OF_BYTES + 1); 95: uint256 gasToPay = keccakGasCost(L2_TO_L1_LOG_SERIALIZE_SIZE) + 3 * keccakGasCost(64); 148: pubdataLen = 4 + _message.length + L2_TO_L1_LOG_SERIALIZE_SIZE; 158: 4 * 159: keccakGasCost(64) + 181: pubdataLen = 4 + bytecodeLen; 185: uint256 gasToPay = pubdataLen * gasPerPubdataBytes + sha256GasCost(bytecodeLen) + keccakGasCost(64); 207: uint32 numberOfL2ToL1Logs = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 209: calldataPtr += 4; 240: uint32 numberOfMessages = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 241: calldataPtr += 4; 244: uint32 currentMessageLength = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 245: calldataPtr += 4; 258: uint32 numberOfBytecodes = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 259: calldataPtr += 4; 263: bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4]) 265: calldataPtr += 4; 293: uint24 compressedStateDiffSize = uint24(bytes3(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 3])); 294: calldataPtr += 3; 307: uint32 numberOfStateDiffs = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 308: calldataPtr += 4; ``` *GitHub*: [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L70-L70), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L93-L93), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L93-L93), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L146-L146), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L156-L156), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L157-L157), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L179-L179), [185](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L183-L183), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L205-L205), [209](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L207-L207), [240](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L238-L238), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L239-L239), [244](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L242-L242), [245](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L243-L243), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L256-L256), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L257-L257), [263](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L261-L261), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L263-L263), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L291-L291), [294](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L292-L292), [307](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L305-L305), [308](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L306-L306) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 46: uint256 public difficulty = 2500000000000000; 117: if (blockNumber <= _block || blockNumber - _block > 256) { 390: uint256 packedTimestamps = (uint256(currentBatchTimestamp) << 128) | currentL2BlockTimestamp; 472: blockInfo = (uint256(blockNumber) << 128) | uint256(blockTimestamp); ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L44-L44), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L115-L115), [390](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L388-L388), [472](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L470-L470) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 40: require(returnData.length == 32, "keccak256 returned invalid data"); 49: require(returnData.length == 32, "sha returned invalid data"); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L38-L38), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L47-L47) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 15: encoded = new bytes(0x15); 28: if (_val < 128) { 36: encoded[0] = bytes1(uint8(hbs + 0x81)); 38: uint256 lbs = 31 - hbs; 39: uint256 shiftedVal = _val << (lbs * 8); 31: encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val)); 53: return _encodeLength(_len, 0x80); 59: return _encodeLength(_len, 0xc0); 64: if (_len < 56) { 71: encoded[0] = bytes1(uint8(_offset + hbs + 56)); 73: uint256 lbs = 31 - hbs; 74: uint256 shiftedVal = uint256(_len) << (lbs * 8); 89: _number >>= 128; 90: hbs += 16; 93: _number >>= 64; 94: hbs += 8; 97: _number >>= 32; 98: hbs += 4; 101: _number >>= 16; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L13-L13), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L26-L26), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L36-L36), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L37-L37), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L29-L29), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L51-L51), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L57-L57), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L62-L62), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L69-L69), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L71-L71), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L72-L72), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L87-L87), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L88-L88), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L91-L91), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L92-L92), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L95-L95), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L96-L96), [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L99-L99) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 161: rawParams |= uint256(_inputMemoryLength) << 32; 162: rawParams |= uint256(_outputMemoryOffset) << 64; 163: rawParams |= uint256(_outputMemoryLength) << 96; 164: rawParams |= uint256(_perPrecompileInterpreted) << 192; 239: uint256 shifted = (meta << (256 - size - offset)); 241: result = (shifted >> (256 - size)); 249: gasPerPubdataByte = uint32(extractNumberFromMeta(meta, META_GAS_PER_PUBDATA_BYTE_OFFSET, 32)); 259: heapSize = uint32(extractNumberFromMeta(meta, META_HEAP_SIZE_OFFSET, 32)); 268: auxHeapSize = uint32(extractNumberFromMeta(meta, META_AUX_HEAP_SIZE_OFFSET, 32)); 276: shardId = uint8(extractNumberFromMeta(meta, META_SHARD_ID_OFFSET, 8)); 285: callerShardId = uint8(extractNumberFromMeta(meta, META_CALLER_SHARD_ID_OFFSET, 8)); 294: codeShardId = uint8(extractNumberFromMeta(meta, META_CODE_SHARD_ID_OFFSET, 8)); ``` *GitHub*: [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L159-L159), [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L160-L160), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L161-L161), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L162-L162), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L237-L237), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L239-L239), [249](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L247-L247), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L257-L257), [268](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L266-L266), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L274-L274), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L283-L283), [294](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L292-L292) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 237: farCallAbi |= (uint256(memoryPage) << 32); 238: farCallAbi |= (uint256(dataStart) << 64); 239: farCallAbi |= (uint256(dataLength) << 96); 259: farCallAbiWithEmptyFatPtr |= (uint256(gasPassed) << 192); 260: farCallAbiWithEmptyFatPtr |= (uint256(forwardingMode) << 224); 261: farCallAbiWithEmptyFatPtr |= (uint256(shardId) << 232); 263: farCallAbiWithEmptyFatPtr |= (1 << 240); 266: farCallAbiWithEmptyFatPtr |= (1 << 248); ``` *GitHub*: [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L235-L235), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L236-L236), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L237-L237), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L257-L257), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L258-L258), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L259-L259), [263](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L261-L261), [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L264-L264) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 59: uint256[4] reserved; 177: } else if (_transaction.data[0] >= 0x80) { 255: } else if (_transaction.data[0] >= 0x80) { 327: } else if (_transaction.data[0] >= 0x80) { 365: require(_transaction.paymasterInput.length >= 4, "The standard paymaster input must be at least 4 bytes long"); 367: bytes4 paymasterInputSelector = bytes4(_transaction.paymasterInput[0:4]); 370: _transaction.paymasterInput.length >= 68, 376: (address token, uint256 minAllowance) = abi.decode(_transaction.paymasterInput[4:68], (address, uint256)); ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L57-L57), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L175-L175), [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L253-L253), [327](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L325-L325), [365](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L363-L363), [367](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L365-L365), [370](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L368-L368), [376](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L374-L374), [376](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L374-L374) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 42: codeLength = bytecodeLenInWords(_bytecodeHash) << 5; // _bytecodeHash * 32 48: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); 54: return _bytecodeHash[1] == 0x00; 59: return _bytecodeHash[1] == 0x01; 86: require(_bytecode.length % 32 == 0, "po"); 88: uint256 bytecodeLenInWords = _bytecode.length / 32; 89: require(bytecodeLenInWords < 2 ** 16, "pp"); // bytecode length must be less than 2^16 words 93: 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; 95: hashedBytecode = (hashedBytecode | bytes32(uint256(1 << 248))); 97: hashedBytecode = hashedBytecode | bytes32(bytecodeLenInWords << 224); ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L40-L40), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L46-L46), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L46-L46), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L52-L52), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L57-L57), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L84-L84), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L86-L86), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L87-L87), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L91-L91), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L93-L93), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L95-L95)
### [N‑04] `else`-block not required One level of nesting can be removed by not having an `else` block when the `if`-block returns, and `if (foo) { return 1; } else { return 2; }` becomes `if (foo) { return 1; } return 2;`. A following `else if` can become `if` *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 109 if (timestamp == 0) { 110 return OperationState.Unset; 111 } else if (timestamp == EXECUTED_PROPOSAL_TIMESTAMP) { 112 return OperationState.Done; 113 } else if (timestamp > block.timestamp) { 114 return OperationState.Waiting; 115 } else { 116 return OperationState.Ready; 117: } ``` *GitHub*: [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L107-L115) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 287 if (success) { 288 return returndata; 289 } else { 290 _revert(returndata, errorMessage); 291: } ``` *GitHub*: [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L285-L289) ### [N‑05] `if`-statement can be converted to a ternary The code can be made more compact while also increasing readability by converting the following `if`-statements to ternaries (e.g. `foo += (x > y) ? a : b`) *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 104 if (_isValidSignature(txHash, _transaction.signature)) { 105 magic = ACCOUNT_VALIDATION_SUCCESS_MAGIC; 106 } else { 107 magic = bytes4(0); 108: } ``` *GitHub*: [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L102-L106) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 123 } else if ( 124 _block >= currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block && 125 currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block > 0 126 ) { 127 hash = _getLatest257L2blockHash(_block); 128 } else { 129 // Important: we do not want this number to ever collide with the L2 block hash (either new or old one) and so 130 // that's why the legacy L2 blocks' hashes are keccak256(abi.encodePacked(uint32(_block))), while these are equivalent to 131 // keccak256(abi.encodePacked(_block)) 132 hash = keccak256(abi.encode(_block)); 133: } ``` *GitHub*: [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L121-L131) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 408 if (address(uint160(_transaction.paymaster)) != address(0)) { 409 // Paymaster pays for the fee 410 requiredBalance = _transaction.value; 411 } else { 412 // The user should have enough balance for both the fee and the value of the transaction 413 requiredBalance = _transaction.maxFeePerGas * _transaction.gasLimit + _transaction.value; 414: } ``` *GitHub*: [408](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L406-L412) ### [N‑06] `internal` functions not called by the contract should be removed All unused code should be removed *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 410: function _maxU256(uint256 a, uint256 b) internal pure returns (uint256) { ``` *GitHub*: [410](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L408-L408) ### [N‑07] `public` functions not called by the contract should be declared `external` instead Contracts [are allowed](https://docs.soliditylang.org/en/latest/contracts.html#function-overriding) to override their parents' functions and change the visibility from `external` to `public`. *There are 18 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 355: function l2TokenAddress(address _l1Token) public view returns (address) { ``` *GitHub*: [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L353) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L302) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 69: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public virtual returns (bytes32) { ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L67) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 84 function proveL1ToL2TransactionStatus( 85 bytes32 _l2TxHash, 86 uint256 _l2BatchNumber, 87 uint256 _l2MessageIndex, 88 uint16 _l2TxNumberInBatch, 89 bytes32[] calldata _merkleProof, 90 TxStatus _status 91: ) public view override returns (bool) { 168 function l2TransactionBaseCost( 169 uint256 _gasPrice, 170 uint256 _l2GasLimit, 171 uint256 _l2GasPerPubdataByteLimit 172: ) public pure returns (uint256) { ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L82-L89), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L166-L170) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 125: function name() public view override returns (string memory) { 131: function symbol() public view override returns (string memory) { 137: function decimals() public view override returns (uint8) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L123), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 112: function l1TokenAddress(address _l2Token) public view override returns (address l1Token) { 117: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L110), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L115) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 42: function extendedAccountVersion(address _address) public view returns (AccountAbstractionVersion) { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L40) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 59: function getRawNonce(address _address) public view returns (uint256) { 67: function increaseMinNonce(uint256 _value) public onlySystemCall returns (uint256 oldMinNonce) { 84: function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 104: function getValueUnderNonce(uint256 _key) public view returns (uint256) { ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L57), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L65), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L102) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 163: function getBlockNumber() public view returns (uint128) { 171: function getBlockTimestamp() public view returns (uint128) { ``` *GitHub*: [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L161), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L169)
### [N‑08] `pure` function accesses storage While the compiler currently flags functions like these as being `pure`, this is a [bug](https://github.com/ethereum/solidity/issues/11573) which will be fixed in a future version, so it's best to not use `pure` visibility, in order to not break when this bug is fixed. *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 88 function getDiamondStorage() internal pure returns (DiamondStorage storage diamondStorage) { 89 bytes32 position = DIAMOND_STORAGE_POSITION; 90 assembly { 91 diamondStorage.slot := position 92 } 93: } ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L86-L91) ### [N‑09] `require()`/`revert()` statements should have descriptive reason strings *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 127: if (availableGetters.ignoreName) revert(); 133: if (availableGetters.ignoreSymbol) revert(); 139: if (availableGetters.ignoreDecimals) revert(); ``` *GitHub*: [127](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L125-L125), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L131-L131), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L137-L137) ### [N‑10] Add inline comments for unnamed variables `function foo(address x, address)` -> `function foo(address x, address /* y */)` *There are 12 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 333: (uint32 functionSignature, uint256 offset) = UnsafeBytes.readUint32(_l2ToL1message, 0); 334 require(bytes4(functionSignature) == this.finalizeWithdrawal.selector, "nt"); 335 336: (l1Receiver, offset) = UnsafeBytes.readAddress(_l2ToL1message, offset); ``` *GitHub*: [333](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L331), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L332-L334) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 283: (uint32 functionSignature, uint256 offset) = UnsafeBytes.readUint32(_message, 0); 285 bytes4(functionSignature) == IMailbox.finalizeEthWithdrawal.selector, 286 "Incorrect ETH message function selector" 287 ); 288 289 address l1EthReceiver; 290: (l1EthReceiver, offset) = UnsafeBytes.readAddress(_message, offset); ``` *GitHub*: [283](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L281), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L283-L288) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 38 // Copy function signature and arguments from calldata at zero position into memory at pointer position 39: calldatacopy(ptr, 0, calldatasize()) ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L36-L37) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 137 // Copy function signature and arguments from calldata at zero position into memory at pointer position 138: calldatacopy(0, 0, calldatasize()) ``` *GitHub*: [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L135-L136) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 425: (uint32 functionSignature, uint256 offset) = UnsafeBytes.readUint32(_message, 0); 426 require(bytes4(functionSignature) == this.finalizeEthWithdrawal.selector, "is"); 427 428: (l1Receiver, offset) = UnsafeBytes.readAddress(_message, offset); ``` *GitHub*: [425](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L423), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L424-L426) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 32 // If function was called outside of the bootloader, behave like an EOA. 33 assembly { 34: return(0, 0) 50 // If the function was delegate called, behave like an EOA. 51 assembly { 52: return(0, 0) 145 // Check that called function is the deployment method, 146 // the others deployer method is not supposed to be called from the default account. 147 isSystemCall = 148 selector == DEPLOYER_SYSTEM_CONTRACT.create.selector || 149 selector == DEPLOYER_SYSTEM_CONTRACT.create2.selector || 150 selector == DEPLOYER_SYSTEM_CONTRACT.createAccount.selector || 151 selector == DEPLOYER_SYSTEM_CONTRACT.create2Account.selector; 152 } 153: bool success = EfficientCall.rawCall(gas, to, value, data, isSystemCall); ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L30-L32), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L48-L50), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L143-L151) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 117: return functionCallWithValue(target, data, 0, errorMessage); ``` *GitHub*: [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L115)
### [N‑11] Adding a `return` statement when the function defines a named return variable, is redundant Once the return variable has been assigned (or has its default value), there is no need to explicitly return it at the end of the function, since it's returned automatically. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 131: return deploymentNonce; ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L129-L129) ### [N‑12] Array indices should be referenced via `enum`s rather than via numeric literals *There are 39 instances of this issue:*
see instances ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 287: uint256 vInt = uint256(uint8(_transaction.signature[64])); ``` *GitHub*: [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L285-L285) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 241: s.l2SystemContractsUpgradeBatchNumber = _newBatchesData[0].batchNumber; ``` *GitHub*: [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L239-L239) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 57: require(_transaction.reserved[1] <= type(uint160).max, "uf"); ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L55-L55) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 93: uint256 vInt = uint256(uint8(_transaction.signature[64])); 265: } else if (_transaction.data[0] >= 0x80) { ``` *GitHub*: [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L91-L91), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L263-L263) ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 102: bytes32 l2BridgeProxyBytecodeHash = L2ContractHelper.hashL2Bytecode(_factoryDeps[1]); ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L100-L100) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 43: require(version == 1 && _bytecodeHash[1] == bytes1(0), "zf"); // Incorrectly formatted bytecodeHash ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L41-L41) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 56: require(_transaction.reserved[0] == 0, "ue"); ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L54-L54) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 192: uint256 vInt = uint256(uint8(_transaction.signature[64])); ``` *GitHub*: [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L190-L190) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 78: uint8 version = uint8(_bytecodeHash[0]); ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L76-L76) ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 101: bytes32 l2BridgeImplementationBytecodeHash = L2ContractHelper.hashL2Bytecode(_factoryDeps[0]); ``` *GitHub*: [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L99-L99) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 100: bytes32 l2WethBridgeImplementationBytecodeHash = L2ContractHelper.hashL2Bytecode(_factoryDeps[0]); ``` *GitHub*: [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L98-L98) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 42: uint8 version = uint8(_bytecodeHash[0]); 52: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L40-L40), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 144: bytes4 selector0 = ds.facetToSelectors[_facet].selectors[0]; ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L142-L142) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 58: require(_transaction.reserved[2] == 0, "ug"); ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L56-L56) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 98: if (_transaction.reserved[0] != 0) { ``` *GitHub*: [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L96-L96) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 52: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 221: bytes4 selector0 = ds.facetToSelectors[_facet].selectors[0]; ``` *GitHub*: [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L219-L219) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 59: require(_transaction.reserved[3] == 0, "uo"); ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L57-L57) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 170: } else if (_transaction.data[0] >= 0x80) { ``` *GitHub*: [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L168-L168) ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 98: l2TokenProxyBytecodeHash = L2ContractHelper.hashL2Bytecode(_factoryDeps[2]); ``` *GitHub*: [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L96-L96) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 101: bytes32 l2WethBridgeProxyBytecodeHash = L2ContractHelper.hashL2Bytecode(_factoryDeps[1]); ``` *GitHub*: [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L99-L99) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 79: s.storedBatchHashes[0] = keccak256(abi.encode(storedBatchZero)); ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L77-L77) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 74: } else if (_transaction.data[0] >= 0x80) { ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L72-L72) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 79: require(version == 1 && _bytecodeHash[1] == bytes1(0), "Incorrectly formatted bytecodeHash"); ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L77-L77) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 237: bytes32 l2ToL1LogsTreeRoot = l2ToL1LogsTreeArray[0]; ``` *GitHub*: [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L235-L235) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 36: encoded[0] = bytes1(uint8(hbs + 0x81)); 31: encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val)); 71: encoded[0] = bytes1(uint8(_offset + hbs + 56)); 66: encoded[0] = bytes1(uint8(_len + _offset)); ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L34-L34), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L29-L29), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L69-L69), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L64-L64) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 177: } else if (_transaction.data[0] >= 0x80) { 186: if (_transaction.reserved[0] != 0) { 255: } else if (_transaction.data[0] >= 0x80) { 327: } else if (_transaction.data[0] >= 0x80) { ``` *GitHub*: [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L175-L175), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L184-L184), [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L253-L253), [327](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L325-L325) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 48: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); 54: return _bytecodeHash[1] == 0x00; 59: return _bytecodeHash[1] == 0x01; ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L46-L46), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L46-L46), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L52-L52), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L57-L57)
### [N‑13] Assembly block creates dirty bits Writing data to the free memory pointer without later updating the free memory pointer will cause there to be dirty bits at that memory location. Not updating the free memory pointer will make it [harder](https://docs.soliditylang.org/en/latest/ir-breaking-changes.html#cleanup) for the optimizer to reason about whether the memory needs to be cleaned, which may lead to worse optimizations. Annotate the block with `assembly ("memory-safe") { ... }` if the memory's value can be discarded. If the memory needs to be saved, update the free memory pointer in addtion to using the annotation. See [this](https://docs.soliditylang.org/en/latest/assembly.html#memory-safety) link for other cases where the annotation can be used *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 34 35 assembly { 36 // The pointer to the free memory slot 37 let ptr := mload(0x40) 38 // Copy function signature and arguments from calldata at zero position into memory at pointer position 39 calldatacopy(ptr, 0, calldatasize()) 40 // Delegatecall method of the implementation contract returns 0 on error 41 let result := delegatecall(gas(), facetAddress, ptr, calldatasize(), 0, 0) 42 // Get the size of the last return data 43 let size := returndatasize() 44 // Copy the size length of bytes from return data at zero position to pointer position 45 returndatacopy(ptr, 0, size) 46 // Depending on the result value 47 switch result 48 case 0 { 49 // End execution and revert state changes 50 revert(ptr, size) 51 } 52 default { 53 // Return data with length of size at pointers position 54 return(ptr, size) 55 } 56: } ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L32-L54) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 171 // for v we load 32 bytes ending with v (the first 31 come from s) then apply a mask 172 assembly { 173 r := mload(add(_signature, 0x20)) 174 s := mload(add(_signature, 0x40)) 175 v := and(mload(add(_signature, 0x41)), 0xff) 176: } ``` *GitHub*: [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L169-L174) ### [N‑14] Assembly blocks should have extensive comments Assembly blocks take a lot more time to audit than normal Solidity code, and often have gotchas and side-effects that the Solidity versions of the same code do not. Consider adding more comments explaining what is being done in every step of the assembly code, and describe why assembly is being used instead of Solidity. *There are 55 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 54 assembly { 55 lockSlotOldValue := sload(LOCK_FLAG_ADDRESS) 56 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 57: } 72 assembly { 73 _status := sload(LOCK_FLAG_ADDRESS) 74: } 80 assembly { 81 sstore(LOCK_FLAG_ADDRESS, _ENTERED) 82: } 88 assembly { 89 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 90: } ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L52-L55), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L70-L72), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L78-L80), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L86-L88) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 22 assembly { 23 offset := add(_start, 4) 24 result := mload(add(_bytes, offset)) 25: } 29 assembly { 30 offset := add(_start, 20) 31 result := mload(add(_bytes, offset)) 32: } 36 assembly { 37 offset := add(_start, 32) 38 result := mload(add(_bytes, offset)) 39: } 43 assembly { 44 offset := add(_start, 32) 45 result := mload(add(_bytes, offset)) 46: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L20-L23), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L27-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L34-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L41-L44) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 231 assembly { 232 revert(add(returnData, 0x20), mload(returnData)) 233: } ``` *GitHub*: [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L229-L231) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 118 assembly { 119 callSuccess := call(gas(), _to, _amount, 0, 0, 0, 0) 120: } 401 assembly { 402 mstore(add(hashedFactoryDeps, mul(add(i, 1), 32)), hashedBytecode) 403: } ``` *GitHub*: [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L116-L118), [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L399-L401) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 90 assembly { 91 diamondStorage.slot := position 92: } 297 assembly { 298 revert(add(data, 0x20), mload(data)) 299: } ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L88-L90), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L295-L297) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 43 assembly { 44 mstore(0x00, _lhs) 45 mstore(0x20, _rhs) 46 result := keccak256(0x00, 0x40) 47: } ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L41-L45) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 72 assembly { 73 sstore(addressAsKey, _hash) 74: } 83 assembly { 84 codeHash := sload(addressAsKey) 85: } ``` *GitHub*: [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L70-L72), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L81-L83) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 28 assembly { 29 if iszero(success) { 30 revert(add(returnData, 0x20), mload(returnData)) 31 } 32: } ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L26-L30) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 33 assembly { 34 return(0, 0) 35: } 51 assembly { 52 return(0, 0) 53: } 172 assembly { 173 r := mload(add(_signature, 0x20)) 174 s := mload(add(_signature, 0x40)) 175 v := and(mload(add(_signature, 0x41)), 0xff) 176: } ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L31-L33), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L49-L51), [172](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L170-L174) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 58 assembly { 59 sstore(_bytecodeHash, 1) 60: } 69 assembly { 70 marker := sload(_hash) 71: } ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L56-L58), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L67-L69) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 50 assembly { 51 revert(0, 0) 52: } ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L48-L50) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 137 assembly { 138 success := call(_address, callAddr, 0, 0, 0xFFFF, 0, 0) 139: } 150 assembly { 151 success := call(msgValueSimulator, callAddr, _value, _address, 0xFFFF, forwardMask, 0) 152: } 165 assembly { 166 success := staticcall(_address, callAddr, 0, 0xFFFF, 0, 0) 167: } 179 assembly { 180 success := delegatecall(_address, callAddr, 0, 0xFFFF, 0, 0) 181: } 220 assembly { 221 size := returndatasize() 222: } 225 assembly { 226 returndatacopy(add(returnData, 0x20), 0, size) 227: } 235 assembly { 236 let size := returndatasize() 237 returndatacopy(0, 0, size) 238 revert(0, size) 239: } 256 assembly { 257 dataOffset := _data.offset 258: } ``` *GitHub*: [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L135-L137), [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L148-L150), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L163-L165), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L177-L179), [220](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L218-L220), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L223-L225), [235](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L233-L237), [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L254-L256) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 41 assembly { 42 mstore(add(encoded, 0x21), shiftedVal) 43: } 76 assembly { 77 mstore(add(encoded, 0x21), shiftedVal) 78: } ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L39-L41), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L74-L76) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 94 assembly { 95 addr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 96: } 105 assembly { 106 pop(staticcall(0, callAddr, 0, 0xFFFF, 0, 0)) 107: } 116 assembly { 117 pop(staticcall(_farCallAbi, callAddr, 0, 0xFFFF, 0, 0)) 118: } 206 assembly { 207 pop(call(initializer, callAddr, value1, 0, 0xFFFF, 0, 0)) 208: } 216 assembly { 217 pop(call(value1, callAddr, value2, 0, 0xFFFF, 0, 0)) 218: } 227 assembly { 228 meta := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 229: } 316 assembly { 317 callFlags := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 318: } 327 assembly { 328 ptr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 329: } 340 assembly { 341 extraAbiData := staticcall(index, callAddr, 0, 0xFFFF, 0, 0) 342: } ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L92-L94), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L103-L105), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L114-L116), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L204-L206), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L214-L216), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L225-L227), [316](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L314-L316), [327](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L325-L327), [340](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L338-L340) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 82 assembly { 83 dataStart := add(data, 0x20) 84: } 102 assembly { 103 success := call(to, callAddr, 0, 0, farCallAbi, 0, 0) 104: } 111 assembly { 112 success := call(msgValueSimulator, callAddr, value, to, farCallAbi, forwardMask, 0) 113: } 134 assembly { 135 size := returndatasize() 136: } 139 assembly { 140 returndatacopy(add(returnData, 0x20), 0, size) 141: } 162 assembly { 163 let size := mload(returnData) 164 revert(add(returnData, 0x20), size) 165: } ``` *GitHub*: [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L80-L82), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L100-L102), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L109-L111), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L132-L134), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L137-L139), [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L160-L163) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 401 assembly { 402 success := call(gas(), bootloaderAddr, amount, 0, 0, 0, 0) 403: } ``` *GitHub*: [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L399-L401) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 22 assembly { 23 let offset := sub(_bytes.offset, 30) 24 result := calldataload(add(offset, _start)) 25: } 29 assembly { 30 let offset := sub(_bytes.offset, 28) 31 result := calldataload(add(offset, _start)) 32: } 36 assembly { 37 let offset := sub(_bytes.offset, 24) 38 result := calldataload(add(offset, _start)) 39: } 43 assembly { 44 result := calldataload(add(_bytes.offset, _start)) 45: } 49 assembly { 50 result := calldataload(add(_bytes.offset, _start)) 51: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L20-L23), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L27-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L34-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L41-L43), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L47-L49) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 302 assembly { 303 let returndata_size := mload(returndata) 304 revert(add(32, returndata), returndata_size) 305: } ``` *GitHub*: [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L300-L303)
### [N‑15] Avoid the use of sensitive terms Use [alternative variants](https://www.zdnet.com/article/mysql-drops-master-slave-and-blacklist-whitelist-terminology/), e.g. allowlist/denylist instead of whitelist/blacklist *There are 56 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 344: paymaster: uint256(0), 352: paymasterInput: new bytes(0), ``` *GitHub*: [344](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L342), [352](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L350) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 45: uint256 paymaster; 60: bytes paymasterInput; 45: uint256 paymaster; 60: bytes paymasterInput; 28: /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 35: /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L43), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L58), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L43), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L58), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L33), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L33) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 216 function prepareForPaymaster( 217 bytes32, // _txHash 218 bytes32, // _suggestedSignedHash 219 Transaction calldata _transaction 220: ) external payable ignoreNonBootloader ignoreInDelegateCall { 210: /// paid for by a paymaster. 216: function prepareForPaymaster( ``` *GitHub*: [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L214-L218), [210](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L208), [210](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L208), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L214) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 44 function prepareForPaymaster( 45 bytes32 _txHash, 46 bytes32 _possibleSignedHash, 47: Transaction calldata _transaction ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L42-L45) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 14: bytes4 constant PAYMASTER_VALIDATION_SUCCESS_MAGIC = IPaymaster.validateAndPayForPaymasterTransaction.selector; 30 function validateAndPayForPaymasterTransaction( 31 bytes32 _txHash, 32 bytes32 _suggestedSignedHash, 33 Transaction calldata _transaction 34: ) external payable returns (bytes4 magic, bytes memory context); 17: /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 23: /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24: /// if the paymaster agrees to pay for the transaction. 30: function validateAndPayForPaymasterTransaction( 39: /// @param _context, the context of the execution, returned by the "validateAndPayForPaymasterTransaction" method. 42: /// @param _maxRefundedGas, the upper bound on the amout of gas that could be refunded to the paymaster. ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L12), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L28-L32), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L15), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L21), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L21), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L22), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L22), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L28), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L37), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L37), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L40) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 10: * different types of paymaster flows. ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L8) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 377: address paymaster = address(uint160(_transaction.paymaster)); 69: bytes paymasterInput; 367: bytes4 paymasterInputSelector = bytes4(_transaction.paymasterInput[0:4]); 46: uint256 paymaster; 69: bytes paymasterInput; 364: function processPaymasterInput(Transaction calldata _transaction) internal { 367: bytes4 paymasterInputSelector = bytes4(_transaction.paymasterInput[0:4]); 368: if (paymasterInputSelector == IPaymasterFlow.approvalBased.selector) { 377: address paymaster = address(uint160(_transaction.paymaster)); 379: uint256 currentAllowance = IERC20(token).allowance(address(this), paymaster); 384: IERC20(token).safeApprove(paymaster, 0); 385: IERC20(token).safeApprove(paymaster, minAllowance); 387: } else if (paymasterInputSelector == IPaymasterFlow.general.selector) { 45: // The transaction's paymaster. If there is no paymaster, it is equal to 0. 46: uint256 paymaster; 68: // The input to the paymaster. 69: bytes paymasterInput; 361: /// @notice Processes the common paymaster flows, e.g. setting proper allowance 363: /// the "Paymaster flows" section in the documentation. 364: function processPaymasterInput(Transaction calldata _transaction) internal { 375: // the data is needed only for the paymaster, so we ignore it here for the sake of optimization 376: (address token, uint256 minAllowance) = abi.decode(_transaction.paymasterInput[4:68], (address, uint256)); 388: // Do nothing. general(bytes) paymaster flow means that the paymaster must interpret these bytes on his own. 409: // Paymaster pays for the fee ``` *GitHub*: [377](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L375), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L67), [367](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L365), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L44), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L67), [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L362), [367](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L365), [368](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L366), [368](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L366), [377](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L375), [379](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L377), [384](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L382), [385](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L383), [387](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L385), [387](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L385), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L43), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L44), [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L66), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L67), [361](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L359), [363](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L361), [363](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L361), [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L362), [375](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L373), [375](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L373), [376](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L374), [388](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L386), [409](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L407)
### [N‑16] Cast to `bytes` or `bytes32` for clearer semantic meaning Using a [cast](https://ethereum.stackexchange.com/questions/30912/how-to-compare-strings-in-solidity#answer-82739) on a single argument, rather than `abi.encodePacked()` makes the intended operation more clear, leading to less reviewer confusion. *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 77: bytes memory wethMessage = abi.encodePacked(_l1Receiver); ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L75-L75) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 207: return keccak256(abi.encodePacked(uint32(_blockNumber))); ``` *GitHub*: [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L205-L205) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 135: keccak256(abi.encodePacked(_transaction.factoryDeps)), ``` *GitHub*: [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L133-L133) ### [N‑17] Common functions should be refactored to a common base contract The functions below have the same implementation as is seen in other files. The functions should be refactored into functions of a common base contract *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit seen in /var/tmp/2023-10-zksync/code/contracts/ethereum/cache/solpp-generated-contracts/bridge/L1WethBridge.sol 117 function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { 118 l2Token = _l1Token == l1WethAddress ? l2WethAddress : address(0); 119: } ``` *GitHub*: [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L115-L117) ### [N‑18] Complex casting Consider whether the number of casts is really necessary, or whether using a different type would be more appropriate. Alternatively, add comments to explain in detail why the casts are necessary, and any implicit reasons why the cast does not introduce an overflow. *There are 69 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 31 // Setting the version of the hash 32: hashedBytecode = (hashedBytecode | bytes32(uint256(1 << 248))); 51 function _bytecodeLen(bytes32 _bytecodeHash) private pure returns (uint256 codeLengthInWords) { 52: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); 72 73: return address(uint160(uint256(data))); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L29-L30), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L49-L50), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L49-L50), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L70-L71) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 117 // verifier is upgraded. 118: if (_newVerifier == IVerifier(address(0))) { 236 function _setAllowList(IAllowList _newAllowList) internal { 237: if (_newAllowList == IAllowList(address(0))) { ``` *GitHub*: [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L115-L116), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L234-L235) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 107 key: _l2TxHash, 108: value: bytes32(uint256(_status)) ``` *GitHub*: [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L105-L106) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 53 l2TokenProxyBytecodeHash = _l2TokenProxyBytecodeHash; 54: address l2StandardToken = address(new L2StandardERC20{salt: bytes32(0)}()); ``` *GitHub*: [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L51-L52) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 93 // according to the spec "If EXTCODEHASH of A is X, then EXTCODEHASH of A + 2**160 is X". 94: address account = address(uint160(_input)); 121 // according to the spec "If EXTCODESIZE of A is X, then EXTCODESIZE of A + 2**160 is X". 122: address account = address(uint160(_input)); ``` *GitHub*: [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L91-L92), [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L119-L120) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 62 63: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 82 { 83: uint256 rInt = uint256(bytes32(_transaction.signature[0:32])); 87 { 88: uint256 sInt = uint256(bytes32(_transaction.signature[32:64])); 92 { 93: uint256 vInt = uint256(uint8(_transaction.signature[64])); 148 bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit); 149: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 181 { 182: uint256 rInt = uint256(bytes32(_transaction.signature[0:32])); 186 { 187: uint256 sInt = uint256(bytes32(_transaction.signature[32:64])); 191 { 192: uint256 vInt = uint256(uint8(_transaction.signature[64])); 242 bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit); 243: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 276 { 277: uint256 rInt = uint256(bytes32(_transaction.signature[0:32])); 281 { 282: uint256 sInt = uint256(bytes32(_transaction.signature[32:64])); 286 { 287: uint256 vInt = uint256(uint8(_transaction.signature[64])); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L60-L61), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L80-L81), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L85-L86), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L90-L91), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L146-L147), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L179-L180), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L184-L185), [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L189-L190), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L240-L241), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L274-L275), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L279-L280), [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L284-L285) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 151 152: uint8 metadata = uint8(bytes1(_compressedStateDiffs[stateDiffPtr])); 180 181: uint8 metadata = uint8(bytes1(_compressedStateDiffs[stateDiffPtr])); 252 function _sliceToUint256(bytes calldata _calldataSlice) internal pure returns (uint256 number) { 253: number = uint256(bytes32(_calldataSlice)); ``` *GitHub*: [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L149-L150), [180](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L178-L179), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L250-L251) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 38 39: address payable constant BOOTLOADER_FORMAL_ADDRESS = payable(address(SYSTEM_CONTRACTS_OFFSET + 0x01)); 39 address payable constant BOOTLOADER_FORMAL_ADDRESS = payable(address(SYSTEM_CONTRACTS_OFFSET + 0x01)); 40 IAccountCodeStorage constant ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT = IAccountCodeStorage( 41 address(SYSTEM_CONTRACTS_OFFSET + 0x02) 42: ); 42 ); 43: INonceHolder constant NONCE_HOLDER_SYSTEM_CONTRACT = INonceHolder(address(SYSTEM_CONTRACTS_OFFSET + 0x03)); 43 INonceHolder constant NONCE_HOLDER_SYSTEM_CONTRACT = INonceHolder(address(SYSTEM_CONTRACTS_OFFSET + 0x03)); 44: IKnownCodesStorage constant KNOWN_CODE_STORAGE_CONTRACT = IKnownCodesStorage(address(SYSTEM_CONTRACTS_OFFSET + 0x04)); 44 IKnownCodesStorage constant KNOWN_CODE_STORAGE_CONTRACT = IKnownCodesStorage(address(SYSTEM_CONTRACTS_OFFSET + 0x04)); 45 IImmutableSimulator constant IMMUTABLE_SIMULATOR_SYSTEM_CONTRACT = IImmutableSimulator( 46 address(SYSTEM_CONTRACTS_OFFSET + 0x05) 47: ); 47 ); 48: IContractDeployer constant DEPLOYER_SYSTEM_CONTRACT = IContractDeployer(address(SYSTEM_CONTRACTS_OFFSET + 0x06)); 52 address constant FORCE_DEPLOYER = address(SYSTEM_CONTRACTS_OFFSET + 0x07); 53: IL1Messenger constant L1_MESSENGER_CONTRACT = IL1Messenger(address(SYSTEM_CONTRACTS_OFFSET + 0x08)); 55 56: IEthToken constant ETH_TOKEN_SYSTEM_CONTRACT = IEthToken(address(SYSTEM_CONTRACTS_OFFSET + 0x0a)); 59 60: ISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(payable(address(SYSTEM_CONTRACTS_OFFSET + 0x0b))); 61 62: IBootloaderUtilities constant BOOTLOADER_UTILITIES = IBootloaderUtilities(address(SYSTEM_CONTRACTS_OFFSET + 0x0c)); 65 66: ICompressor constant COMPRESSOR_CONTRACT = ICompressor(address(SYSTEM_CONTRACTS_OFFSET + 0x0e)); 67 68: IComplexUpgrader constant COMPLEX_UPGRADER_CONTRACT = IComplexUpgrader(address(SYSTEM_CONTRACTS_OFFSET + 0x0f)); ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L36-L37), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L37-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L40-L41), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L41-L42), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L42-L45), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L45-L46), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L50-L51), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L53-L54), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L57-L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L59-L60), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L63-L64), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L65-L66) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 107 108: newAddress = address(uint160(uint256(hash))); 123 124: newAddress = address(uint160(uint256(hash))); ``` *GitHub*: [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L105-L106), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L121-L122) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 135 function _execute(Transaction calldata _transaction) internal { 136: address to = address(uint160(_transaction.to)); ``` *GitHub*: [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L133-L134) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 206 /// Check logs 207: uint32 numberOfL2ToL1Logs = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 239 /// Check messages 240: uint32 numberOfMessages = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 243 for (uint256 i = 0; i < numberOfMessages; ++i) { 244: uint32 currentMessageLength = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 257 /// Check bytecodes 258: uint32 numberOfBytecodes = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 261 for (uint256 i = 0; i < numberOfBytecodes; ++i) { 262 uint32 currentBytecodeLength = uint32( 263 bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4]) 264: ); 286 require( 287: uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) == 292 293: uint24 compressedStateDiffSize = uint24(bytes3(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 3])); 295 296: uint8 enumerationIndexSize = uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr])); 306 307: uint32 numberOfStateDiffs = uint32(bytes4(_totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + 4])); 324 /// Native (VM) L2 to L1 log 325: SystemContractHelper.toL1(true, bytes32(uint256(SystemLogKey.L2_TO_L1_LOGS_TREE_ROOT_KEY)), l2ToL1LogsTreeRoot); 327 true, 328: bytes32(uint256(SystemLogKey.TOTAL_L2_TO_L1_PUBDATA_KEY)), 330 ); 331: SystemContractHelper.toL1(true, bytes32(uint256(SystemLogKey.STATE_DIFF_HASH_KEY)), stateDiffHash); ``` *GitHub*: [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L204-L205), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L237-L238), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L241-L242), [257](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L255-L256), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L259-L262), [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L284-L285), [292](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L290-L291), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L293-L294), [306](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L304-L305), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L322-L323), [327](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L325-L326), [330](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L328-L329) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 58 function balanceOf(uint256 _account) external view override returns (uint256) { 59: return balance[address(uint160(_account))]; ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L56-L57) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 33 34: to = address(uint160(addressAsUint)); ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L31-L32) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 393 false, 394: bytes32(uint256(SystemLogKey.PACKED_BATCH_AND_L2_BLOCK_TIMESTAMP_KEY)), 439 // The correctness of this block hash: 440: SystemContractHelper.toL1(false, bytes32(uint256(SystemLogKey.PREV_BATCH_HASH_KEY)), _prevBatchHash); ``` *GitHub*: [393](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L391-L392), [439](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L437-L438) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 35 encoded = new bytes(hbs + 2); 36: encoded[0] = bytes1(uint8(hbs + 0x81)); 30 // Handle zero as a non-value, since stripping zeroes results in an empty byte array 31: encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val)); 70 encoded = new bytes(hbs + 2); 71: encoded[0] = bytes1(uint8(_offset + hbs + 56)); 65 encoded = new bytes(1); 66: encoded[0] = bytes1(uint8(_len + _offset)); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L33-L34), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L28-L29), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L28-L29), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L68-L69), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L63-L64) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 165 166: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 233 bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit); 234: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 304 bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit); 305: bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to))); 376 (address token, uint256 minAllowance) = abi.decode(_transaction.paymasterInput[4:68], (address, uint256)); 377: address paymaster = address(uint160(_transaction.paymaster)); 407 function totalRequiredBalance(Transaction calldata _transaction) internal pure returns (uint256 requiredBalance) { 408: if (address(uint160(_transaction.paymaster)) != address(0)) { ``` *GitHub*: [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L163-L164), [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L231-L232), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L302-L303), [376](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L374-L375), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L405-L406) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 47 unchecked { 48: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); 94 // Setting the version of the hash 95: hashedBytecode = (hashedBytecode | bytes32(uint256(1 << 248))); ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L45-L46), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L45-L46), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L92-L93)
### [N‑19] Consider adding a block/deny-list Doing so will significantly increase centralization, but will help to prevent hackers from using stolen tokens *There are 5 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 22 contract L2ERC20Bridge is IL2Bridge, Initializable { 23: /// @dev The address of the L1 bridge counterpart. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L20-L21) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 13 contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { 14 /// @dev Describes whether there is a specific getter in the token. 15 /// @notice Used to explicitly separate which getters the token has and which it does not. 16 /// @notice Different tokens in L1 can implement or not implement getter function as `name`/`symbol`/`decimals`, 17: /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method. ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11-L15) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 23 contract L2Weth is ERC20PermitUpgradeable, IL2Weth, IL2StandardToken { 24: /// @dev Address of the L2 WETH Bridge. ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21-L22) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 18: contract BootloaderUtilities is IBootloaderUtilities { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 21: contract DefaultAccount is IAccount { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L19-L19) ### [N‑20] Consider adding emergency-stop functionality Adding a way to quickly halt protocol functionality in an emergency, rather than having to pause individual contracts one-by-one, will make in-progress hack mitigation faster and much less stressful. *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 20: contract AllowList is IAllowList, Ownable2Step { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 22 contract Governance is IGovernance, Ownable2Step { 23: /// @notice A constant representing the timestamp for completed operations. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L20-L21) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 22: contract ValidatorTimelock is IExecutor, Ownable2Step { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L20-L20) ### [N‑21] Consider adding formal verification proofs Consider using formal verification to mathematically prove that your code does what is intended, and does not have any edge cases with unexpected behavior. The solidity compiler itself has this functionality [built in](https://docs.soliditylang.org/en/latest/smtchecker.html#smtchecker-and-formal-verification) *There is one instance of this issue:* ```solidity File: Various Files ``` ### [N‑22] Consider bounding input array length The functions below take in an unbounded array, and make function calls for entries in the array. While the function will revert if it eventually runs out of gas, it may be a nicer user experience to `require()` that the length of the array is below some reasonable maximum, so that the user doesn't have to use up a full transaction's gas only to see that the transaction reverts. *There are 18 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 64 for (uint256 i = 0; i < targetsLength; i = i.uncheckedInc()) { 65 _setAccessMode(_targets[i], _accessModes[i]); 66: } 98 for (uint256 i = 0; i < callersLength; i = i.uncheckedInc()) { 99 _setPermissionToCall(_callers[i], _targets[i], _functionSigs[i], _enables[i]); 100: } ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L62-L64), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L96-L98) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 227 for (uint256 i = 0; i < _calls.length; ++i) { 228 (bool success, bytes memory returnData) = _calls[i].target.call{value: _calls[i].value}(_calls[i].data); 229 if (!success) { 230 // Propage an error if the call fails. 231 assembly { 232 revert(add(returnData, 0x20), mload(returnData)) 233 } 234 } 235: } ``` *GitHub*: [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L225-L233) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 206 for (uint256 i = 0; i < _factoryDeps.length; ++i) { 207 require( 208 L2ContractHelper.hashL2Bytecode(_factoryDeps[i]) == bytes32(_expectedHashes[i]), 209 "Wrong factory dep hash" 210 ); 211: } ``` *GitHub*: [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L204-L209) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 87 for (uint256 i = 0; i < _newBatchesData.length; ++i) { 88 committedBatchTimestamp.set(_newBatchesData[i].batchNumber, timestamp); 89: } 118 for (uint256 i = 0; i < _newBatchesData.length; ++i) { 119 uint256 commitBatchTimestamp = committedBatchTimestamp.get(_newBatchesData[i].batchNumber); 120 121 // Note: if the `commitBatchTimestamp` is zero, that means either: 122 // * The batch was committed, but not through this contract. 123 // * The batch wasn't committed at all, so execution will fail in the zkSync contract. 124 // We allow executing such batches. 125 require(block.timestamp >= commitBatchTimestamp + delay, "5c"); // The delay is not passed 126: } ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L85-L87), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L116-L124) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 211 for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 212 _lastCommittedBatchData = _commitOneBatch(_lastCommittedBatchData, _newBatchesData[i], bytes32(0)); 213 214 s.storedBatchHashes[_lastCommittedBatchData.batchNumber] = _hashStoredBatchInfo(_lastCommittedBatchData); 215 emit BlockCommit( 216 _lastCommittedBatchData.batchNumber, 217 _lastCommittedBatchData.batchHash, 218 _lastCommittedBatchData.commitment 219 ); 220: } 243 for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 244 // The upgrade transaction must only be included in the first batch. 245 bytes32 expectedUpgradeTxHash = i == 0 ? _systemContractUpgradeTxHash : bytes32(0); 246 _lastCommittedBatchData = _commitOneBatch( 247 _lastCommittedBatchData, 248 _newBatchesData[i], 249 expectedUpgradeTxHash 250 ); 251 252 s.storedBatchHashes[_lastCommittedBatchData.batchNumber] = _hashStoredBatchInfo(_lastCommittedBatchData); 253 emit BlockCommit( 254 _lastCommittedBatchData.batchNumber, 255 _lastCommittedBatchData.batchHash, 256 _lastCommittedBatchData.commitment 257 ); 258: } 295 for (uint256 i = 0; i < nBatches; i = i.uncheckedInc()) { 296 _executeOneBatch(_batchesData[i], i); 297 emit BlockExecution(_batchesData[i].batchNumber, _batchesData[i].batchHash, _batchesData[i].commitment); 298: } 332 for (uint256 i = 0; i < committedBatchesLength; i = i.uncheckedInc()) { 333 currentTotalBatchesVerified = currentTotalBatchesVerified.uncheckedInc(); 334 require( 335 _hashStoredBatchInfo(_committedBatches[i]) == s.storedBatchHashes[currentTotalBatchesVerified], 336 "o1" 337 ); 338 339 bytes32 currentBatchCommitment = _committedBatches[i].commitment; 340 proofPublicInput[i] = _getBatchProofPublicInput( 341 prevBatchCommitment, 342 currentBatchCommitment, 343 verifierParams 344 ); 345 346 prevBatchCommitment = currentBatchCommitment; 347: } ``` *GitHub*: [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L209-L218), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L241-L256), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L293-L296), [332](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L330-L345) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 397 for (uint256 i = 0; i < factoryDepsLen; i = i.uncheckedInc()) { 398 bytes32 hashedBytecode = L2ContractHelper.hashL2Bytecode(_factoryDeps[i]); 399 400 // Store the resulting hash sequentially in bytes. 401 assembly { 402 mstore(add(hashedFactoryDeps, mul(add(i, 1), 32)), hashedBytecode) 403 } 404: } ``` *GitHub*: [397](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L395-L402) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 140 for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 141 bytes4 selector = _selectors[i]; 142 SelectorToFacet memory oldFacet = ds.selectorToFacet[selector]; 143 require(oldFacet.facetAddress == address(0), "J"); // facet for this selector already exists 144 145 _addOneFunction(_facet, selector, _isFacetFreezable); 146: } 161 for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 162 bytes4 selector = _selectors[i]; 163 SelectorToFacet memory oldFacet = ds.selectorToFacet[selector]; 164 require(oldFacet.facetAddress != address(0), "L"); // it is impossible to replace the facet with zero address 165 166 _removeOneFunction(oldFacet.facetAddress, selector); 167 // Add facet to the list of facets if the facet address is a new one 168 _saveFacetIfNew(_facet); 169 _addOneFunction(_facet, selector, _isFacetFreezable); 170: } 181 for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 182 bytes4 selector = _selectors[i]; 183 SelectorToFacet memory oldFacet = ds.selectorToFacet[selector]; 184 require(oldFacet.facetAddress != address(0), "a2"); // Can't delete a non-existent facet 185 186 _removeOneFunction(oldFacet.facetAddress, selector); 187: } ``` *GitHub*: [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L138-L144), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L159-L168), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L179-L185) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 31 for (uint256 i; i < pathLength; i = i.uncheckedInc()) { 32 currentHash = (_index % 2 == 0) 33 ? _efficientHash(currentHash, _path[i]) 34 : _efficientHash(_path[i], currentHash); 35 _index /= 2; 36: } ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L29-L34) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 255 for (uint256 i = 0; i < deploymentsLength; ++i) { 256 this.forceDeployOnAddress{value: _deployments[i].value}(_deployments[i], msg.sender); 257: } ``` *GitHub*: [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L253-L255) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 40 for (uint256 i = 0; i < immutablesLength; ++i) { 41 uint256 index = _immutables[i].index; 42 bytes32 value = _immutables[i].value; 43 immutableDataStorage[uint256(uint160(_dest))][index] = value; 44: } ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L38-L42) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 33 for (uint256 i = 0; i < hashesLen; ++i) { 34 _markBytecodeAsPublished(_hashes[i], _shouldSendToL1); 35: } ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L31-L33)
### [N‑23] Consider disallowing transfers to `address(this)` *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 65 function withdraw( 66 address _l1Receiver, 67 address _l2Token, 68 uint256 _amount 69: ) external override { ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L63-L67) ### [N‑24] Consider implementing EIP-5267 to securely describe EIP-712 domains being used [EIP-5267](https://eips.ethereum.org/EIPS/eip-5267) is a standard which allows for the retrieval and description of EIP-712 hash domains. This allows external tools to allow users to not just view the struct fields being signed, but the fields the domain the signature contains as well. This is especially useful when a project may exist on multiple chains and or in multiple contracts, and allows users/tools to verify that the signature is for the right fork, chain, version, contract, etc. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 84: bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId)"); ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L82-L82) ### [N‑25] Consider moving `msg.sender` checks to a common authorization `modifier` *There are 13 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 313: require(msg.sender == l1WethAddress || msg.sender == address(zkSync), "pn"); ``` *GitHub*: [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L311-L311) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 33: require(msg.sender == pendingGovernor, "n4"); // Only proposed by current governor address can claim the governor rights 57: require(msg.sender == pendingAdmin, "n4"); // Only proposed by current admin address can claim the admin rights ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L31-L31), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L55-L55) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 73: require(AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, "mq"); ``` *GitHub*: [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L71-L71) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 97 require( 98 AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, 99 "Only L1 WETH bridge can call this function" 100: ); 122: require(msg.sender == l2WethAddress, "pd"); ``` *GitHub*: [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L95-L98), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 24: require(msg.sender == FORCE_DEPLOYER, "Can only be called by FORCE_DEPLOYER"); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 241 require( 242 msg.sender == FORCE_DEPLOYER || msg.sender == address(COMPLEX_UPGRADER_CONTRACT), 243 "Can only be called by FORCE_DEPLOYER or COMPLEX_UPGRADER_CONTRACT" 244: ); ``` *GitHub*: [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L239-L242) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 226: assert(msg.sender != BOOTLOADER_FORMAL_ADDRESS); ``` *GitHub*: [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L224-L224) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 37: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L35-L35) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 35 require( 36 msg.sender == MSG_VALUE_SYSTEM_CONTRACT || 37 msg.sender == address(DEPLOYER_SYSTEM_CONTRACT) || 38 msg.sender == BOOTLOADER_FORMAL_ADDRESS, 39 "Only system contracts with special access can call this method" 40: ); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L33-L38) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 91: require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 138: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), ""); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L89-L89), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L136-L136)
### [N‑26] Consider splitting long calculations The longer a string of operations is, the harder it is to understand it. Consider splitting the full calculation into more steps, with more descriptive temporary variable names, and add extensive comments. *There are 5 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 107 uint256 listLength = encodedNonce.length + 108 encodedGasParam.length + 109 encodedTo.length + 110 encodedValue.length + 111 encodedDataLength.length + 112 _transaction.data.length + 113 rEncoded.length + 114 sEncoded.length + 115: vEncoded.length; 200 uint256 listLength = encodedFixedLengthParams.length + 201 encodedDataLength.length + 202 _transaction.data.length + 203 encodedAccessListLength.length + 204 rEncoded.length + 205 sEncoded.length + 206: vEncoded.length; 295 uint256 listLength = encodedFixedLengthParams.length + 296 encodedDataLength.length + 297 _transaction.data.length + 298 encodedAccessListLength.length + 299 rEncoded.length + 300 sEncoded.length + 301: vEncoded.length; ``` *GitHub*: [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L105-L113), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L198-L204), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L293-L299) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 155 uint256 gasToPay = pubdataLen * 156 gasPerPubdataBytes + 157 keccakGasCost(L2_TO_L1_LOG_SERIALIZE_SIZE) + 158 4 * 159 keccakGasCost(64) + 160: gasSpentOnMessageHashing; ``` *GitHub*: [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L153-L158) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 192 uint256 listLength = encodedNonce.length + 193 encodedGasParam.length + 194 encodedTo.length + 195 encodedValue.length + 196 encodedDataLength.length + 197 _transaction.data.length + 198: encodedChainId.length; ``` *GitHub*: [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L190-L196) ### [N‑27] Consider using `delete` rather than assigning zero/false to clear values The `delete` keyword more closely matches the semantics of what is being done, and draws more attention to the changing of state, which may lead to a more thorough audit of its associated logic *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 126: diamondStorage.isFrozen = false; ``` *GitHub*: [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L124) ### [N‑28] Consider using `SafeTransferLib.safeTransferETH()` or `Address.sendValue()` for clearer semantic meaning These Functions indicate their purpose with their name more clearly than using low-level calls. *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 83: (bool success, ) = msg.sender.call{value: _amount}(""); 108: (bool success, ) = _to.call{value: _amount}(""); ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L81-L81), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L106-L106) ### [N‑29] Consider using descriptive `constant`s when passing zero as a function argument Passing zero as a function argument can sometimes result in a security issue (e.g. passing zero as the slippage parameter). Consider using a `constant` variable with a descriptive name, so it's clear that the argument is intentionally being used, and for the right reasons. *There are 29 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 131: new bytes[](0) 200 l2TxHash = zkSync.requestL2Transaction{value: msg.value}( 201 l2Bridge, 202 0, // L2 msg.value 203 l2TxCalldata, 204 _l2TxGasLimit, 205 _l2TxGasPerPubdataByte, 206 new bytes[](0), 207 refundRecipient 208: ); 206: new bytes[](0), 333: (uint32 functionSignature, uint256 offset) = UnsafeBytes.readUint32(_l2ToL1message, 0); ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L129-L129), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L198-L206), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L204-L204), [333](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L331-L331) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 134: new bytes[](0) 193: new bytes[](0), 209: (_l1Sender, _l2Receiver, _l1Token, _amount, new bytes(0)) 283: (uint32 functionSignature, uint256 offset) = UnsafeBytes.readUint32(_message, 0); ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L132-L132), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L191-L191), [209](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L207-L207), [283](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L281-L281) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 43 _zkSync.requestL2Transaction{value: _deployTransactionFee}( 44 L2_DEPLOYER_SYSTEM_CONTRACT_ADDR, 45 0, 46 deployCalldata, 47 DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT, 48 REQUIRED_L2_GAS_PRICE_PER_PUBDATA, 49 _factoryDeps, 50 msg.sender 51: ); ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L41-L49) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 52: emit ChangeMinDelay(0, _minDelay); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 350: signature: new bytes(0), 352: paymasterInput: new bytes(0), 353: reservedDynamic: new bytes(0) 425: (uint32 functionSignature, uint256 offset) = UnsafeBytes.readUint32(_message, 0); ``` *GitHub*: [350](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L348-L348), [352](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L350-L350), [353](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L351-L351), [425](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L423-L423) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 150 (bool success, bytes memory returndata) = SystemContractsCaller.systemCallWithReturndata( 151 uint32(gasleft()), 152 DEPLOYER_SYSTEM_CONTRACT, 153 0, 154 abi.encodeCall( 155 IContractDeployer.create2, 156 (salt, l2TokenProxyBytecodeHash, abi.encode(address(l2TokenBeacon), "")) 157 ) 158: ); ``` *GitHub*: [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L148-L156) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 178: bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0); 273: bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0); ``` *GitHub*: [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L176-L176), [273](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L271-L271) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 130: uint256 numberOfInitialWrites = uint256(_compressedStateDiffs.readUint16(0)); 209: uint256 dictionaryLen = uint256(_rawCompressedData.readUint16(0)); ``` *GitHub*: [130](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L128-L128), [209](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L207-L207) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 85 SystemContractsCaller.systemCallWithPropagatedRevert( 86 uint32(gasleft()), 87 address(NONCE_HOLDER_SYSTEM_CONTRACT), 88 0, 89 abi.encodeCall(INonceHolder.incrementMinNonceIfEquals, (_transaction.nonce)) 90: ); ``` *GitHub*: [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L83-L88) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 28: value = SystemContractHelper.getExtraAbiData(0); ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L26-L26) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 267 uint256 farCallAbi = SystemContractsCaller.getFarCallABIWithEmptyFatPointer( 268 gas, 269 // Only rollup is supported for now 270 0, 271 CalldataForwardingMode.ForwardFatPointer, 272 _isConstructor, 273 _isSystem 274: ); ``` *GitHub*: [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L265-L272) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 363 bool precompileCallSuccess = unsafePrecompileCall( 364 0, // The precompile parameters are formal ones. We only need the precompile call to burn gas. 365 _gasToPay 366: ); ``` *GitHub*: [363](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L361-L364) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 87 uint256 farCallAbi = SystemContractsCaller.getFarCallABI( 88 0, 89 0, 90 dataStart, 91 dataLength, 92 gasLimit, 93 // Only rollup is supported for now 94 0, 95 CalldataForwardingMode.UseHeap, 96 false, 97 true 98: ); ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L85-L96) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 263: bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0); 335: bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0); 384: IERC20(token).safeApprove(paymaster, 0); ``` *GitHub*: [263](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L261-L261), [335](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L333-L333), [384](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L382-L382) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 98 functionCallWithValue( 99 target, 100 data, 101 0, 102 "Address: low-level call failed" 103: ); 117: return functionCallWithValue(target, data, 0, errorMessage); ``` *GitHub*: [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L96-L101), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L115-L115)
### [N‑30] Consider using named mappings Consider moving to solidity version 0.8.18 or later, and using [named mappings](https://ethereum.stackexchange.com/a/145555) to make it easier to understand the purpose of each mapping *There are 36 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 41: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; 45: mapping(address => mapping(address => mapping(bytes32 => uint256))) internal depositAmount; 56: mapping(address => uint256) public __DEPRECATED_lastWithdrawalLimitReset; 59: mapping(address => uint256) public __DEPRECATED_withdrawnAmountInWindow; 63: mapping(address => mapping(address => uint256)) public totalDepositedAmountPerUser; ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L39-L39), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L39-L39), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L43-L43), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L43-L43), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L43-L43), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L54-L54), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L57-L57), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L61-L61), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L61-L61) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 62: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L60-L60), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L60-L60) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 24: mapping(address => AccessMode) public getAccessMode; 28: mapping(address => mapping(address => mapping(bytes4 => bool))) public hasSpecialAccessToCall; 31: mapping(address => Deposit) public tokenDeposit; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L22-L22), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L26-L26), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L29-L29) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 34: mapping(bytes32 => uint256) public timestamps; ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L32-L32) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 89: mapping(address => bool) validators; 101: mapping(uint256 => bytes32) storedBatchHashes; 103: mapping(uint256 => bytes32) l2LogsRootHashes; 129: mapping(uint256 => mapping(uint256 => bool)) isEthWithdrawalFinalized; 135: mapping(address => uint256) totalDepositedAmountPerUser; ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L87-L87), [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L99-L99), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L101-L101), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L127-L127), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L127-L127), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L133-L133) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 52: mapping(bytes4 => SelectorToFacet) selectorToFacet; 53: mapping(address => FacetToSelectors) facetToSelectors; ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L50-L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L51-L51) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 11: mapping(uint256 => uint256) map; ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 30: mapping(uint256 => PriorityOperation) data; ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L28-L28) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 34: mapping(address => address) public override l1TokenAddress; ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L32-L32) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 28: mapping(address => AccountInfo) internal accountInfo; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L26-L26) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 23: mapping(uint256 => mapping(uint256 => bytes32)) internal immutableDataStorage; ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L21-L21), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 22: mapping(address => uint256) internal balance; ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L20-L20) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 38: mapping(uint256 => uint256) internal rawNonces; 43: mapping(uint256 => mapping(uint256 => uint256)) internal nonceValues; ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L36-L36), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L41-L41), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 57: mapping(uint256 => bytes32) internal batchHash; ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L55-L55)
### [N‑31] Constant redefined elsewhere Consider defining in only one contract so that values cannot become out of sync when only one location is updated. A [cheap way](https://medium.com/coinmonks/gas-cost-of-solidity-library-functions-dbe0cedd4678) to store constants in a single location is to create an `internal constant` in a `library`. If the variable is a local cache of another contract's value, consider making the cache variable internal or private, which will require external users to query the contract with the source of truth, so that callers don't get out of sync. *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit seen in cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 49: IAllowList public immutable allowList; /// @audit seen in cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 52: IZkSync public immutable zkSync; ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L47), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L50) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol /// @audit seen in cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 17: string public constant override getName = "AdminFacet"; ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit seen in cache/solpp-generated-contracts/zksync/facets/Admin.sol 24: string public constant override getName = "ExecutorFacet"; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L22) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol /// @audit seen in cache/solpp-generated-contracts/zksync/facets/Executor.sol 21: string public constant override getName = "GettersFacet"; ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L19) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit seen in cache/solpp-generated-contracts/zksync/facets/Getters.sol 43: string public constant override getName = "MailboxFacet"; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L41) ### [N‑32] Constants in comparisons should appear on the left side Doing so will prevent [typo bugs](https://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html) *There are 110 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 95: require(_factoryDeps.length == 3, "mk"); 186: require(_amount != 0, "2T"); // empty deposit amount 331: require(_l2ToL1message.length == 76, "kk"); ``` *GitHub*: [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L93-L93), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L184-L184), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L329-L329) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 92: require(_factoryDeps.length == 2, "Invalid factory deps length provided"); 170: require(_amount != 0, "Amount cannot be zero"); 281: require(_message.length == 96, "Incorrect ETH message with additional data length"); ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L90-L90), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L168-L168), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L279-L279) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 60: require(lockSlotOldValue == 0, "1B"); ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L58-L58) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 25: require(_bytecode.length % 32 == 0, "pq"); 29: require(bytecodeLenInWords % 2 == 1, "ps"); // bytecode length in words must be odd 43: require(version == 1 && _bytecodeHash[1] == bytes1(0), "zf"); // Incorrectly formatted bytecodeHash 45: require(_bytecodeLen(_bytecodeHash) % 2 == 1, "uy"); // Code length in words must be odd ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L23-L23), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L27-L27), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L41-L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L43-L43) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 109: if (timestamp == 0) { ``` *GitHub*: [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L107-L107) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 169: if (_l2ProtocolUpgradeTx.txType == 0) { 226: s.l2SystemContractsUpgradeBatchNumber == 0, ``` *GitHub*: [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L167-L167), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L224-L224) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 27: require(msg.data.length >= 4 || msg.data.length == 0, "Ut"); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25-L25), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 171: require(processedLogs == 255, "b8"); 169: require(processedLogs == 127, "b7"); 191: if (systemContractsUpgradeTxHash == bytes32(0) || s.l2SystemContractsUpgradeBatchNumber != 0) { 238: require(s.l2SystemContractsUpgradeBatchNumber == 0, "ik"); 245: bytes32 expectedUpgradeTxHash = i == 0 ? _systemContractUpgradeTxHash : bytes32(0); 305: if (batchWhenUpgradeHappened != 0 && batchWhenUpgradeHappened <= newTotalBatchesExecuted) { 352: assert(block.chainid != 1); ``` *GitHub*: [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L169-L169), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L167-L167), [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L189-L189), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L236-L236), [245](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L243-L243), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L303-L303), [352](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L350-L350) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 143: if (selectorsArrayLen != 0) { ``` *GitHub*: [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L141-L141) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 423: require(_message.length >= 56, "pm"); ``` *GitHub*: [423](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L421-L421) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 197: if (selectorsLength == 0) { 220: if (selectorPosition != 0) { 257: if (lastSelectorPosition == 0) { 293: if (data.length <= 4) { 304: require(data.length == 32, "lp"); 287: require(_calldata.length == 0, "H"); // Non-empty calldata for zero address ``` *GitHub*: [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L195-L195), [220](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L218-L218), [257](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L255-L255), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L291-L291), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L302-L302), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L285-L285) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 32: currentHash = (_index % 2 == 0) ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L30-L30) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 54: require(_transaction.paymaster == 0, "uc"); 55: require(_transaction.value == 0, "ud"); 56: require(_transaction.reserved[0] == 0, "ue"); 58: require(_transaction.reserved[2] == 0, "ug"); 59: require(_transaction.reserved[3] == 0, "uo"); 60: require(_transaction.signature.length == 0, "uh"); 61: require(_transaction.paymasterInput.length == 0, "ul"); 62: require(_transaction.reservedDynamic.length == 0, "um"); ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L52-L52), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L53-L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L56-L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L57-L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L58-L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L59-L59), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L60-L60) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 75: require(msg.value == 0, "Value should be 0 for ERC20 bridge"); ``` *GitHub*: [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L73-L73) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 104: if (codeHash == 0x00 && NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(account) > 0) { 135: codeHash != 0x00 && ``` *GitHub*: [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L102-L102), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L133-L133) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 71: if (txDataLen != 1) { 74: } else if (_transaction.data[0] >= 0x80) { 94: require(vInt == 27 || vInt == 28, "Invalid v value"); 98: if (_transaction.reserved[0] != 0) { 167: if (txDataLen != 1) { 170: } else if (_transaction.data[0] >= 0x80) { 193: require(vInt == 27 || vInt == 28, "Invalid v value"); 262: if (txDataLen != 1) { 265: } else if (_transaction.data[0] >= 0x80) { 288: require(vInt == 27 || vInt == 28, "Invalid v value"); ``` *GitHub*: [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L69-L69), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L72-L72), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L92-L92), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L92-L92), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L96-L96), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L165-L165), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L168-L168), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191-L191), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191-L191), [262](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L260-L260), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L263-L263), [288](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L286-L286), [288](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L286-L286) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 63: require(dictionary.length % 8 == 0, "Dictionary length should be a multiple of 8"); 139: if (enumIndex != 0) { 155: uint8 len = operation == 0 ? 32 : metadata >> LENGTH_BITS_OFFSET; 171: if (enumIndex == 0) { 184: uint8 len = operation == 0 ? 32 : metadata >> LENGTH_BITS_OFFSET; 236: if (_operation == 0 || _operation == 3) { 238: } else if (_operation == 1) { 240: } else if (_operation == 2) { ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L61-L61), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L137-L137), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L153-L153), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L169-L169), [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L182-L182), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L234-L234), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L234-L234), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L236-L236), [240](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L238-L238) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 49: if (ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getRawCodeHash(_address) == 0) { 271: ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getCodeHash(uint256(uint160(_newAddress))) == 0x0, 275: require(NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(_newAddress) == 0x00, "Account is occupied"); 353: require(value == 0, "The value must be zero if we do not call the constructor"); ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L47-L47), [271](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L269-L269), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L273-L273), [353](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L351-L351) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 143: if (to == address(DEPLOYER_SYSTEM_CONTRACT) && data.length >= 4) { 164: require(_signature.length == 65, "Signature length is incorrect"); 177: require(v == 27 || v == 28, "v is neither 27 nor 28"); 188: require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "Invalid s"); ``` *GitHub*: [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L141-L141), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L162-L162), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175-L175), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175-L175), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L186-L186) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 50: if (getMarker(_bytecodeHash) == 0) { 79: require(version == 1 && _bytecodeHash[1] == bytes1(0), "Incorrectly formatted bytecodeHash"); 81: require(Utils.bytecodeLenInWords(_bytecodeHash) % 2 == 1, "Code length in words must be odd"); ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L48-L48), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L77-L77), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L79-L79) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 32: isSystemCall = (mask & MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT) != 0; 43: if (value != 0) { ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L30-L30), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 87: require(_value != 0, "Nonce value cannot be set to 0"); 90: if (accountInfo.nonceOrdering == IContractDeployer.AccountNonceOrdering.Sequential && _key != 0) { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L85-L85), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L88-L88) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 241: if (virtualBlockUpgradeInfo.virtualBlockFinishL2Block != 0) { 250: if (currentVirtualL2BlockInfo.number == 0 && virtualBlockInfo.timestamp == 0) { 262: } else if (_maxVirtualBlocksToCreate == 0) { 333: if (currentL2BlockNumber == 0 && currentL2BlockTimestamp == 0) { 346: require(_maxVirtualBlocksToCreate == 0, "Can not create virtual blocks in the middle of the miniblock"); ``` *GitHub*: [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L239-L239), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L248-L248), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L248-L248), [262](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L260-L260), [333](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L331-L331), [333](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L331-L331), [346](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L344-L344) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 40: require(returnData.length == 32, "keccak256 returned invalid data"); 49: require(returnData.length == 32, "sha returned invalid data"); 133: if (_value == 0) { ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L38-L38), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L47-L47), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L131-L131) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 31: encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val)); 52: assert(_len != 1); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L29-L29), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L50-L50) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 350: return (callFlags & 2) != 0; ``` *GitHub*: [350](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L348-L348) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 100: if (value == 0) { ``` *GitHub*: [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L98-L98) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 97: return _addr == uint256(uint160(address(ETH_TOKEN_SYSTEM_CONTRACT))) || _addr == 0; 174: if (txDataLen != 1) { 177: } else if (_transaction.data[0] >= 0x80) { 186: if (_transaction.reserved[0] != 0) { 252: if (txDataLen != 1) { 255: } else if (_transaction.data[0] >= 0x80) { 324: if (txDataLen != 1) { 327: } else if (_transaction.data[0] >= 0x80) { 365: require(_transaction.paymasterInput.length >= 4, "The standard paymaster input must be at least 4 bytes long"); 370: _transaction.paymasterInput.length >= 68, ``` *GitHub*: [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L95-L95), [174](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L172-L172), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L175-L175), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L184-L184), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L250-L250), [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L253-L253), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L322-L322), [327](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L325-L325), [365](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L363-L363), [370](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L368-L368) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 54: return _bytecodeHash[1] == 0x00; 59: return _bytecodeHash[1] == 0x01; 86: require(_bytecode.length % 32 == 0, "po"); 90: require(bytecodeLenInWords % 2 == 1, "pr"); // bytecode length in words must be odd ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L52-L52), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L57-L57), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L84-L84), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L88-L88) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 265: if (returndata.length == 0) { ``` *GitHub*: [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L263-L263)
### [N‑33] Contract should expose an `interface` The `contract`s should expose an `interface` so that other projects can more easily integrate with it, without having to develop their own non-standard variants. *There are 149 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 85 function initialize( 86 bytes[] calldata _factoryDeps, 87 address _l2TokenBeacon, 88 address _governor, 89 uint256 _deployBridgeImplementationFee, 90 uint256 _deployBridgeProxyFee 91: ) external payable reentrancyGuardInitializer { 146 function deposit( 147 address _l2Receiver, 148 address _l1Token, 149 uint256 _amount, 150 uint256 _l2TxGasLimit, 151 uint256 _l2TxGasPerPubdataByte 152: ) external payable returns (bytes32 l2TxHash) { 178 function deposit( 179 address _l2Receiver, 180 address _l1Token, 181 uint256 _amount, 182 uint256 _l2TxGasLimit, 183 uint256 _l2TxGasPerPubdataByte, 184 address _refundRecipient 185: ) public payable nonReentrant senderCanCallFunction(allowList) returns (bytes32 l2TxHash) { 257 function claimFailedDeposit( 258 address _depositSender, 259 address _l1Token, 260 bytes32 _l2TxHash, 261 uint256 _l2BatchNumber, 262 uint256 _l2MessageIndex, 263 uint16 _l2TxNumberInBatch, 264 bytes32[] calldata _merkleProof 265: ) external nonReentrant senderCanCallFunction(allowList) { 295 function finalizeWithdrawal( 296 uint256 _l2BatchNumber, 297 uint256 _l2MessageIndex, 298 uint16 _l2TxNumberInBatch, 299 bytes calldata _message, 300 bytes32[] calldata _merkleProof 301: ) external nonReentrant senderCanCallFunction(allowList) { 355: function l2TokenAddress(address _l1Token) public view returns (address) { ``` *GitHub*: [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L83-L89), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L144-L150), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L176-L183), [257](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L255-L263), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L293-L299), [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L353-L353) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 83 function initialize( 84 bytes[] calldata _factoryDeps, 85 address _l2WethAddress, 86 address _governor, 87 uint256 _deployBridgeImplementationFee, 88 uint256 _deployBridgeProxyFee 89: ) external payable reentrancyGuardInitializer { 161 function deposit( 162 address _l2Receiver, 163 address _l1Token, 164 uint256 _amount, 165 uint256 _l2TxGasLimit, 166 uint256 _l2TxGasPerPubdataByte, 167 address _refundRecipient 168: ) external payable nonReentrant senderCanCallFunction(allowList) returns (bytes32 txHash) { 216 function claimFailedDeposit( 217 address, // _depositSender, 218 address, // _l1Token, 219 bytes32, // _l2TxHash 220 uint256, // _l2BatchNumber, 221 uint256, // _l2MessageIndex, 222 uint16, // _l2TxNumberInBatch, 223 bytes32[] calldata // _merkleProof 224: ) external pure { 235 function finalizeWithdrawal( 236 uint256 _l2BatchNumber, 237 uint256 _l2MessageIndex, 238 uint16 _l2TxNumberInBatch, 239 bytes calldata _message, 240 bytes32[] calldata _merkleProof 241: ) external nonReentrant senderCanCallFunction(allowList) { 309: receive() external payable { ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L81-L87), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L159-L166), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L214-L222), [235](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L233-L239), [309](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L307-L307) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 41: function canCall(address _caller, address _target, bytes4 _functionSig) external view returns (bool) { 51: function setAccessMode(address _target, AccessMode _accessMode) external onlyOwner { 60: function setBatchAccessMode(address[] calldata _targets, AccessMode[] calldata _accessModes) external onlyOwner { 85 function setBatchPermissionToCall( 86 address[] calldata _callers, 87 address[] calldata _targets, 88 bytes4[] calldata _functionSigs, 89 bool[] calldata _enables 90: ) external onlyOwner { 108 function setPermissionToCall( 109 address _caller, 110 address _target, 111 bytes4 _functionSig, 112 bool _enable 113: ) external onlyOwner { 131: function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { 138: function getTokenDepositLimitData(address _l1Token) external view returns (Deposit memory) { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L39-L39), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L49-L49), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L58-L58), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L83-L88), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L106-L111), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129-L129), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L136-L136) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 86: function isOperation(bytes32 _id) public view returns (bool) { 91: function isOperationPending(bytes32 _id) public view returns (bool) { 97: function isOperationReady(bytes32 _id) public view returns (bool) { 102: function isOperationDone(bytes32 _id) public view returns (bool) { 107: function getOperationState(bytes32 _id) public view returns (OperationState) { 131: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external onlyOwner { 144: function scheduleShadow(bytes32 _id, uint256 _delay) external onlyOwner { 156: function cancel(bytes32 _id) external onlyOwnerOrSecurityCouncil { 169: function execute(Operation calldata _operation) external onlyOwnerOrSecurityCouncil { 188: function executeInstant(Operation calldata _operation) external onlySecurityCouncil { 206: function hashOperation(Operation calldata _operation) public pure returns (bytes32) { 251: function updateDelay(uint256 _newDelay) external onlySelf { 258: function updateSecurityCouncil(address _newSecurityCouncil) external onlySelf { 264: receive() external payable {} ``` *GitHub*: [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L84-L84), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L89-L89), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L95-L95), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L100-L100), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L105-L105), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L129-L129), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L142-L142), [156](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L154-L154), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L167-L167), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L186-L186), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L204-L204), [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L249-L249), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L256-L256), [264](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L262-L262) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 57: function initialize(InitializeData calldata _initalizeData) external reentrancyGuardInitializer returns (bytes32) { ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L55-L55) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 22: fallback() external payable { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 54: function setValidator(address _newValidator) external onlyOwner { 61: function setExecutionDelay(uint32 _executionDelay) external onlyOwner { 73: function getCommittedBatchTimestamp(uint256 _l2BatchNumber) external view returns (uint256) { 79 function commitBatches( 80 StoredBatchInfo calldata, 81 CommitBatchInfo[] calldata _newBatchesData 82: ) external onlyValidator { 98: function revertBatches(uint256) external onlyValidator { 105 function proveBatches( 106 StoredBatchInfo calldata, 107 StoredBatchInfo[] calldata, 108 ProofInput calldata 109: ) external onlyValidator { 115: function executeBatches(StoredBatchInfo[] calldata _newBatchesData) external onlyValidator { ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L52-L52), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L59-L59), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L71-L71), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L77-L80), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L96-L96), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L103-L107), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L113-L113) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 22: function setPendingGovernor(address _newPendingGovernor) external onlyGovernor { 31: function acceptGovernor() external { 46: function setPendingAdmin(address _newPendingAdmin) external onlyGovernorOrAdmin { 55: function acceptAdmin() external { 70: function setValidator(address _validator, bool _active) external onlyGovernorOrAdmin { 77: function setPorterAvailability(bool _zkPorterIsAvailable) external onlyGovernor { 85: function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external onlyGovernor { 100: function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external onlyGovernor { 111: function freezeDiamond() external onlyGovernor { 122: function unfreezeDiamond() external onlyGovernorOrAdmin { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L20-L20), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L29-L29), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L44-L44), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L53-L53), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L68-L68), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L75-L75), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L83-L83), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L98-L98), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L109-L109), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L120-L120) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 293: function executeBatches(StoredBatchInfo[] calldata _batchesData) external nonReentrant onlyValidator { 313 function proveBatches( 314 StoredBatchInfo calldata _prevBatch, 315 StoredBatchInfo[] calldata _committedBatches, 316 ProofInput calldata _proof 317: ) external nonReentrant onlyValidator { 391: function revertBatches(uint256 _newLastBatch) external nonReentrant onlyValidator { ``` *GitHub*: [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L291-L291), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L311-L315), [391](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L389-L389) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 28: function getVerifier() external view returns (address) { 33: function getGovernor() external view returns (address) { 38: function getPendingGovernor() external view returns (address) { 43: function getTotalBatchesCommitted() external view returns (uint256) { 48: function getTotalBatchesVerified() external view returns (uint256) { 53: function getTotalBatchesExecuted() external view returns (uint256) { 58: function getTotalPriorityTxs() external view returns (uint256) { 65: function getFirstUnprocessedPriorityTx() external view returns (uint256) { 70: function getPriorityQueueSize() external view returns (uint256) { 75: function priorityQueueFrontOperation() external view returns (PriorityOperation memory) { 80: function isValidator(address _address) external view returns (bool) { 85: function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32) { 92: function storedBatchHash(uint256 _batchNumber) external view returns (bytes32) { 97: function getL2BootloaderBytecodeHash() external view returns (bytes32) { 102: function getL2DefaultAccountBytecodeHash() external view returns (bytes32) { 107: function getVerifierParams() external view returns (VerifierParams memory) { 112: function getProtocolVersion() external view returns (uint256) { 117: function getL2SystemContractsUpgradeTxHash() external view returns (bytes32) { 126: function getL2SystemContractsUpgradeBatchNumber() external view returns (uint256) { 131: function isDiamondStorageFrozen() external view returns (bool) { 137: function isFacetFreezable(address _facet) external view returns (bool isFreezable) { 150: function getPriorityTxMaxGasLimit() external view returns (uint256) { 155: function getAllowList() external view returns (address) { 160: function isFunctionFreezable(bytes4 _selector) external view returns (bool) { 169: function isEthWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool) { 178: function facets() external view returns (Facet[] memory result) { 193: function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory) { 199: function facetAddresses() external view returns (address[] memory) { 205: function facetAddress(bytes4 _selector) external view returns (address) { 216: function getTotalBlocksCommitted() external view returns (uint256) { 222: function getTotalBlocksVerified() external view returns (uint256) { 228: function getTotalBlocksExecuted() external view returns (uint256) { 236: function storedBlockHash(uint256 _batchNumber) external view returns (bytes32) { 246: function getL2SystemContractsUpgradeBlockNumber() external view returns (uint256) { ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L26-L26), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L31-L31), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L36-L36), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L41-L41), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L46-L46), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L51-L51), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L56-L56), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L63-L63), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L68-L68), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L73-L73), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L78-L78), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L83-L83), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L90-L90), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L95-L95), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L100-L100), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L105-L105), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L110-L110), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L115-L115), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L124-L124), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L129-L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L135-L135), [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L148-L148), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L153-L153), [160](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L158-L158), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L167-L167), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L176-L176), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L191-L191), [199](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L197-L197), [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L203-L203), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L214-L214), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L220-L220), [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L226-L226), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L234-L234), [246](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L244-L244) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 51 function proveL2MessageInclusion( 52 uint256 _batchNumber, 53 uint256 _index, 54 L2Message memory _message, 55 bytes32[] calldata _proof 56: ) public view returns (bool) { 66 function proveL2LogInclusion( 67 uint256 _batchNumber, 68 uint256 _index, 69 L2Log memory _log, 70 bytes32[] calldata _proof 71: ) external view returns (bool) { 168 function l2TransactionBaseCost( 169 uint256 _gasPrice, 170 uint256 _l2GasLimit, 171 uint256 _l2GasPerPubdataByteLimit 172: ) public pure returns (uint256) { 238 function requestL2Transaction( 239 address _contractL2, 240 uint256 _l2Value, 241 bytes calldata _calldata, 242 uint256 _l2GasLimit, 243 uint256 _l2GasPerPubdataByteLimit, 244 bytes[] calldata _factoryDeps, 245 address _refundRecipient 246: ) external payable nonReentrant senderCanCallFunction(s.allowList) returns (bytes32 canonicalTxHash) { ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L49-L54), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L64-L69), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L166-L170), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L236-L244) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 42 function initialize( 43 address _l1Bridge, 44 bytes32 _l2TokenProxyBytecodeHash, 45 address _governor 46: ) external initializer { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L44) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 48: function bridgeInitialize(address _l1Address, bytes memory _data) external initializer { 144: function decodeString(bytes memory _input) external pure returns (string memory result) { 149: function decodeUint8(bytes memory _input) external pure returns (uint8 result) { ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L46-L46), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L142-L142), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 41: function initialize(string memory name_, string memory symbol_) external initializer { 54: function initializeV2(address _l2Bridge, address _l1Address) external reinitializer(2) { 113: receive() external payable { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L39-L39), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L52-L52), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L111-L111) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 47 function initialize( 48 address _l1Bridge, 49 address _l1WethAddress, 50 address _l2WethAddress 51: ) external initializer { 121: receive() external payable { ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L45-L49), [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L119-L119) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 23: function upgrade(address _delegateTo, bytes calldata _calldata) external payable { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 56 function publishCompressedBytecode( 57 bytes calldata _bytecode, 58 bytes calldata _rawCompressedData 59: ) external payable onlyCallFromBootloader returns (bytes32 bytecodeHash) { 119 function verifyCompressedStateDiffs( 120 uint256 _numberOfStateDiffs, 121 uint256 _enumerationIndexSize, 122 bytes calldata _stateDiffs, 123 bytes calldata _compressedStateDiffs 124: ) external payable onlyCallFrom(address(L1_MESSENGER_CONTRACT)) returns (bytes32 stateDiffHash) { ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L54-L57), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L117-L122) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 36: function getAccountInfo(address _address) external view returns (AccountInfo memory info) { 42: function extendedAccountVersion(address _address) public view returns (AccountAbstractionVersion) { 64: function updateAccountVersion(AccountAbstractionVersion _version) external onlySystemCall { 73: function updateNonceOrdering(AccountNonceOrdering _nonceOrdering) external onlySystemCall { 216: function forceDeployOnAddress(ForceDeployment calldata _deployment, address _sender) external payable onlySelf { 240: function forceDeployOnAddresses(ForceDeployment[] calldata _deployments) external payable { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L34-L34), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L40-L40), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L62-L62), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L71-L71), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L214-L214), [240](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L238-L238) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 200 function payForTransaction( 201 bytes32, // _txHash 202 bytes32, // _suggestedSignedHash 203 Transaction calldata _transaction 204: ) external payable ignoreNonBootloader ignoreInDelegateCall { 216 function prepareForPaymaster( 217 bytes32, // _txHash 218 bytes32, // _suggestedSignedHash 219 Transaction calldata _transaction 220: ) external payable ignoreNonBootloader ignoreInDelegateCall { 224: fallback() external payable { 231 receive() external payable { 232 // If the contract is called directly, behave like an EOA 233: } ``` *GitHub*: [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L198-L202), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L214-L218), [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L222-L222), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L229-L231) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 14: fallback() external payable {} 16: receive() external payable {} ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L14-L14) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 30: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external onlyCallFromBootloader { 42: function markBytecodeAsPublished(bytes32 _bytecodeHash) external onlyCompressor { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L28-L28), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L40-L40) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 77 function sendL2ToL1Log( 78 bool _isService, 79 bytes32 _key, 80 bytes32 _value 81: ) external onlyCallFromSystemContract returns (uint256 logIdInMerkleTree) { 201 function publishPubdataAndClearState( 202 bytes calldata _totalL2ToL1PubdataAndStateDiffs 203: ) external onlyCallFromBootloader { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L75-L79), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L199-L201) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 37: fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L35-L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 48: function getMinNonce(address _address) public view returns (uint256) { 59: function getRawNonce(address _address) public view returns (uint256) { 67: function increaseMinNonce(uint256 _value) public onlySystemCall returns (uint256 oldMinNonce) { 84: function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 104: function getValueUnderNonce(uint256 _key) public view returns (uint256) { 112: function incrementMinNonceIfEquals(uint256 _expectedNonce) external onlySystemCall { 127: function getDeploymentNonce(address _address) external view returns (uint256 deploymentNonce) { 137: function incrementDeploymentNonce(address _address) external onlySystemCall returns (uint256 prevDeploymentNonce) { 149: function isNonceUsed(address _address, uint256 _nonce) public view returns (bool) { 161: function validateNonceUsage(address _address, uint256 _key, bool _shouldBeUsed) external view { ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L46-L46), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L57-L57), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L65-L65), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82-L82), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L102-L102), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L110-L110), [127](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L125-L125), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L135-L135), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L147-L147), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L159-L159) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89: function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 95: function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 105: function getBlockHashEVM(uint256 _block) external view returns (bytes32 hash) { 139: function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash) { 145: function getBatchNumberAndTimestamp() public view returns (uint128 batchNumber, uint128 batchTimestamp) { 153: function getL2BlockNumberAndTimestamp() public view returns (uint128 blockNumber, uint128 blockTimestamp) { 163: function getBlockNumber() public view returns (uint128) { 171: function getBlockTimestamp() public view returns (uint128) { 314 function setL2Block( 315 uint128 _l2BlockNumber, 316 uint128 _l2BlockTimestamp, 317 bytes32 _expectedPrevL2BlockHash, 318 bool _isFirstInBatch, 319 uint128 _maxVirtualBlocksToCreate 320: ) external onlyCallFromBootloader { 375: function appendTransactionToCurrentL2Block(bytes32 _txHash) external onlyCallFromBootloader { 381: function publishTimestampDataToL1() external onlyCallFromBootloader { 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423: ) external onlyCallFromBootloader { 445 function unsafeOverrideBatch( 446 uint256 _newTimestamp, 447 uint256 _number, 448 uint256 _baseFee 449: ) external onlyCallFromBootloader { 456: function incrementTxNumberInBatch() external onlyCallFromBootloader { 460: function resetTxNumberInBatch() external onlyCallFromBootloader { 470: function currentBlockInfo() external view returns (uint256 blockInfo) { 477: function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp) { 483: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash) { ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87-L87), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93-L93), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L103-L103), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L137-L137), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L143-L143), [153](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L151-L151), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L161-L161), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L169-L169), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L312-L318), [375](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L373-L373), [381](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L379-L379), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L421), [445](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L443-L447), [456](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L454-L454), [460](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L458-L458), [470](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L468-L468), [477](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L475-L475), [483](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L481-L481)
### [N‑34] Contract timekeeping will break earlier than the Ethereum network itself will stop working When a timestamp is downcast from `uint256` to `uint32`, the value will wrap in the year 2106, and the contracts will break. Other downcasts will have different endpoints. Consider whether your contract is intended to live past the size of the type being used. *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 86: uint32 timestamp = uint32(block.timestamp); ``` *GitHub*: [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L84-L84) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 297: uint64 expirationTimestamp = uint64(block.timestamp + PRIORITY_EXPIRATION); // Safe to cast ``` *GitHub*: [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L295-L295) ### [N‑35] Contracts should have full test coverage While 100% code coverage does not guarantee that there are no bugs, it often will catch easy-to-find bugs, and will ensure that there are fewer regressions when the code invariably has to be modified. Furthermore, in order to get full coverage, code authors will often have to re-organize their code so that it is more modular, so that each component can be tested separately, which reduces interdependencies between modules and layers, and makes for code that is easier to reason about and audit. *There is one instance of this issue:* ```solidity File: Various Files ``` ### [N‑36] Custom errors should be used rather than `revert()`/`require()` Custom errors are available from solidity version 0.8.4. Custom errors are more easily processed in `try`-`catch` blocks, and are easier to re-use and maintain. *There are 272 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 92: require(_l2TokenBeacon != address(0), "nf"); 93: require(_governor != address(0), "nh"); 95: require(_factoryDeps.length == 3, "mk"); 97: require(msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, "fee"); 186: require(_amount != 0, "2T"); // empty deposit amount 188: require(amount == _amount, "1T"); // The token has non-standard transfer logic 274: require(proofValid, "yn"); 277: require(amount > 0, "y1"); 302: require(!isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "pw"); 314: require(success, "nq"); 331: require(_l2ToL1message.length == 76, "kk"); 334: require(bytes4(functionSignature) == this.finalizeWithdrawal.selector, "nt"); 349: require(totalDepositedAmountPerUser[_l1Token][_depositor] + _amount <= limitData.depositCap, "d1"); ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L91), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L93), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L95), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L184), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L186), [274](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L272), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L275), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L300), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L312), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L329), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L332), [349](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L347) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 90: require(_l2WethAddress != address(0), "L2 WETH address cannot be zero"); 91: require(_governor != address(0), "Governor address cannot be zero"); 92: require(_factoryDeps.length == 2, "Invalid factory deps length provided"); 93 require( 94 msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, 95 "Miscalculated deploy transactions fees" 96: ); 169: require(_l1Token == l1WethAddress, "Invalid L1 token address"); 170: require(_amount != 0, "Amount cannot be zero"); 242: require(!isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "Withdrawal is already finalized"); 256: require(success, "vq"); 281: require(_message.length == 96, "Incorrect ETH message with additional data length"); 284 require( 285 bytes4(functionSignature) == IMailbox.finalizeEthWithdrawal.selector, 286 "Incorrect ETH message function selector" 287: ); 291: require(l1EthReceiver == address(this), "Wrong L1 ETH withdraw receiver"); 297: require(l2Sender == l2Bridge, "The withdrawal was not initiated by L2 bridge"); 313: require(msg.sender == l1WethAddress || msg.sender == address(zkSync), "pn"); ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L88), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L89), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L91-L94), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L167), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L168), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L240), [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L254), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L282-L285), [291](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L289), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L295), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L311) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 62: require(targetsLength == _accessModes.length, "yg"); // The size of arrays should be equal 94: require(callersLength == _targets.length, "yw"); 95: require(callersLength == _functionSigs.length, "yx"); 96: require(callersLength == _enables.length, "yy"); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L60), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L92), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L94) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 15: require(_allowList.canCall(msg.sender, address(this), msg.sig), "nr"); ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L13) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 60: require(lockSlotOldValue == 0, "1B"); 77: require(_status == _NOT_ENTERED, "r1"); ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L58), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L75) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 25: require(_bytecode.length % 32 == 0, "pq"); 28: require(bytecodeLenInWords < 2**16, "pp"); // bytecode length must be less than 2^16 words 29: require(bytecodeLenInWords % 2 == 1, "ps"); // bytecode length in words must be odd 43: require(version == 1 && _bytecodeHash[1] == bytes1(0), "zf"); // Incorrectly formatted bytecodeHash 45: require(_bytecodeLen(_bytecodeHash) % 2 == 1, "uy"); // Code length in words must be odd ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L23), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L26), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L27), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L43) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 44: require(_admin != address(0), "Admin should be non zero address"); 61: require(msg.sender == address(this), "Only governance contract itself allowed to call this function"); 67: require(msg.sender == securityCouncil, "Only security council allowed to call this function"); 73 require( 74 msg.sender == owner() || msg.sender == securityCouncil, 75 "Only the owner and security council are allowed to call this function" 76: ); 157: require(isOperationPending(_id), "Operation must be pending"); 174: require(isOperationReady(id), "Operation must be ready before execution"); 179: require(isOperationReady(id), "Operation must be ready after execution"); 193: require(isOperationPending(id), "Operation must be pending before execution"); 198: require(isOperationPending(id), "Operation must be pending after execution"); 218: require(!isOperation(_id), "Operation with this proposal id already exists"); 219: require(_delay >= minDelay, "Proposed delay is less than minimum delay"); 242: require(_predecessorId == bytes32(0) || isOperationDone(_predecessorId), "Predecessor operation not completed"); ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L42), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L59), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L65), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L71-L74), [157](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L155), [174](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L172), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L177), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L191), [198](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L196), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L216), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L217), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L240) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 74: require(block.timestamp >= _proposedUpgrade.upgradeTimestamp, "Upgrade is not ready yet"); 173: require(_l2ProtocolUpgradeTx.txType == SYSTEM_UPGRADE_L2_TX_TYPE, "L2 system upgrade tx type is wrong"); 187 require( 188 _l2ProtocolUpgradeTx.nonce == _newProtocolVersion, 189 "The new protocol version should be included in the L2 system upgrade tx" 190: ); 203: require(_factoryDeps.length == _expectedHashes.length, "Wrong number of factory deps"); 204: require(_factoryDeps.length <= MAX_NEW_FACTORY_DEPS, "Factory deps can be at most 32"); 207 require( 208 L2ContractHelper.hashL2Bytecode(_factoryDeps[i]) == bytes32(_expectedHashes[i]), 209 "Wrong factory dep hash" 210: ); 218 require( 219 _newProtocolVersion > previousProtocolVersion, 220 "New protocol version is not greater than the current one" 221: ); 224: require(s.l2SystemContractsUpgradeTxHash == bytes32(0), "Previous upgrade has not been finalized"); 225 require( 226 s.l2SystemContractsUpgradeBatchNumber == 0, 227 "The batch number of the previous upgrade has not been cleaned" 228: ); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L72), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L171), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L185-L188), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L201), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L202), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L205-L208), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L216-L219), [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L222), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L223-L226) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 58: require(address(_initalizeData.verifier) != address(0), "vt"); 59: require(_initalizeData.governor != address(0), "vy"); 60: require(_initalizeData.admin != address(0), "hc"); 61: require(_initalizeData.priorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "vu"); ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L59) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 16: require(_chainId == block.chainid, "pr"); 27: require(msg.data.length >= 4 || msg.data.length == 0, "Ut"); 32: require(facetAddress != address(0), "F"); // Proxy has no facet for this selector 33: require(!diamondStorage.isFrozen || !facet.isFreezable, "q1"); // Facet is frozen ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L14), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L30), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 68: require(msg.sender == validator, "8h"); 125: require(block.timestamp >= commitBatchTimestamp + delay, "5c"); // The delay is not passed ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L66), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 33: require(msg.sender == pendingGovernor, "n4"); // Only proposed by current governor address can claim the governor rights 57: require(msg.sender == pendingAdmin, "n4"); // Only proposed by current admin address can claim the admin rights 86: require(_newPriorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "n5"); 114: require(!diamondStorage.isFrozen, "a9"); // diamond proxy is frozen already 125: require(diamondStorage.isFrozen, "a7"); // diamond proxy is not frozen ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L31), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L55), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L84), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L112), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 21: require(msg.sender == s.governor, "1g"); // only by governor 27: require(msg.sender == s.governor || msg.sender == s.admin, "Only by governor or admin"); 33: require(s.validators[msg.sender], "1h"); // validator is not active ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L19), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L25), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 34: require(_newBatch.batchNumber == _previousBatch.batchNumber + 1, "f"); // only commit next batch 47: require(_previousBatch.batchHash == previousBatchHash, "l"); 49: require(expectedPriorityOperationsHash == _newBatch.priorityOperationsHash, "t"); 51: require(expectedNumberOfLayer1Txs == _newBatch.numberOfLayer1Txs, "ta"); 83: require(batchTimestamp == _expectedBatchTimestamp, "tb"); 87: require(_previousBatchTimestamp < batchTimestamp, "h3"); 95: require(block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER <= batchTimestamp, "h1"); // New batch timestamp is too small 96: require(lastL2BlockTimestamp <= block.timestamp + COMMIT_TIMESTAMP_APPROXIMATION_DELTA, "h2"); // The last L2 block timestamp is too big 132: require(!_checkBit(processedLogs, uint8(logKey)), "kp"); 137: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lm"); 140: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "ln"); 141: require(providedL2ToL1PubdataHash == logValue, "wp"); 143: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lb"); 146: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sc"); 149: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sv"); 152: require(logSender == L2_BOOTLOADER_ADDRESS, "bl"); 155: require(logSender == L2_BOOTLOADER_ADDRESS, "bk"); 158: require(logSender == L2_BOOTLOADER_ADDRESS, "bu"); 159: require(_expectedSystemContractUpgradeTxHash == logValue, "ut"); 169: require(processedLogs == 127, "b7"); 171: require(processedLogs == 255, "b8"); 186: require(s.storedBatchHashes[s.totalBatchesCommitted] == _hashStoredBatchInfo(_lastCommittedBatchData), "i"); // incorrect previous batch data 187: require(_newBatchesData.length > 0, "No batches to commit"); 238: require(s.l2SystemContractsUpgradeBatchNumber == 0, "ik"); 277: require(currentBatchNumber == s.totalBatchesExecuted + _executedBatchIdx + 1, "k"); // Execute batches in order 278 require( 279 _hashStoredBatchInfo(_storedBatch) == s.storedBatchHashes[currentBatchNumber], 280 "exe10" // executing batch should be committed 281: ); 284: require(priorityOperationsHash == _storedBatch.priorityOperationsHash, "x"); // priority operations hash does not match to expected 302: require(newTotalBatchesExecuted <= s.totalBatchesVerified, "n"); // Can't execute batches more than committed and proven currently. 329: require(_hashStoredBatchInfo(_prevBatch) == s.storedBatchHashes[currentTotalBatchesVerified], "t1"); 334 require( 335 _hashStoredBatchInfo(_committedBatches[i]) == s.storedBatchHashes[currentTotalBatchesVerified], 336 "o1" 337: ); 348: require(currentTotalBatchesVerified <= s.totalBatchesCommitted, "q"); 361: require(successVerifyProof, "p"); // Proof verification fail 392: require(s.totalBatchesCommitted > _newLastBatch, "v1"); // The last committed batch is less than new last batch 393: require(_newLastBatch >= s.totalBatchesExecuted, "v2"); // Already executed batches cannot be reverted 446: require(_batch.systemLogs.length <= MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, "pu"); ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L32), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L47), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L49), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L81), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L85), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L94), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L130), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L135), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L138), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L139), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L141), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L144), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L147), [152](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L150), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L153), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L156), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L157), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L167), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L169), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L184), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L185), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L236), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L275), [278](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L276-L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L282), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L300), [329](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L327), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L332-L335), [348](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L346), [361](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L359), [392](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L390), [393](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L391), [446](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L444) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 162: require(ds.selectorToFacet[_selector].facetAddress != address(0), "g2"); ``` *GitHub*: [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L160) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 121: require(callSuccess, "pz"); 131: require(_batchNumber <= s.totalBatchesExecuted, "xx"); 138: require(hashedLog != L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, "tw"); 201: require(!s.isEthWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "jj"); 212: require(proofValid, "pi"); // Failed to verify that withdrawal was actually initialized on L2 259: require(_l2GasPerPubdataByteLimit == REQUIRED_L2_GAS_PRICE_PER_PUBDATA, "qp"); 281: require(s.totalDepositedAmountPerUser[_depositor] + _amount <= limitData.depositCap, "d2"); 296: require(_factoryDeps.length <= MAX_NEW_FACTORY_DEPS, "uj"); 308: require(msg.value >= baseCost + _l2Value, "mv"); // The `msg.value` doesn't cover the transaction cost 423: require(_message.length >= 56, "pm"); 426: require(bytes4(functionSignature) == this.finalizeEthWithdrawal.selector, "is"); ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L119), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L129), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L136), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L199), [212](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L210), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L257), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L279), [296](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L294), [308](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L306), [423](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L421), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L424) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 108: require(selectors.length > 0, "B"); // no functions for diamond cut 134: require(_facet != address(0), "G"); // facet with zero address cannot be added 143: require(oldFacet.facetAddress == address(0), "J"); // facet for this selector already exists 158: require(_facet != address(0), "K"); // cannot replace facet with zero address 164: require(oldFacet.facetAddress != address(0), "L"); // it is impossible to replace the facet with zero address 178: require(_facet == address(0), "a1"); // facet address must be zero 184: require(oldFacet.facetAddress != address(0), "a2"); // Can't delete a non-existent facet 222: require(_isSelectorFreezable == ds.selectorToFacet[selector0].isFreezable, "J1"); 287: require(_calldata.length == 0, "H"); // Non-empty calldata for zero address 304: require(data.length == 32, "lp"); 305: require(abi.decode(data, (bytes32)) == DIAMOND_INIT_SUCCESS_RETURN_VALUE, "lp1"); ``` *GitHub*: [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L106), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L132), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L141), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L156), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L162), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L176), [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L182), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L220), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L285), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L302), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L303) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 26: require(pathLength > 0, "xc"); 27: require(pathLength < 256, "bt"); 28: require(_index < (1 << pathLength), "px"); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L26) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 67: require(!_queue.isEmpty(), "D"); // priority queue is empty 75: require(!_queue.isEmpty(), "s"); // priority queue is empty ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L65), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L73) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 32: require(l2GasForTxBody <= _priorityTxMaxGasLimit, "ui"); 34: require(l2GasForTxBody / _transaction.gasPerPubdataByteLimit <= PRIORITY_TX_MAX_PUBDATA, "uk"); 38 require( 39 getMinimalPriorityTransactionGasLimit( 40 _encoded.length, 41 _transaction.factoryDeps.length, 42 _transaction.gasPerPubdataByteLimit 43 ) <= _transaction.gasLimit, 44 "up" 45: ); 52: require(_transaction.from <= type(uint16).max, "ua"); 53: require(_transaction.to <= type(uint160).max, "ub"); 54: require(_transaction.paymaster == 0, "uc"); 55: require(_transaction.value == 0, "ud"); 56: require(_transaction.reserved[0] == 0, "ue"); 57: require(_transaction.reserved[1] <= type(uint160).max, "uf"); 58: require(_transaction.reserved[2] == 0, "ug"); 59: require(_transaction.reserved[3] == 0, "uo"); 60: require(_transaction.signature.length == 0, "uh"); 61: require(_transaction.paymasterInput.length == 0, "ul"); 62: require(_transaction.reservedDynamic.length == 0, "um"); 119: require(_totalGasLimit >= overhead, "my"); // provided gas limit doesn't cover transaction overhead ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L32), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L36-L43), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L52), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L54), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L59), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L60), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L117) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 47: require(_l1Bridge != address(0), "bf"); 48: require(_l2TokenProxyBytecodeHash != bytes32(0), "df"); 49: require(_governor != address(0), "sf"); 73: require(AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, "mq"); 75: require(msg.value == 0, "Value should be 0 for ERC20 bridge"); 81: require(deployedToken == expectedL2Token, "mt"); 84: require(currentL1Token == _l1Token, "gg"); // Double check that the expected value equal to real one 115: require(l1Token != address(0), "yh"); 161: require(success, "mk"); ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L45), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L46), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L47), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L71), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L73), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L79), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L82), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L113), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L159) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 49: require(_l1Address != address(0), "in6"); // Should be non-zero address 103: require(msg.sender == l2Bridge, "xnt"); // Only L2 bridge can call this method ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L47), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L101) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 55: require(_l2Bridge != address(0), "L2 bridge address cannot be zero"); 56: require(_l1Address != address(0), "L1 WETH token address cannot be zero"); 62: require(msg.sender == l2Bridge, "permission denied"); // Only L2 bridge can call this method 84: require(success, "Failed withdrawal"); 109: require(success, "Failed withdrawal"); ``` *GitHub*: [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L54), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L60), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L82), [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L107) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 52: require(_l1Bridge != address(0), "L1 WETH bridge address cannot be zero"); 53: require(_l1WethAddress != address(0), "L1 WETH token address cannot be zero"); 54: require(_l2WethAddress != address(0), "L2 WETH token address cannot be zero"); 70: require(_l2Token == l2WethAddress, "Only WETH can be withdrawn"); 71: require(_amount > 0, "Amount cannot be zero"); 97 require( 98 AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, 99 "Only L1 WETH bridge can call this function" 100: ); 102: require(_l1Token == l1WethAddress, "Only WETH can be deposited"); 103: require(msg.value == _amount, "Amount mismatch"); 122: require(msg.sender == l2WethAddress, "pd"); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L52), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L68), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L69), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L95-L98), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L100), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L101), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L120) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 28: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); 39: require(Utils.isContractConstructing(_hash), "Code hash is not for a contract on constructor"); 50: require(Utils.isContractConstructed(_hash), "Code hash is not for a constructed contract"); 59: require(Utils.isContractConstructing(codeHash), "Code hash is not for a contract on constructor"); ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L26), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L37), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L48), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L57) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 94: require(vInt == 27 || vInt == 28, "Invalid v value"); 193: require(vInt == 27 || vInt == 28, "Invalid v value"); 288: require(vInt == 27 || vInt == 28, "Invalid v value"); ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L92), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191), [288](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L286) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 24: require(msg.sender == FORCE_DEPLOYER, "Can only be called by FORCE_DEPLOYER"); 26: require(_delegateTo.code.length > 0, "Delegatee is an EOA"); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L24) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 63: require(dictionary.length % 8 == 0, "Dictionary length should be a multiple of 8"); 64: require(dictionary.length <= 2 ** 16 * 8, "Dictionary is too big"); 65 require( 66 encodedData.length * 4 == _bytecode.length, 67 "Encoded data length should be 4 times shorter than the original bytecode" 68: ); 72: require(indexOfEncodedChunk < dictionary.length, "Encoded chunk index is out of bounds"); 77: require(encodedChunk == realChunk, "Encoded chunk does not match the original bytecode"); 128: require(_enumerationIndexSize <= MAX_ENUMERATION_INDEX_SIZE, "enumeration index size is too large"); 149: require(derivedKey == _compressedStateDiffs.readBytes32(stateDiffPtr), "iw: initial key mismatch"); 165: require(numInitialWritesProcessed == numberOfInitialWrites, "Incorrect number of initial storage diffs"); 178: require(enumIndex == compressedEnumIndex, "rw: enum key mismatch"); 194: require(stateDiffPtr == _compressedStateDiffs.length, "Extra data in _compressedStateDiffs"); 237: require(convertedValue == _finalValue, "transform or no compression: compressed and final mismatch"); 239: require(_initialValue + convertedValue == _finalValue, "add: initial plus converted not equal to final"); 241: require(_initialValue - convertedValue == _finalValue, "sub: initial minus converted not equal to final"); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L62), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L63-L66), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L70), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L75), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L126), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L147), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L163), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L176), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L192), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L235), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L237), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L239) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 31: require(msg.sender == address(this), "Callable only by self"); 76 require( 77 _nonceOrdering == AccountNonceOrdering.Arbitrary && 78 currentInfo.nonceOrdering == AccountNonceOrdering.Sequential, 79 "It is only possible to change from sequential to arbitrary ordering" 80: ); 241 require( 242 msg.sender == FORCE_DEPLOYER || msg.sender == address(COMPLEX_UPGRADER_CONTRACT), 243 "Can only be called by FORCE_DEPLOYER or COMPLEX_UPGRADER_CONTRACT" 244: ); 253: require(msg.value == sumOfValues, "`value` provided is not equal to the combined `value`s of deployments"); 266: require(_bytecodeHash != bytes32(0x0), "BytecodeHash cannot be zero"); 267: require(uint160(_newAddress) > MAX_SYSTEM_CONTRACT_ADDRESS, "Can not deploy contracts in kernel space"); 270 require( 271 ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getCodeHash(uint256(uint160(_newAddress))) == 0x0, 272 "Code hash is non-zero" 273: ); 275: require(NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(_newAddress) == 0x00, "Account is occupied"); 306: require(knownCodeMarker > 0, "The code hash is not known"); 353: require(value == 0, "The value must be zero if we do not call the constructor"); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L29), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L74-L78), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L239-L242), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L251), [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L264), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L265), [270](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L268-L271), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L273), [306](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L304), [353](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L351) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 102: require(totalRequiredBalance <= address(this).balance, "Not enough balance for fee + value"); 164: require(_signature.length == 65, "Signature length is incorrect"); 177: require(v == 27 || v == 28, "v is neither 27 nor 28"); 188: require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "Invalid s"); 206: require(success, "Failed to pay the fee to the operator"); ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L100), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L162), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L186), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L204) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 37: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 23: require(msg.sender == address(COMPRESSOR_CONTRACT), "Callable only by the compressor"); 79: require(version == 1 && _bytecodeHash[1] == bytes1(0), "Incorrectly formatted bytecodeHash"); 81: require(Utils.bytecodeLenInWords(_bytecodeHash) % 2 == 1, "Code length in words must be odd"); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L21), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L77), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L79) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 208: require(numberOfL2ToL1Logs <= numberOfL2ToL1Logs, "Too many L2->L1 logs"); 221 require( 222 reconstructedChainedLogsHash == chainedLogsHash, 223 "reconstructedChainedLogsHash is not equal to chainedLogsHash" 224: ); 252 require( 253 reconstructedChainedMessagesHash == chainedMessagesHash, 254 "reconstructedChainedMessagesHash is not equal to chainedMessagesHash" 255: ); 276 require( 277 reconstructedChainedL1BytecodesRevealDataHash == chainedL1BytecodesRevealDataHash, 278 "reconstructedChainedL1BytecodesRevealDataHash is not equal to chainedL1BytecodesRevealDataHash" 279: ); 286 require( 287 uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) == 288 STATE_DIFF_COMPRESSION_VERSION_NUMBER, 289 "state diff compression version mismatch" 290: ); 305: require(calldataPtr <= MAX_ALLOWED_PUBDATA_PER_BATCH, "L1 Messenger pubdata is too long"); 322: require(calldataPtr == _totalL2ToL1PubdataAndStateDiffs.length, "Extra data in the totalL2ToL1Pubdata array"); ``` *GitHub*: [208](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L206), [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L219-L222), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L250-L253), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L274-L277), [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L284-L288), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L303), [322](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L320) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 35 require( 36 msg.sender == MSG_VALUE_SYSTEM_CONTRACT || 37 msg.sender == address(DEPLOYER_SYSTEM_CONTRACT) || 38 msg.sender == BOOTLOADER_FORMAL_ADDRESS, 39 "Only system contracts with special access can call this method" 40: ); 43: require(fromBalance >= _amount, "Transfer amount exceeds balance"); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L33-L38), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L41) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 41: require(to != address(this), "MsgValueSimulator calls itself"); ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L39) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 68: require(_value <= MAXIMAL_MIN_NONCE_INCREMENT, "The value for incrementing the nonce is too high"); 87: require(_value != 0, "Nonce value cannot be set to 0"); 91: require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 117: require(oldMinNonce == _expectedNonce, "Incorrect nonce"); 138: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), ""); ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L66), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L85), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L89), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L115), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L136) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 215: require(_isFirstInBatch, "Upgrade transaction must be first"); 218: require(_l2BlockNumber > 0, "L2 block number is never expected to be zero"); 222: require(correctPrevBlockHash == _expectedPrevL2BlockHash, "The previous L2 block hash is incorrect"); 260: require(_maxVirtualBlocksToCreate > 0, "Can't initialize the first virtual block"); 324 require( 325 _l2BlockTimestamp >= currentBatchTimestamp, 326 "The timestamp of the L2 block must be greater than or equal to the timestamp of the current batch" 327: ); 328: require(_maxVirtualBlocksToCreate > 0, "There must be a virtual block created at the start of the batch"); 340: require(!_isFirstInBatch, "Can not reuse L2 block number from the previous batch"); 341: require(currentL2BlockTimestamp == _l2BlockTimestamp, "The timestamp of the same L2 block must be same"); 342 require( 343 _expectedPrevL2BlockHash == _getLatest257L2blockHash(_l2BlockNumber - 1), 344 "The previous hash of the same L2 block must be same" 345: ); 346: require(_maxVirtualBlocksToCreate == 0, "Can not create virtual blocks in the middle of the miniblock"); 358: require(_expectedPrevL2BlockHash == pendingL2BlockHash, "The current L2 block hash is incorrect"); 359 require( 360 _l2BlockTimestamp > currentL2BlockTimestamp, 361 "The timestamp of the new L2 block must be greater than the timestamp of the previous L2 block" 362: ); 386: require(currentBatchNumber > 0, "The current batch number must be greater than 0"); 403 require( 404 _newTimestamp > currentBlockTimestamp, 405 "The timestamp of the batch must be greater than the timestamp of the previous block" 406: ); 425: require(_newTimestamp > previousBatchTimestamp, "Timestamps should be incremental"); 426: require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); ``` *GitHub*: [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L213), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L216), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L220), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L258), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L322-L325), [328](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L326), [340](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L338), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L339), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L340-L343), [346](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L344), [358](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L356), [359](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L357-L360), [386](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L384), [403](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L401-L404), [425](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L423), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L424) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 18 require( 19 SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender), 20 "This method require system call flag" 21: ); 28 require( 29 SystemContractHelper.isSystemContract(msg.sender), 30 "This method require the caller to be system contract" 31: ); 38: require(msg.sender == caller, "Inappropriate caller"); 45: require(msg.sender == BOOTLOADER_FORMAL_ADDRESS, "Callable only by the bootloader"); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L16-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L26-L29), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L36), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L43) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 40: require(returnData.length == 32, "keccak256 returned invalid data"); 49: require(returnData.length == 32, "sha returned invalid data"); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L38), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L47) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 337: require(index < 10, "There are only 10 accessible registers"); 367: require(precompileCallSuccess, "Failed to charge gas"); ``` *GitHub*: [337](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L335), [367](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L365) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 365: require(_transaction.paymasterInput.length >= 4, "The standard paymaster input must be at least 4 bytes long"); 369 require( 370 _transaction.paymasterInput.length >= 68, 371 "The approvalBased paymaster input must be at least 68 bytes long" 372: ); ``` *GitHub*: [365](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L363), [369](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L367-L370) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 23: require(_x <= type(uint128).max, "Overflow"); 29: require(_x <= type(uint32).max, "Overflow"); 35: require(_x <= type(uint24).max, "Overflow"); 86: require(_bytecode.length % 32 == 0, "po"); 89: require(bytecodeLenInWords < 2 ** 16, "pp"); // bytecode length must be less than 2^16 words 90: require(bytecodeLenInWords % 2 == 1, "pr"); // bytecode length in words must be odd ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L21), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L27), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L33), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L84), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L87), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L88) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 63 require( 64 address(this).balance >= amount, 65 "Address: insufficient balance" 66: ); 69 require( 70 success, 71 "Address: unable to send value, recipient may have reverted" 72: ); 157 require( 158 address(this).balance >= value, 159 "Address: insufficient balance for call" 160: ); 268: require(isContract(target), "Address: call to non-contract"); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L61-L64), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L67-L70), [157](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L155-L158), [268](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L266)
### [N‑37] Duplicated `require()`/`revert()` checks should be refactored to a modifier or function The compiler will inline the function, which will avoid `JUMP` instructions usually associated with functions *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 133: if (availableGetters.ignoreSymbol) revert(); ``` *GitHub*: [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 109: require(success, "Failed withdrawal"); ``` *GitHub*: [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L107) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 193: require(vInt == 27 || vInt == 28, "Invalid v value"); ``` *GitHub*: [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191) ### [N‑38] Error messages should descriptive, rather that cryptic The error message should clearly state _how_/_why_ something is an error, not just that a specific error state was reached; someone shouldn't have to read the code in order to see how to resolve the problem *There are 138 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 92: require(_l2TokenBeacon != address(0), "nf"); 93: require(_governor != address(0), "nh"); 95: require(_factoryDeps.length == 3, "mk"); 97: require(msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, "fee"); 186: require(_amount != 0, "2T"); // empty deposit amount 188: require(amount == _amount, "1T"); // The token has non-standard transfer logic 274: require(proofValid, "yn"); 277: require(amount > 0, "y1"); 302: require(!isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "pw"); 314: require(success, "nq"); 331: require(_l2ToL1message.length == 76, "kk"); 334: require(bytes4(functionSignature) == this.finalizeWithdrawal.selector, "nt"); 349: require(totalDepositedAmountPerUser[_l1Token][_depositor] + _amount <= limitData.depositCap, "d1"); ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L90-L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L91-L91), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L93-L93), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L95-L95), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L184-L184), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L186-L186), [274](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L272-L272), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L275-L275), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L300-L300), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L312-L312), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L329-L329), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L332-L332), [349](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L347-L347) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 256: require(success, "vq"); 313: require(msg.sender == l1WethAddress || msg.sender == address(zkSync), "pn"); ``` *GitHub*: [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L254-L254), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L311-L311) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 62: require(targetsLength == _accessModes.length, "yg"); // The size of arrays should be equal 94: require(callersLength == _targets.length, "yw"); 95: require(callersLength == _functionSigs.length, "yx"); 96: require(callersLength == _enables.length, "yy"); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L60-L60), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L92-L92), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L93-L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L94-L94) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 15: require(_allowList.canCall(msg.sender, address(this), msg.sig), "nr"); ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L13-L13) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 60: require(lockSlotOldValue == 0, "1B"); 77: require(_status == _NOT_ENTERED, "r1"); ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L58-L58), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L75-L75) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 25: require(_bytecode.length % 32 == 0, "pq"); 28: require(bytecodeLenInWords < 2**16, "pp"); // bytecode length must be less than 2^16 words 29: require(bytecodeLenInWords % 2 == 1, "ps"); // bytecode length in words must be odd 43: require(version == 1 && _bytecodeHash[1] == bytes1(0), "zf"); // Incorrectly formatted bytecodeHash 45: require(_bytecodeLen(_bytecodeHash) % 2 == 1, "uy"); // Code length in words must be odd ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L23-L23), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L26-L26), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L27-L27), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L41-L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L43-L43) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 58: require(address(_initalizeData.verifier) != address(0), "vt"); 59: require(_initalizeData.governor != address(0), "vy"); 60: require(_initalizeData.admin != address(0), "hc"); 61: require(_initalizeData.priorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "vu"); ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L56-L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L57-L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L58-L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L59-L59) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 16: require(_chainId == block.chainid, "pr"); 27: require(msg.data.length >= 4 || msg.data.length == 0, "Ut"); 32: require(facetAddress != address(0), "F"); // Proxy has no facet for this selector 33: require(!diamondStorage.isFrozen || !facet.isFreezable, "q1"); // Facet is frozen ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L14-L14), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25-L25), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L30-L30), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L31-L31) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 68: require(msg.sender == validator, "8h"); 125: require(block.timestamp >= commitBatchTimestamp + delay, "5c"); // The delay is not passed ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L66-L66), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L123-L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 33: require(msg.sender == pendingGovernor, "n4"); // Only proposed by current governor address can claim the governor rights 57: require(msg.sender == pendingAdmin, "n4"); // Only proposed by current admin address can claim the admin rights 86: require(_newPriorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "n5"); 114: require(!diamondStorage.isFrozen, "a9"); // diamond proxy is frozen already 125: require(diamondStorage.isFrozen, "a7"); // diamond proxy is not frozen ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L31-L31), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L55-L55), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L84-L84), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L112-L112), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L123-L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 21: require(msg.sender == s.governor, "1g"); // only by governor 33: require(s.validators[msg.sender], "1h"); // validator is not active ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L19-L19), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L31-L31) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 34: require(_newBatch.batchNumber == _previousBatch.batchNumber + 1, "f"); // only commit next batch 47: require(_previousBatch.batchHash == previousBatchHash, "l"); 49: require(expectedPriorityOperationsHash == _newBatch.priorityOperationsHash, "t"); 51: require(expectedNumberOfLayer1Txs == _newBatch.numberOfLayer1Txs, "ta"); 83: require(batchTimestamp == _expectedBatchTimestamp, "tb"); 87: require(_previousBatchTimestamp < batchTimestamp, "h3"); 95: require(block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER <= batchTimestamp, "h1"); // New batch timestamp is too small 96: require(lastL2BlockTimestamp <= block.timestamp + COMMIT_TIMESTAMP_APPROXIMATION_DELTA, "h2"); // The last L2 block timestamp is too big 132: require(!_checkBit(processedLogs, uint8(logKey)), "kp"); 158: require(logSender == L2_BOOTLOADER_ADDRESS, "bu"); 159: require(_expectedSystemContractUpgradeTxHash == logValue, "ut"); 155: require(logSender == L2_BOOTLOADER_ADDRESS, "bk"); 152: require(logSender == L2_BOOTLOADER_ADDRESS, "bl"); 149: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sv"); 146: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sc"); 143: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lb"); 140: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "ln"); 141: require(providedL2ToL1PubdataHash == logValue, "wp"); 137: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lm"); 171: require(processedLogs == 255, "b8"); 169: require(processedLogs == 127, "b7"); 186: require(s.storedBatchHashes[s.totalBatchesCommitted] == _hashStoredBatchInfo(_lastCommittedBatchData), "i"); // incorrect previous batch data 238: require(s.l2SystemContractsUpgradeBatchNumber == 0, "ik"); 277: require(currentBatchNumber == s.totalBatchesExecuted + _executedBatchIdx + 1, "k"); // Execute batches in order 278 require( 279 _hashStoredBatchInfo(_storedBatch) == s.storedBatchHashes[currentBatchNumber], 280 "exe10" // executing batch should be committed 281: ); 284: require(priorityOperationsHash == _storedBatch.priorityOperationsHash, "x"); // priority operations hash does not match to expected 302: require(newTotalBatchesExecuted <= s.totalBatchesVerified, "n"); // Can't execute batches more than committed and proven currently. 329: require(_hashStoredBatchInfo(_prevBatch) == s.storedBatchHashes[currentTotalBatchesVerified], "t1"); 334 require( 335 _hashStoredBatchInfo(_committedBatches[i]) == s.storedBatchHashes[currentTotalBatchesVerified], 336 "o1" 337: ); 348: require(currentTotalBatchesVerified <= s.totalBatchesCommitted, "q"); 361: require(successVerifyProof, "p"); // Proof verification fail 392: require(s.totalBatchesCommitted > _newLastBatch, "v1"); // The last committed batch is less than new last batch 393: require(_newLastBatch >= s.totalBatchesExecuted, "v2"); // Already executed batches cannot be reverted 446: require(_batch.systemLogs.length <= MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, "pu"); ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L32-L32), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L45-L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L47-L47), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L49-L49), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L81-L81), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L85-L85), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L93-L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L94-L94), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L130-L130), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L156-L156), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L157-L157), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L153-L153), [152](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L150-L150), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L147-L147), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L144-L144), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L141-L141), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L138-L138), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L139-L139), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L135-L135), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L169-L169), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L167-L167), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L184-L184), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L236-L236), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L275-L275), [278](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L276-L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L282-L282), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L300-L300), [329](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L327-L327), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L332-L335), [348](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L346-L346), [361](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L359-L359), [392](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L390-L390), [393](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L391-L391), [446](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L444-L444) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 162: require(ds.selectorToFacet[_selector].facetAddress != address(0), "g2"); ``` *GitHub*: [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L160-L160) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 121: require(callSuccess, "pz"); 131: require(_batchNumber <= s.totalBatchesExecuted, "xx"); 138: require(hashedLog != L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, "tw"); 201: require(!s.isEthWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "jj"); 212: require(proofValid, "pi"); // Failed to verify that withdrawal was actually initialized on L2 259: require(_l2GasPerPubdataByteLimit == REQUIRED_L2_GAS_PRICE_PER_PUBDATA, "qp"); 281: require(s.totalDepositedAmountPerUser[_depositor] + _amount <= limitData.depositCap, "d2"); 296: require(_factoryDeps.length <= MAX_NEW_FACTORY_DEPS, "uj"); 308: require(msg.value >= baseCost + _l2Value, "mv"); // The `msg.value` doesn't cover the transaction cost 423: require(_message.length >= 56, "pm"); 426: require(bytes4(functionSignature) == this.finalizeEthWithdrawal.selector, "is"); ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L119-L119), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L129-L129), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L136-L136), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L199-L199), [212](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L210-L210), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L257-L257), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L279-L279), [296](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L294-L294), [308](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L306-L306), [423](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L421-L421), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L424-L424) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 108: require(selectors.length > 0, "B"); // no functions for diamond cut 134: require(_facet != address(0), "G"); // facet with zero address cannot be added 143: require(oldFacet.facetAddress == address(0), "J"); // facet for this selector already exists 158: require(_facet != address(0), "K"); // cannot replace facet with zero address 164: require(oldFacet.facetAddress != address(0), "L"); // it is impossible to replace the facet with zero address 178: require(_facet == address(0), "a1"); // facet address must be zero 184: require(oldFacet.facetAddress != address(0), "a2"); // Can't delete a non-existent facet 222: require(_isSelectorFreezable == ds.selectorToFacet[selector0].isFreezable, "J1"); 304: require(data.length == 32, "lp"); 305: require(abi.decode(data, (bytes32)) == DIAMOND_INIT_SUCCESS_RETURN_VALUE, "lp1"); 287: require(_calldata.length == 0, "H"); // Non-empty calldata for zero address ``` *GitHub*: [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L106-L106), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L132-L132), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L141-L141), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L156-L156), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L162-L162), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L176-L176), [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L182-L182), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L220-L220), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L302-L302), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L303-L303), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L285-L285) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 26: require(pathLength > 0, "xc"); 27: require(pathLength < 256, "bt"); 28: require(_index < (1 << pathLength), "px"); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L24-L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L25-L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L26-L26) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 67: require(!_queue.isEmpty(), "D"); // priority queue is empty 75: require(!_queue.isEmpty(), "s"); // priority queue is empty ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L65-L65), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L73-L73) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 32: require(l2GasForTxBody <= _priorityTxMaxGasLimit, "ui"); 34: require(l2GasForTxBody / _transaction.gasPerPubdataByteLimit <= PRIORITY_TX_MAX_PUBDATA, "uk"); 38 require( 39 getMinimalPriorityTransactionGasLimit( 40 _encoded.length, 41 _transaction.factoryDeps.length, 42 _transaction.gasPerPubdataByteLimit 43 ) <= _transaction.gasLimit, 44 "up" 45: ); 52: require(_transaction.from <= type(uint16).max, "ua"); 53: require(_transaction.to <= type(uint160).max, "ub"); 54: require(_transaction.paymaster == 0, "uc"); 55: require(_transaction.value == 0, "ud"); 56: require(_transaction.reserved[0] == 0, "ue"); 57: require(_transaction.reserved[1] <= type(uint160).max, "uf"); 58: require(_transaction.reserved[2] == 0, "ug"); 59: require(_transaction.reserved[3] == 0, "uo"); 60: require(_transaction.signature.length == 0, "uh"); 61: require(_transaction.paymasterInput.length == 0, "ul"); 62: require(_transaction.reservedDynamic.length == 0, "um"); 119: require(_totalGasLimit >= overhead, "my"); // provided gas limit doesn't cover transaction overhead ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L30-L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L32-L32), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L36-L43), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L50-L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L51-L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L52-L52), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L53-L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L54-L54), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L55-L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L56-L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L57-L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L58-L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L59-L59), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L60-L60), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L117-L117) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 47: require(_l1Bridge != address(0), "bf"); 48: require(_l2TokenProxyBytecodeHash != bytes32(0), "df"); 49: require(_governor != address(0), "sf"); 73: require(AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, "mq"); 84: require(currentL1Token == _l1Token, "gg"); // Double check that the expected value equal to real one 81: require(deployedToken == expectedL2Token, "mt"); 115: require(l1Token != address(0), "yh"); 161: require(success, "mk"); ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L45-L45), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L46-L46), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L47-L47), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L71-L71), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L82-L82), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L79-L79), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L113-L113), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L159-L159) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 49: require(_l1Address != address(0), "in6"); // Should be non-zero address 103: require(msg.sender == l2Bridge, "xnt"); // Only L2 bridge can call this method ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L47-L47), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L101-L101) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 122: require(msg.sender == l2WethAddress, "pd"); ``` *GitHub*: [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 23: require(_x <= type(uint128).max, "Overflow"); 29: require(_x <= type(uint32).max, "Overflow"); 35: require(_x <= type(uint24).max, "Overflow"); 86: require(_bytecode.length % 32 == 0, "po"); 89: require(bytecodeLenInWords < 2 ** 16, "pp"); // bytecode length must be less than 2^16 words 90: require(bytecodeLenInWords % 2 == 1, "pr"); // bytecode length in words must be odd ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L21-L21), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L27-L27), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L33-L33), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L84-L84), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L87-L87), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L88-L88)
### [N‑39] Event is not properly `indexed` Index event fields make the field more quickly accessible [to off-chain tools](https://ethereum.stackexchange.com/questions/40396/can-somebody-please-explain-the-concept-of-event-indexing) that parse events. This is especially useful when it comes to filtering based on an address. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields). Where applicable, each `event` should use three `indexed` fields if there are three or more fields, and gas usage is not particularly of concern for the events in question. If there are fewer than three applicable fields, all of the applicable fields should be indexed. *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 76: event ChangeSecurityCouncil(address _securityCouncilBefore, address _securityCouncilAfter); ``` *GitHub*: [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L74) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 32: event NewValidator(address _oldValidator, address _newValidator); ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L30) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 144 event NewPriorityRequest( 145 uint256 txId, 146 bytes32 txHash, 147 uint64 expirationTimestamp, 148 L2CanonicalTransaction transaction, 149 bytes[] factoryDeps 150: ); ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L142-L148) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 25: event DiamondCut(FacetCut[] facetCuts, address initAddress, bytes initCalldata); ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L23) ### [N‑40] Events are missing sender information When an action is triggered based on a user's action, not being able to filter based on who triggered the action makes event processing a lot more cumbersome. Including the `msg.sender` the events of these types of action will make events much more useful to end users, especially when `msg.sender` is not `tx.origin`. *There are 53 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 321: emit WithdrawalFinalized(l1Receiver, l1Token, amount); ``` *GitHub*: [321](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L319-L319) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 269: emit WithdrawalFinalized(l1WethWithdrawReceiver, l1WethAddress, amount); 314: emit EthReceived(msg.value); ``` *GitHub*: [269](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L267-L267), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L312-L312) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 75: emit UpdateAccessMode(_target, accessMode, _accessMode); 123: emit UpdateCallPermission(_caller, _target, _functionSig, _enable); ``` *GitHub*: [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L73-L73), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L121-L121) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 49: emit ChangeSecurityCouncil(address(0), _securityCouncil); 52: emit ChangeMinDelay(0, _minDelay); 134: emit TransparentOperationScheduled(id, _delay, _operation); 146: emit ShadowOperationScheduled(_id, _delay); 159: emit OperationCancelled(_id); 182: emit OperationExecuted(id); 201: emit OperationExecuted(id); 252: emit ChangeMinDelay(minDelay, _newDelay); 259: emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L47-L47), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L50-L50), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L132-L132), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L144-L144), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L157-L157), [182](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L180-L180), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L199-L199), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L250-L250), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L257-L257) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 91: emit NewL2DefaultAccountBytecodeHash(previousDefaultAccountBytecodeHash, _l2DefaultAccountBytecodeHash); 108: emit NewL2BootloaderBytecodeHash(previousBootloaderBytecodeHash, _l2BootloaderBytecodeHash); 124: emit NewVerifier(address(oldVerifier), address(_newVerifier)); 140: emit NewVerifierParams(oldVerifierParams, _newVerifierParams); 231: emit NewProtocolVersion(previousProtocolVersion, _newProtocolVersion); 243: emit NewAllowList(address(oldAllowList), address(_newAllowList)); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L89-L89), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L106-L106), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L122-L122), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L138-L138), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L229-L229), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L241-L241) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 45: emit UpgradeComplete(_proposedUpgrade.newProtocolVersion, txHash, _proposedUpgrade); ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L43-L43) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 57: emit NewValidator(oldValidator, _newValidator); 63: emit NewExecutionDelay(_executionDelay); ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L55-L55), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L61-L61) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 27: emit NewPendingGovernor(oldPendingGovernor, _newPendingGovernor); 39: emit NewPendingGovernor(pendingGovernor, address(0)); 40: emit NewGovernor(previousGovernor, pendingGovernor); 51: emit NewPendingGovernor(oldPendingAdmin, _newPendingAdmin); 63: emit NewPendingAdmin(pendingAdmin, address(0)); 64: emit NewAdmin(previousAdmin, pendingAdmin); 72: emit ValidatorStatusUpdate(_validator, _active); 80: emit IsPorterAvailableStatusUpdate(_zkPorterIsAvailable); 90: emit NewPriorityTxMaxGasLimit(oldPriorityTxMaxGasLimit, _newPriorityTxMaxGasLimit); 102: emit ExecuteUpgrade(_diamondCut); 117: emit Freeze(); 128: emit Unfreeze(); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L25-L25), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L37-L37), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L38-L38), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L49-L49), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L61-L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L62-L62), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L70-L70), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L78-L78), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L88-L88), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L100-L100), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L115-L115), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L126-L126) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 215 emit BlockCommit( 216 _lastCommittedBatchData.batchNumber, 217 _lastCommittedBatchData.batchHash, 218 _lastCommittedBatchData.commitment 219: ); 253 emit BlockCommit( 254 _lastCommittedBatchData.batchNumber, 255 _lastCommittedBatchData.batchHash, 256 _lastCommittedBatchData.commitment 257: ); 297: emit BlockExecution(_batchesData[i].batchNumber, _batchesData[i].batchHash, _batchesData[i].commitment); 364: emit BlocksVerification(s.totalBatchesVerified, currentTotalBatchesVerified); 406: emit BlocksRevert(s.totalBatchesCommitted, s.totalBatchesVerified, s.totalBatchesExecuted); ``` *GitHub*: [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L213-L217), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L251-L255), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L295-L295), [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L362-L362), [406](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L404-L404) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 217: emit EthWithdrawalFinalized(_l1WithdrawReceiver, _amount); 380 emit NewPriorityRequest( 381 _priorityOpParams.txId, 382 canonicalTxHash, 383 _priorityOpParams.expirationTimestamp, 384 transaction, 385 _factoryDeps 386: ); ``` *GitHub*: [217](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L215-L215), [380](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L378-L384) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 122: emit DiamondCut(facetCuts, initAddress, initCalldata); ``` *GitHub*: [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 99: emit BridgeInitialize(_l1Address, decodedName, decodedSymbol, decimals_); 113: emit BridgeMint(_to, _amount); 122: emit BridgeBurn(_from, _amount); ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L97-L97), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L111-L111), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 48: emit Initialize(name_, symbol_, 18); 86: emit BridgeBurn(_from, _amount); ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L46-L46), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L84-L84) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 123: emit EthReceived(msg.value); ``` *GitHub*: [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L121-L121) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 62: emit MarkedAsKnown(_bytecodeHash, _shouldSendToL1); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L60-L60) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 117: emit L2ToL1LogSent(_l2ToL1Log); 188: emit BytecodeL1PublicationRequested(_bytecodeHash); ``` *GitHub*: [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L115-L115), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L186-L186) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 69: emit Mint(_account, _amount); ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L67-L67)
### [N‑41] Events may be emitted out of order due to reentrancy Ensure that events follow the best practice of check-effects-interaction, and are emitted before external calls *There are 12 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit safeTransfer() prior to emission 286: emit ClaimedFailedDeposit(_depositSender, _l1Token, amount); /// @audit safeTransfer() prior to emission 321: emit WithdrawalFinalized(l1Receiver, l1Token, amount); ``` *GitHub*: [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L284-L284), [321](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L319-L319) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit safeTransferFrom() prior to emission 197: emit DepositInitiated(txHash, msg.sender, _l2Receiver, _l1Token, _amount); /// @audit finalizeEthWithdrawal() prior to emission 269: emit WithdrawalFinalized(l1WethWithdrawReceiver, l1WethAddress, amount); ``` *GitHub*: [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L195-L195), [269](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L267-L267) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit bridgeMint() prior to emission 89: emit FinalizeDeposit(_l1Sender, _l2Receiver, expectedL2Token, _amount); /// @audit bridgeBurn() prior to emission 120: emit WithdrawalInitiated(msg.sender, _l1Receiver, _l2Token, _amount); ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L87-L87), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L118-L118) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit decodeString() prior to emission 99: emit BridgeInitialize(_l1Address, decodedName, decodedSymbol, decimals_); ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L97-L97) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit bridgeBurn() prior to emission 82: emit WithdrawalInitiated(msg.sender, _l1Receiver, l2WethAddress, _amount); /// @audit bridgeBurn() prior to emission 108: emit FinalizeDeposit(_l1Sender, _l2Receiver, l2WethAddress, _amount); ``` *GitHub*: [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L80-L80), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L106-L106) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit requestBytecodeL1Publication() prior to emission 62: emit MarkedAsKnown(_bytecodeHash, _shouldSendToL1); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L60-L60) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit sendToL1() prior to emission 81: emit Withdrawal(msg.sender, _l1Receiver, amount); /// @audit sendToL1() prior to emission 94: emit WithdrawalWithMessage(msg.sender, _l1Receiver, amount, _additionalData); ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L79-L79), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L92-L92)
### [N‑42] Events should use parameters to convey information For example, rather than using `event Paused()` and `event Unpaused()`, use `event PauseState(address indexed whoChangedIt, bool wasPaused, bool isNowPaused)` *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 59: event Freeze(); 62: event Unfreeze(); ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L57-L57), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L60-L60) ### [N‑43] Events that mark critical parameter changes should contain both the old and the new value This should especially be done if the new value is not required to be different from the old value *There are 8 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit updateDelay() 252: emit ChangeMinDelay(minDelay, _newDelay); /// @audit updateSecurityCouncil() 259: emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); ``` *GitHub*: [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L250), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L257) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit setExecutionDelay() 63: emit NewExecutionDelay(_executionDelay); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L61) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol /// @audit setValidator() 72: emit ValidatorStatusUpdate(_validator, _active); /// @audit setPorterAvailability() 80: emit IsPorterAvailableStatusUpdate(_zkPorterIsAvailable); ``` *GitHub*: [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L70), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L78) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit updateAccountVersion() 67: emit AccountVersionUpdated(msg.sender, _version); /// @audit updateNonceOrdering() 85: emit AccountNonceOrderingUpdated(msg.sender, _nonceOrdering); ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L65), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L83) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit setValueUnderNonce() 98: emit ValueSetUnderNonce(msg.sender, _key, _value); ``` *GitHub*: [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L96) ### [N‑44] Expressions for constant values should use `immutable` rather than `constant` While it does not save gas for some simple binary expressions because the compiler knows that developers often make this mistake, it's still best to use the right tool for the task at hand. There is a difference between `constant` variables and `immutable` variables, and they should each be used in their appropriate contexts. `constants` should be used for literal values written into the code, and `immutable` variables should be used for expressions, or values calculated in, or passed into the constructor. *There are 79 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/L2ContractAddresses.sol 8: address constant L2_DEPLOYER_SYSTEM_CONTRACT_ADDR = address(0x8006); 17: address constant L2_FORCE_DEPLOYER_ADDR = address(0x8007); 20: address constant L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR = address(0x8008); 23: address constant L2_BOOTLOADER_ADDRESS = address(0x8001); 26: address constant L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR = address(0x800a); 29: address constant L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR = address(0x8004); 32: address constant L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR = address(0x800b); 35: address constant L2_BYTECODE_COMPRESSOR_SYSTEM_CONTRACT_ADDR = address(0x800e); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L6-L6), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L15-L15), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L18-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L21-L21), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L24-L24), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L27-L27), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L30-L30), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L33-L33) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 14: bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2"); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L12-L12) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 24: uint256 internal constant EXECUTED_PROPOSAL_TIMESTAMP = uint256(1); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 24: uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 16: uint256 constant MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES = 4 + L2_TO_L1_LOG_SERIALIZE_SIZE * 512; 28: uint256 constant MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES = 4 + INITIAL_STORAGE_CHANGE_SERIALIZE_SIZE * 4765; 35: uint256 constant MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES = 4 + REPEATED_STORAGE_CHANGE_SERIALIZE_SIZE * 7564; 38: bytes32 constant DEFAULT_L2_LOGS_TREE_ROOT_HASH = bytes32(0); 90: uint256 constant BATCH_OVERHEAD_PUBDATA = BATCH_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE; ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L14-L14), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L33-L33), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L36-L36), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L88-L88) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 27: address constant ECRECOVER_SYSTEM_CONTRACT = address(0x01); 28: address constant SHA256_SYSTEM_CONTRACT = address(0x02); 29: address constant ECADD_SYSTEM_CONTRACT = address(0x06); 30: address constant ECMUL_SYSTEM_CONTRACT = address(0x07); 37: uint256 constant CURRENT_MAX_PRECOMPILE_ADDRESS = uint256(uint160(SHA256_SYSTEM_CONTRACT)); 39: address payable constant BOOTLOADER_FORMAL_ADDRESS = payable(address(SYSTEM_CONTRACTS_OFFSET + 0x01)); 40 IAccountCodeStorage constant ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT = IAccountCodeStorage( 41 address(SYSTEM_CONTRACTS_OFFSET + 0x02) 42: ); 43: INonceHolder constant NONCE_HOLDER_SYSTEM_CONTRACT = INonceHolder(address(SYSTEM_CONTRACTS_OFFSET + 0x03)); 44: IKnownCodesStorage constant KNOWN_CODE_STORAGE_CONTRACT = IKnownCodesStorage(address(SYSTEM_CONTRACTS_OFFSET + 0x04)); 45 IImmutableSimulator constant IMMUTABLE_SIMULATOR_SYSTEM_CONTRACT = IImmutableSimulator( 46 address(SYSTEM_CONTRACTS_OFFSET + 0x05) 47: ); 48: IContractDeployer constant DEPLOYER_SYSTEM_CONTRACT = IContractDeployer(address(SYSTEM_CONTRACTS_OFFSET + 0x06)); 52: address constant FORCE_DEPLOYER = address(SYSTEM_CONTRACTS_OFFSET + 0x07); 53: IL1Messenger constant L1_MESSENGER_CONTRACT = IL1Messenger(address(SYSTEM_CONTRACTS_OFFSET + 0x08)); 54: address constant MSG_VALUE_SYSTEM_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x09); 56: IEthToken constant ETH_TOKEN_SYSTEM_CONTRACT = IEthToken(address(SYSTEM_CONTRACTS_OFFSET + 0x0a)); 58: address constant KECCAK256_SYSTEM_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x10); 60: ISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(payable(address(SYSTEM_CONTRACTS_OFFSET + 0x0b))); 62: IBootloaderUtilities constant BOOTLOADER_UTILITIES = IBootloaderUtilities(address(SYSTEM_CONTRACTS_OFFSET + 0x0c)); 64: address constant EVENT_WRITER_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x0d); 66: ICompressor constant COMPRESSOR_CONTRACT = ICompressor(address(SYSTEM_CONTRACTS_OFFSET + 0x0e)); 68: IComplexUpgrader constant COMPLEX_UPGRADER_CONTRACT = IComplexUpgrader(address(SYSTEM_CONTRACTS_OFFSET + 0x0f)); 75: uint256 constant MAX_MSG_VALUE = 2 ** 128 - 1; 114: uint256 constant COMPRESSED_INITIAL_WRITE_SIZE = DERIVED_KEY_LENGTH + VALUE_LENGTH; 116: uint256 constant COMPRESSED_REPEATED_WRITE_SIZE = ENUM_INDEX_LENGTH + VALUE_LENGTH; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L25-L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L26-L26), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L27-L27), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L28-L28), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L37-L37), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L38-L40), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L41-L41), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L42-L42), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L43-L45), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L46-L46), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L50-L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L51-L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L52-L52), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L56-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L58-L58), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L60-L60), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L62-L62), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L64-L64), [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L66-L66), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L73-L73), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L112-L112), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L114-L114) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 30: uint256 constant DEPLOY_NONCE_MULTIPLIER = 2 ** 128; 33: uint256 constant MAXIMAL_MIN_NONCE_INCREMENT = 2 ** 32; ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L28-L28), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L31-L31) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 9: bytes4 constant ACCOUNT_VALIDATION_SUCCESS_MAGIC = IAccount.validateTransaction.selector; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 14: bytes4 constant PAYMASTER_VALIDATION_SUCCESS_MAGIC = IPaymaster.validateAndPayForPaymasterTransaction.selector; ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 14: address constant TO_L1_CALL_ADDRESS = address((1 << 16) - 1); 15: address constant CODE_ADDRESS_CALL_ADDRESS = address((1 << 16) - 2); 16: address constant PRECOMPILE_CALL_ADDRESS = address((1 << 16) - 3); 17: address constant META_CALL_ADDRESS = address((1 << 16) - 4); 18: address constant MIMIC_CALL_CALL_ADDRESS = address((1 << 16) - 5); 19: address constant SYSTEM_MIMIC_CALL_CALL_ADDRESS = address((1 << 16) - 6); 20: address constant MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 7); 21: address constant SYSTEM_MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 8); 22: address constant RAW_FAR_CALL_CALL_ADDRESS = address((1 << 16) - 9); 23: address constant RAW_FAR_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 10); 24: address constant SYSTEM_CALL_CALL_ADDRESS = address((1 << 16) - 11); 25: address constant SYSTEM_CALL_BY_REF_CALL_ADDRESS = address((1 << 16) - 12); 26: address constant SET_CONTEXT_VALUE_CALL_ADDRESS = address((1 << 16) - 13); 27: address constant SET_PUBDATA_PRICE_CALL_ADDRESS = address((1 << 16) - 14); 28: address constant INCREMENT_TX_COUNTER_CALL_ADDRESS = address((1 << 16) - 15); 29: address constant PTR_CALLDATA_CALL_ADDRESS = address((1 << 16) - 16); 30: address constant CALLFLAGS_CALL_ADDRESS = address((1 << 16) - 17); 31: address constant PTR_RETURNDATA_CALL_ADDRESS = address((1 << 16) - 18); 32: address constant EVENT_INITIALIZE_ADDRESS = address((1 << 16) - 19); 33: address constant EVENT_WRITE_ADDRESS = address((1 << 16) - 20); 34: address constant LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS = address((1 << 16) - 21); 35: address constant LOAD_LATEST_RETURNDATA_INTO_ACTIVE_PTR_CALL_ADDRESS = address((1 << 16) - 22); 36: address constant PTR_ADD_INTO_ACTIVE_CALL_ADDRESS = address((1 << 16) - 23); 37: address constant PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS = address((1 << 16) - 24); 38: address constant PTR_PACK_INTO_ACTIVE_CALL_ADDRESS = address((1 << 16) - 25); 39: address constant MULTIPLICATION_HIGH_ADDRESS = address((1 << 16) - 26); 40: address constant GET_EXTRA_ABI_DATA_ADDRESS = address((1 << 16) - 27); 43: uint256 constant META_GAS_PER_PUBDATA_BYTE_OFFSET = 0 * 8; 44: uint256 constant META_HEAP_SIZE_OFFSET = 8 * 8; 45: uint256 constant META_AUX_HEAP_SIZE_OFFSET = 12 * 8; 46: uint256 constant META_SHARD_ID_OFFSET = 28 * 8; 47: uint256 constant META_CALLER_SHARD_ID_OFFSET = 29 * 8; 48: uint256 constant META_CODE_SHARD_ID_OFFSET = 30 * 8; ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L17-L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L18-L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L19-L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L20-L20), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L21-L21), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L22-L22), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L23-L23), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L24-L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L25-L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L26-L26), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L27-L27), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L28-L28), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L29-L29), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L30-L30), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L31-L31), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L32-L32), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L33-L33), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L34-L34), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L35-L35), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L36-L36), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L37-L37), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L38-L38), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L41-L41), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L42-L42), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L43-L43), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L44-L44), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L45-L45), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 84: bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId)"); 86 bytes32 constant EIP712_TRANSACTION_TYPE_HASH = 87 keccak256( 88 "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 89: ); ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L82-L82), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L84-L87)
### [N‑45] High cyclomatic complexity Consider breaking down these blocks into more manageable units, by splitting things into utility functions, by reducing nesting, and by using early returns *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109 bytes32 previousBatchHash, 110 bytes32 stateDiffHash, 111 bytes32 l2LogsTreeRoot, 112 uint256 packedBatchAndL2BlockTimestamp 113 ) 114 { 115 // Copy L2 to L1 logs into memory. 116 bytes memory emittedL2Logs = _newBatch.systemLogs; 117 118 // Used as bitmap to set/check log processing happens exactly once. 119 // See SystemLogKey enum in Constants.sol for ordering. 120 uint256 processedLogs; 121 122 bytes32 providedL2ToL1PubdataHash = keccak256(_newBatch.totalL2ToL1Pubdata); 123 124 // linear traversal of the logs 125 for (uint256 i = 0; i < emittedL2Logs.length; i = i.uncheckedAdd(L2_TO_L1_LOG_SERIALIZE_SIZE)) { 126 // Extract the values to be compared to/used such as the log sender, key, and value 127 (address logSender, ) = UnsafeBytes.readAddress(emittedL2Logs, i + L2_LOG_ADDRESS_OFFSET); 128 (uint256 logKey, ) = UnsafeBytes.readUint256(emittedL2Logs, i + L2_LOG_KEY_OFFSET); 129 (bytes32 logValue, ) = UnsafeBytes.readBytes32(emittedL2Logs, i + L2_LOG_VALUE_OFFSET); 130 131 // Ensure that the log hasn't been processed already 132 require(!_checkBit(processedLogs, uint8(logKey)), "kp"); 133 processedLogs = _setBit(processedLogs, uint8(logKey)); 134 135 // Need to check that each log was sent by the correct address. 136 if (logKey == uint256(SystemLogKey.L2_TO_L1_LOGS_TREE_ROOT_KEY)) { 137 require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lm"); 138 l2LogsTreeRoot = logValue; 139 } else if (logKey == uint256(SystemLogKey.TOTAL_L2_TO_L1_PUBDATA_KEY)) { 140 require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "ln"); 141 require(providedL2ToL1PubdataHash == logValue, "wp"); 142 } else if (logKey == uint256(SystemLogKey.STATE_DIFF_HASH_KEY)) { 143 require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lb"); 144 stateDiffHash = logValue; 145 } else if (logKey == uint256(SystemLogKey.PACKED_BATCH_AND_L2_BLOCK_TIMESTAMP_KEY)) { 146 require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sc"); 147 packedBatchAndL2BlockTimestamp = uint256(logValue); 148 } else if (logKey == uint256(SystemLogKey.PREV_BATCH_HASH_KEY)) { 149 require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sv"); 150 previousBatchHash = logValue; 151 } else if (logKey == uint256(SystemLogKey.CHAINED_PRIORITY_TXN_HASH_KEY)) { 152 require(logSender == L2_BOOTLOADER_ADDRESS, "bl"); 153 chainedPriorityTxsHash = logValue; 154 } else if (logKey == uint256(SystemLogKey.NUMBER_OF_LAYER_1_TXS_KEY)) { 155 require(logSender == L2_BOOTLOADER_ADDRESS, "bk"); 156 numberOfLayer1Txs = uint256(logValue); 157 } else if (logKey == uint256(SystemLogKey.EXPECTED_SYSTEM_CONTRACT_UPGRADE_TX_HASH_KEY)) { 158 require(logSender == L2_BOOTLOADER_ADDRESS, "bu"); 159 require(_expectedSystemContractUpgradeTxHash == logValue, "ut"); 160 } else { 161 revert("ul"); 162 } 163 } 164 165 // We only require 7 logs to be checked, the 8th is if we are expecting a protocol upgrade 166 // Without the protocol upgrade we expect 7 logs: 2^7 - 1 = 127 167 // With the protocol upgrade we expect 8 logs: 2^8 - 1 = 255 168 if (_expectedSystemContractUpgradeTxHash == bytes32(0)) { 169 require(processedLogs == 127, "b7"); 170 } else { 171 require(processedLogs == 255, "b8"); 172 } 173: } ``` *GitHub*: [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L101-L171) ### [N‑46] Import declarations should import specific identifiers, rather than the whole file Using import declarations of the form `import {} from "some/file.sol"` avoids polluting the symbol namespace making flattened files smaller, and speeds up compilation (but does not save any gas) *There are 124 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 7: import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; 8: import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; 10: import "./interfaces/IL1BridgeLegacy.sol"; 11: import "./interfaces/IL1Bridge.sol"; 12: import "./interfaces/IL2Bridge.sol"; 13: import "./interfaces/IL2ERC20Bridge.sol"; 15: import "./libraries/BridgeInitializationHelper.sol"; 17: import "../zksync/interfaces/IZkSync.sol"; 18: import "../common/interfaces/IAllowList.sol"; 19: import "../common/AllowListed.sol"; 20: import "../common/libraries/UnsafeBytes.sol"; 21: import "../common/libraries/L2ContractHelper.sol"; 22: import "../common/ReentrancyGuard.sol"; 23: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L20), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L21) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 7: import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; 9: import "./interfaces/IL1Bridge.sol"; 10: import "./interfaces/IL2WethBridge.sol"; 11: import "./interfaces/IL2Bridge.sol"; 12: import "./interfaces/IWETH9.sol"; 13: import "../zksync/interfaces/IZkSync.sol"; 14: import "../common/interfaces/IAllowList.sol"; 16: import "./libraries/BridgeInitializationHelper.sol"; 18: import "../common/AllowListed.sol"; 19: import "../common/libraries/UnsafeBytes.sol"; 20: import "../common/ReentrancyGuard.sol"; 21: import "../common/libraries/L2ContractHelper.sol"; 23: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L21) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 7: import "../../zksync/interfaces/IZkSync.sol"; 8: import "../../vendor/AddressAliasHelper.sol"; 9: import "../../common/libraries/L2ContractHelper.sol"; 11: import "../../common/interfaces/IL2ContractDeployer.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L9) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 7: import "@openzeppelin/contracts/access/Ownable2Step.sol"; 9: import "./interfaces/IAllowList.sol"; 10: import "./libraries/UncheckedMath.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L8) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 7: import "./interfaces/IAllowList.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L5) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 7: import "../zksync/facets/Base.sol"; 8: import "../zksync/interfaces/IMailbox.sol"; 9: import "../zksync/interfaces/IVerifier.sol"; 10: import "../common/libraries/L2ContractHelper.sol"; 11: import "../zksync/libraries/TransactionValidator.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L9) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 7: import "../zksync/libraries/Diamond.sol"; 8: import "./BaseZkSyncUpgrade.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L6) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 7: import "./../zksync/interfaces/IVerifier.sol"; 8: import "../common/interfaces/IAllowList.sol"; 9: import "./libraries/PriorityQueue.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L7) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 7: import "@openzeppelin/contracts/access/Ownable2Step.sol"; 8: import "./libraries/LibMap.sol"; 9: import "./interfaces/IExecutor.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L7) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 7: import "../interfaces/IAdmin.sol"; 8: import "../libraries/Diamond.sol"; 9: import "../../common/libraries/L2ContractHelper.sol"; 11: import "./Base.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L9) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 7: import "../Storage.sol"; 8: import "../../common/ReentrancyGuard.sol"; 9: import "../../common/AllowListed.sol"; 11: import "@openzeppelin/contracts/access/Ownable.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L9) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 7: import "./Base.sol"; 8: import "../libraries/Diamond.sol"; 9: import "../libraries/PriorityQueue.sol"; 10: import "../../common/libraries/UncheckedMath.sol"; 11: import "../interfaces/IGetters.sol"; 12: import "../interfaces/ILegacyGetters.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L10) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 7: import "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L5) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 7: import "../libraries/PriorityQueue.sol"; 9: import "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L7) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 7: import "../libraries/PriorityQueue.sol"; 8: import "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L6) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 8: import "./IBase.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L6) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 7: import "./IMailbox.sol"; 8: import "./IAdmin.sol"; 9: import "./IExecutor.sol"; 10: import "./IGetters.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L8) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 7: import "@openzeppelin/contracts/utils/math/SafeCast.sol"; 8: import "../../common/libraries/UncheckedMath.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L6) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 7: import "../../common/libraries/UncheckedMath.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L5) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 7: import "@openzeppelin/contracts/utils/math/Math.sol"; 9: import "../interfaces/IMailbox.sol"; 10: import "../Config.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L8) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 7: import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; 8: import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; 10: import "./interfaces/IL1Bridge.sol"; 11: import "./interfaces/IL2Bridge.sol"; 12: import "./interfaces/IL2StandardToken.sol"; 14: import "./L2StandardERC20.sol"; 15: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L13) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 7: import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol"; 8: import "./interfaces/IL2StandardToken.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 7: import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol"; 9: import "./interfaces/IL2Weth.sol"; 10: import "./interfaces/IL2StandardToken.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L8) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 7: import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; 9: import "./interfaces/IL2Bridge.sol"; 10: import "./interfaces/IL2Weth.sol"; 11: import "./interfaces/IL2StandardToken.sol"; 14: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L9), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L12) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 7: import "./interfaces/IAccountCodeStorage.sol"; 8: import "./libraries/Utils.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 7: import "./interfaces/IBootloaderUtilities.sol"; 8: import "./libraries/TransactionHelper.sol"; 9: import "./libraries/RLPEncoder.sol"; 10: import "./libraries/EfficientCall.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L8) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 7: import "./interfaces/IAccount.sol"; 8: import "./libraries/TransactionHelper.sol"; 9: import "./libraries/SystemContractHelper.sol"; 10: import "./libraries/EfficientCall.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L8) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 7: import "./interfaces/IImmutableSimulator.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 7: import "./libraries/Utils.sol"; 8: import "./libraries/EfficientCall.sol"; 9: import "./interfaces/ISystemContract.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L7) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 7: import "./interfaces/INonceHolder.sol"; 8: import "./interfaces/IContractDeployer.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 7: import "../libraries/TransactionHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 7: import "../libraries/TransactionHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 7: import "../libraries/TransactionHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 7: import "./SystemContractHelper.sol"; 8: import "./Utils.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 8: import "./Utils.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 7: import "../openzeppelin/token/ERC20/IERC20.sol"; 8: import "../openzeppelin/token/ERC20/utils/SafeERC20.sol"; 10: import "../interfaces/IPaymasterFlow.sol"; 11: import "../interfaces/IContractDeployer.sol"; 13: import "./RLPEncoder.sol"; 14: import "./EfficientCall.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L9), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L12) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 6: import "./EfficientCall.sol"; ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L4)
### [N‑47] Imports could be organized more systematically The contract's interface should be imported first, followed by each of the interfaces it uses, followed by all other files. The examples below do not follow this layout. *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 11: import "../../common/interfaces/IL2ContractDeployer.sol"; ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 8: import "../zksync/interfaces/IMailbox.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 18: import {IAllowList} from "../../common/interfaces/IAllowList.sol"; ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L16-L16) ### [N‑48] Inconsistent method of specifying a floating pragma Some files use `>=`, some use `^`. The instances below are examples of the method that has the fewest instances for a specific version. Note that using `>=` without also specifying `<=` will lead to failures to compile, or external project incompatability, when the major version changes and there are breaking-changes, so `^` should be preferred regardless of the instance counts *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 1: pragma solidity >=0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L1) ### [N‑49] Interfaces should be defined in separate files from their usage The interfaces below should be defined in separate files, so that it's easier for future projects to import them, and to avoid duplication later on if they need to be used elsewhere in the project *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11 interface IAccount { 12 /// @notice Called by the bootloader to validate that an account agrees to process the transaction 13 /// (and potentially pay for it). 14 /// @param _txHash The hash of the transaction to be used in the explorer 15 /// @param _suggestedSignedHash The hash of the transaction is signed by EOAs 16 /// @param _transaction The transaction itself 17 /// @return magic The magic value that should be equal to the signature of this function 18 /// if the user agrees to proceed with the transaction. 19 /// @dev The developer should strive to preserve as many steps as possible both for valid 20 /// and invalid transactions as this very method is also used during the gas fee estimation 21: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9-L19) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16 interface IPaymaster { 17 /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 18 /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader 19 /// address. 20 /// @param _txHash The hash of the transaction 21 /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA 22 /// @param _transaction The transaction itself. 23 /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24 /// if the paymaster agrees to pay for the transaction. 25 /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be 26 /// passed to the `postTransaction` method of the account. 27 /// @dev The developer should strive to preserve as many steps as possible both for valid 28 /// and invalid transactions as this very method is also used during the gas fee estimation 29: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14-L27) ### [N‑50] Large multiples of ten should use scientific notation (e.g. `1e6`) rather than decimal literals (e.g. `1000000`), for readability *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 20: uint256 constant DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT = 10000000; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L18) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 87: uint256 constant BATCH_OVERHEAD_L1_GAS = 1000000; ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L85) ### [N‑51] Large numeric literals should use underscores for readability *There are 19 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 20: uint256 constant DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT = 10000000; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 28: uint256 constant MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES = 4 + INITIAL_STORAGE_CHANGE_SERIALIZE_SIZE * 4765; 35: uint256 constant MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES = 4 + REPEATED_STORAGE_CHANGE_SERIALIZE_SIZE * 7564; 63: uint256 constant INPUT_MASK = 26959946667150639794667015087019630673637144422540572481103610249215; 66: uint256 constant L2_TX_MAX_GAS_LIMIT = 80000000; 69: uint256 constant MAX_PUBDATA_PER_BATCH = 110000; 74: uint256 constant PRIORITY_TX_MAX_PUBDATA = 99000; 77: uint256 constant FAIR_L2_GAS_PRICE = 500000000; 84: uint256 constant BATCH_OVERHEAD_L2_GAS = 1200000; 87: uint256 constant BATCH_OVERHEAD_L1_GAS = 1000000; 93: uint256 constant MAX_TRANSACTIONS_IN_BATCH = 1024; 96: uint256 constant BOOTLOADER_TX_ENCODING_SPACE = 273132; 99: uint256 constant L1_TX_INTRINSIC_L2_GAS = 167157; 105: uint256 constant L1_TX_MIN_L2_GAS_BASE = 173484; 108: uint256 constant L1_TX_DELTA_544_ENCODING_BYTES = 1656; 111: uint256 constant L1_TX_DELTA_FACTORY_DEPS_L2_GAS = 2473; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L33-L33), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L61-L61), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L64-L64), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L67-L67), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L72-L72), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L75-L75), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L82-L82), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L85-L85), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L91-L91), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L94-L94), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L97-L97), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L103-L103), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L106-L106), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L109-L109) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 89: uint256 constant MAX_ALLOWED_PUBDATA_PER_BATCH = 520000; 104: uint256 constant L2_TO_L1_LOGS_MERKLE_TREE_LEAVES = 2048; ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L87-L87), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L102-L102) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 46: uint256 public difficulty = 2500000000000000; ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L44-L44) ### [N‑52] Large or complicated code bases should implement invariant tests Large code bases, or code with lots of inline-assembly, complicated math, or complicated interactions between multiple contracts, should implement [invariant fuzzing tests](https://medium.com/coinmonks/smart-contract-fuzzing-d9b88e0b0a05). Invariant fuzzers such as Echidna require the test writer to come up with invariants which should not be violated under any circumstances, and the fuzzer tests various inputs and function calls to ensure that the invariants always hold. Even code with 100% code coverage can still have bugs due to the order of the operations a user performs, and invariant fuzzers, with properly and extensively-written invariants, can close this testing gap significantly. *There is one instance of this issue:* ```solidity File: Various Files ``` ### [N‑53] Libraries should be defined in separate files from their usage The libraries below should be defined in separate files, so that it's easier for future projects to import them, and to avoid duplication later on if they need to be used elsewhere in the project *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 22: library PriorityQueue { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L20-L20) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 70 library SystemContractsCaller { 71 /// @notice Makes a call with the `isSystem` flag. 72 /// @param gasLimit The gas limit for the call. 73 /// @param to The address to call. 74 /// @param value The value to pass with the transaction. 75 /// @param data The calldata. 76 /// @return success Whether the transaction has been successful. 77: /// @dev Note, that the `isSystem` flag can only be set when calling system contracts. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L68-L75) ### [N‑54] Long functions should be refactored into multiple, smaller, functions *There are 13 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit 54 lines (46 in the body) 83 function initialize( 84 bytes[] calldata _factoryDeps, 85 address _l2WethAddress, 86 address _governor, 87 uint256 _deployBridgeImplementationFee, 88 uint256 _deployBridgeProxyFee 89: ) external payable reentrancyGuardInitializer { ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L81-L87) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit 71 lines (58 in the body) 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109 bytes32 previousBatchHash, 110 bytes32 stateDiffHash, 111 bytes32 l2LogsTreeRoot, 112: uint256 packedBatchAndL2BlockTimestamp /// @audit 54 lines (48 in the body) 313 function proveBatches( 314 StoredBatchInfo calldata _prevBatch, 315 StoredBatchInfo[] calldata _committedBatches, 316 ProofInput calldata _proof 317: ) external nonReentrant onlyValidator { ``` *GitHub*: [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L101-L110), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L311-L315) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit 53 lines (51 in the body) 48: function bridgeInitialize(address _l1Address, bytes memory _data) external initializer { ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L46) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol /// @audit 91 lines (89 in the body) 46: function encodeLegacyTransactionHash(Transaction calldata _transaction) internal view returns (bytes32 txHash) { /// @audit 86 lines (84 in the body) 141: function encodeEIP2930TransactionHash(Transaction calldata _transaction) internal view returns (bytes32) { /// @audit 91 lines (89 in the body) 231: function encodeEIP1559TransactionHash(Transaction calldata _transaction) internal view returns (bytes32) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L44), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L139), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L229) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol /// @audit 79 lines (72 in the body) 119 function verifyCompressedStateDiffs( 120 uint256 _numberOfStateDiffs, 121 uint256 _enumerationIndexSize, 122 bytes calldata _stateDiffs, 123 bytes calldata _compressedStateDiffs 124: ) external payable onlyCallFrom(address(L1_MESSENGER_CONTRACT)) returns (bytes32 stateDiffHash) { ``` *GitHub*: [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L117-L122) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit 138 lines (134 in the body) 201 function publishPubdataAndClearState( 202 bytes calldata _totalL2ToL1PubdataAndStateDiffs 203: ) external onlyCallFromBootloader { ``` *GitHub*: [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L199-L201) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit 58 lines (50 in the body) 314 function setL2Block( 315 uint128 _l2BlockNumber, 316 uint128 _l2BlockTimestamp, 317 bytes32 _expectedPrevL2BlockHash, 318 bool _isFirstInBatch, 319 uint128 _maxVirtualBlocksToCreate 320: ) external onlyCallFromBootloader { ``` *GitHub*: [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L312-L318) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit 69 lines (67 in the body) 149: function _encodeHashLegacyTransaction(Transaction calldata _transaction) private view returns (bytes32) { /// @audit 67 lines (65 in the body) 221: function _encodeHashEIP2930Transaction(Transaction calldata _transaction) private view returns (bytes32) { /// @audit 69 lines (67 in the body) 291: function _encodeHashEIP1559Transaction(Transaction calldata _transaction) private view returns (bytes32) { ``` *GitHub*: [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L147), [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L219), [291](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L289)
### [N‑55] Memory-safe annotation preferred over comment variant The memory-safe annotation (`assembly ("memory-safe") { ... }`), available starting in Solidity version 0.8.13 is preferred over the comment variant, which will be removed in a future breaking [release](https://docs.soliditylang.org/en/v0.8.13/assembly.html#memory-safety). The comment variant is only meant for externalized library code that needs to work in earlier versions (e.g. `SafeTransferLib` needs to be able to be used in many different versions). *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 301 /// @solidity memory-safe-assembly 302 assembly { 303 let returndata_size := mload(returndata) 304 revert(add(32, returndata), returndata_size) 305: } ``` *GitHub*: [301](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L299-L303) ### [N‑56] Misplaced SPDX identifier The SPDX identifier should be on the very first line of the file *There are 94 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L1) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/L2ContractAddresses.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L1) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L1) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L1) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L1) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L1) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 1: pragma solidity ^0.8; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 1: pragma solidity >=0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 1: pragma solidity ^0.8.1; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L1)
### [N‑57] Missing checks constructor/initializer assignments Consider whether reasonable bounds checks for variables would be useful *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 51: minDelay = _minDelay; ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L49-L49) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 49: executionDelay = _executionDelay; ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L47-L47) ### [N‑58] Missing checks for state variable assignments Consider whether reasonable bounds checks for variables would be useful *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 62: executionDelay = _executionDelay; ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L60-L60) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 96: gasPrice = _gasPrice; 437: baseFee = _baseFee; 453: baseFee = _baseFee; ``` *GitHub*: [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L94-L94), [437](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L435-L435), [453](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L451-L451) ### [N‑59] Missing event and or timelock for critical parameter change Events help non-contract tools to track changes, and timelocks prevent users from being surprised by changes *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 131 function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { 132 tokenDeposit[_l1Token].depositLimitation = _depositLimitation; 133 tokenDeposit[_l1Token].depositCap = _depositCap; 134: } ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129-L132) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89 function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 90 origin = _newOrigin; 91: } 95 function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 96 gasPrice = _gasPrice; 97: } 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423 ) external onlyCallFromBootloader { 424 (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = getBatchNumberAndTimestamp(); 425 require(_newTimestamp > previousBatchTimestamp, "Timestamps should be incremental"); 426 require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); 427 428 _ensureBatchConsistentWithL2Block(_newTimestamp); 429 430 batchHash[previousBatchNumber] = _prevBatchHash; 431 432 // Setting new block number and timestamp 433 BlockInfo memory newBlockInfo = BlockInfo({number: previousBatchNumber + 1, timestamp: _newTimestamp}); 434 435 currentBatchInfo = newBlockInfo; 436 437 baseFee = _baseFee; 438 439 // The correctness of this block hash: 440 SystemContractHelper.toL1(false, bytes32(uint256(SystemLogKey.PREV_BATCH_HASH_KEY)), _prevBatchHash); 441: } ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87-L89), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93-L95), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L439) ### [N‑60] Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, for readability Well-organized data structures make code reviews easier, which may lead to fewer bugs. Consider combining related mappings into mappings to structs, so it's clear what data is related *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 38 mapping(uint256 => uint256) internal rawNonces; 39 40 /// Mapping of values under nonces for accounts. 41 /// The main key of the mapping is the 256-bit address of the account, while the 42 /// inner mapping is a mapping from a nonce to the value stored there. 43: mapping(uint256 => mapping(uint256 => uint256)) internal nonceValues; ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L36-L41) ### [N‑61] Named imports of parent contracts are missing *There are 43 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit IL1Bridge /// @audit IL1BridgeLegacy /// @audit AllowListed /// @audit ReentrancyGuard 30: contract L1ERC20Bridge is IL1Bridge, IL1BridgeLegacy, AllowListed, ReentrancyGuard { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28-L28), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28-L28), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28-L28), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28-L28) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit IL1Bridge /// @audit AllowListed /// @audit ReentrancyGuard 39: contract L1WethBridge is IL1Bridge, AllowListed, ReentrancyGuard { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L37-L37), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L37-L37), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L37-L37) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol /// @audit IAllowList /// @audit Ownable2Step 20: contract AllowList is IAllowList, Ownable2Step { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L18-L18), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit Base 17: abstract contract BaseZkSyncUpgrade is Base { ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol /// @audit BaseZkSyncUpgrade 12: contract DefaultUpgrade is BaseZkSyncUpgrade { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit IExecutor /// @audit Ownable2Step 22: contract ValidatorTimelock is IExecutor, Ownable2Step { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L20-L20), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol /// @audit Base /// @audit IAdmin 16: contract AdminFacet is Base, IAdmin { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L14-L14), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol /// @audit ReentrancyGuard /// @audit AllowListed 16: contract Base is ReentrancyGuard, AllowListed { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L14-L14), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol /// @audit Base /// @audit IGetters /// @audit ILegacyGetters 17: contract GettersFacet is Base, IGetters, ILegacyGetters { ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L15-L15), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L15-L15), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol /// @audit IBase 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol /// @audit IBase 11: interface IGetters is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol /// @audit IBase 13: interface ILegacyGetters is IBase { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol /// @audit IBase 18: interface IMailbox is IBase { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16-L16) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol /// @audit IMailbox /// @audit IAdmin /// @audit IExecutor /// @audit IGetters 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit IL2Bridge /// @audit Initializable 22: contract L2ERC20Bridge is IL2Bridge, Initializable { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L20-L20), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L20-L20) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit ERC20PermitUpgradeable /// @audit IL2StandardToken 13: contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11-L11), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11-L11) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol /// @audit ERC20PermitUpgradeable /// @audit IL2Weth /// @audit IL2StandardToken 23: contract L2Weth is ERC20PermitUpgradeable, IL2Weth, IL2StandardToken { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21-L21), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21-L21), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit IL2Bridge /// @audit Initializable 23: contract L2WethBridge is IL2Bridge, Initializable { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L21-L21), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol /// @audit IAccountCodeStorage 24: contract AccountCodeStorage is IAccountCodeStorage { ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol /// @audit IBootloaderUtilities 18: contract BootloaderUtilities is IBootloaderUtilities { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit IAccount 21: contract DefaultAccount is IAccount { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L19-L19) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol /// @audit IImmutableSimulator 20: contract ImmutableSimulator is IImmutableSimulator { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L18-L18) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit ISystemContract 21: contract MsgValueSimulator is ISystemContract { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L19-L19) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit INonceHolder 29: contract NonceHolder is INonceHolder, ISystemContract { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L27-L27)
### [N‑62] NatSpec: Contract declarations should have `@author` tags *There are 29 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 27 abstract contract ReentrancyGuard { 28 /// @dev Address of lock flag variable. 29 /// @dev Flag is placed at random memory location to not interfere with Storage contract. 30: // keccak256("ReentrancyGuard") - 1; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L25-L28) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 7 interface IAllowList { 8 /*////////////////////////////////////////////////////////////// 9 EVENTS 10 //////////////////////////////////////////////////////////////*/ 11 12: /// @notice Access mode of target contract is changed ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 7 interface IGovernance { 8 /// @dev This enumeration includes the following states: 9 /// @param Unset Default state, indicating the operation has not been set. 10 /// @param Waiting The operation is scheduled but not yet ready to be executed. 11 /// @param Ready The operation is ready to be executed. 12: /// @param Done The operation has been successfully executed. ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 23: library AddressAliasHelper { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 30 interface IExecutor is IBase { 31 /// @notice Rollup batch stored data 32 /// @param batchNumber Rollup batch number 33 /// @param batchHash Hash of L2 batch 34 /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 35 /// @param numberOfLayer1Txs Number of priority operations to be processed 36 /// @param priorityOperationsHash Hash of all priority operations from this batch 37 /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch 38 /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant 39: /// @param commitment Verified input for the zkSync circuit ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L28-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 11 interface IGetters is IBase { 12 /*////////////////////////////////////////////////////////////// 13 CUSTOM GETTERS 14 //////////////////////////////////////////////////////////////*/ 15: ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9-L13) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 18 interface IMailbox is IBase { 19 /// @dev Structure that includes all fields of the L2 transaction 20 /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx 21 /// @param txType The tx type number, depending on which the L2 transaction can be interpreted differently 22 /// @param from The sender's address. `uint256` type for possible address format changes and maintaining backward compatibility 23 /// @param to The recipient's address. `uint256` type for possible address format changes and maintaining backward compatibility 24 /// @param gasLimit The L2 gas limit for L2 transaction. Analog to the `gasLimit` on an L1 transactions 25 /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata (every piece of data that will be stored on L1 as calldata) 26 /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get the transaction included in a batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions 27 /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator to incentivize them to include the transaction in a batch. Analog to the EIP-1559 `maxPriorityFeePerGas` on an L1 transactions 28 /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 29 /// @param nonce The nonce of the transaction. For L1->L2 transactions it is the priority operation Id. 30 /// @param value The value to pass with the transaction 31 /// @param reserved The fixed-length fields for usage in a future extension of transaction formats 32 /// @param data The calldata that is transmitted for the transaction call 33 /// @param signature An abstract set of bytes that are used for transaction authorization 34 /// @param factoryDeps The set of L2 bytecode hashes whose preimages were shown on L1 35 /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call 36: /// @param reservedDynamic The arbitrary-length field for usage in a future extension of transaction formats ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16-L34) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4-L4) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11 interface IAccount { 12 /// @notice Called by the bootloader to validate that an account agrees to process the transaction 13 /// (and potentially pay for it). 14 /// @param _txHash The hash of the transaction to be used in the explorer 15 /// @param _suggestedSignedHash The hash of the transaction is signed by EOAs 16 /// @param _transaction The transaction itself 17 /// @return magic The magic value that should be equal to the signature of this function 18 /// if the user agrees to proceed with the transaction. 19 /// @dev The developer should strive to preserve as many steps as possible both for valid 20 /// and invalid transactions as this very method is also used during the gas fee estimation 21: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9-L19) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7 interface IContractDeployer { 8 /// @notice Defines the version of the account abstraction protocol 9 /// that a contract claims to follow. 10 /// - `None` means that the account is just a contract and it should never be interacted 11 /// with as a custom account 12: /// - `Version1` means that the account follows the first version of the account abstraction protocol ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37 interface IL1Messenger { 38 // Possibly in the future we will be able to track the messages sent to L1 with 39: // some hooks in the VM. For now, it is much easier to track them with L2 events. ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35-L37) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16 interface IPaymaster { 17 /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 18 /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader 19 /// address. 20 /// @param _txHash The hash of the transaction 21 /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA 22 /// @param _transaction The transaction itself. 23 /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24 /// if the paymaster agrees to pay for the transaction. 25 /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be 26 /// passed to the `postTransaction` method of the account. 27 /// @dev The developer should strive to preserve as many steps as possible both for valid 28 /// and invalid transactions as this very method is also used during the gas fee estimation 29: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14-L27) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 14 abstract contract ISystemContract { 15 /// @notice Modifier that makes sure that the method 16: /// can only be called via a system call. ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L12-L14) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 11 library Address { 12 /** 13 * @dev Returns true if `account` is a contract. 14 * 15 * [IMPORTANT] 16 * ==== 17 * It is unsafe to assume that an address for which this function returns 18 * false is an externally-owned account (EOA) and not a contract. 19 * 20 * Among others, `isContract` will return false for the following 21 * types of addresses: 22 * 23 * - an externally-owned account 24 * - a contract in construction 25 * - an address where a contract will be created 26 * - an address where a contract lived, but was destroyed 27 * ==== 28 * 29 * [IMPORTANT] 30 * ==== 31 * You shouldn't rely on `isContract` to protect against flash loan attacks! 32 * 33 * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets 34 * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract 35 * constructor. 36 * ==== 37: */ ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L9-L35)
### [N‑63] NatSpec: Contract declarations should have `@dev` tags `@dev` is used to explain extra details to developers *There are 57 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 8: interface IL1BridgeLegacy { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 8: interface IL2ERC20Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 11: abstract contract AllowListed { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 7 interface IAllowList { 8 /*////////////////////////////////////////////////////////////// 9 EVENTS 10 //////////////////////////////////////////////////////////////*/ 11 12: /// @notice Access mode of target contract is changed ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 11 interface IL2ContractDeployer { 12 /// @notice A struct that describes a forced deployment on an address. 13 /// @param bytecodeHash The bytecode hash to put on an address. 14 /// @param newAddress The address on which to deploy the bytecodehash to. 15 /// @param callConstructor Whether to run the constructor on the force deployment. 16 /// @param value The `msg.value` with which to initialize a contract. 17: /// @param input The constructor calldata. ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L9-L15) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 12 library L2ContractHelper { 13: /// @dev The prefix used to create CREATE2 addresses. ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L10-L11) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 12: library UncheckedMath { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 7 interface IGovernance { 8 /// @dev This enumeration includes the following states: 9 /// @param Unset Default state, indicating the operation has not been set. 10 /// @param Waiting The operation is scheduled but not yet ready to be executed. 11 /// @param Ready The operation is ready to be executed. 12: /// @param Done The operation has been successfully executed. ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 17 abstract contract BaseZkSyncUpgrade is Base { 18 /// @notice The struct that represents the upgrade proposal. 19 /// @param l2ProtocolUpgradeTx The system upgrade transaction. 20 /// @param factoryDeps The list of factory deps for the l2ProtocolUpgradeTx. 21 /// @param bootloaderHash The hash of the new bootloader bytecode. If zero, it will not be updated. 22 /// @param defaultAccountHash The hash of the new default account bytecode. If zero, it will not be updated. 23 /// @param verifier The address of the new verifier. If zero, the verifier will not be updated. 24 /// @param verifierParams The new verifier params. If either of its fields is 0, the params will not be updated. 25 /// @param l1ContractsUpgradeCalldata Custom calldata for L1 contracts upgrade, it may be interpreted differently 26 /// in each upgrade. Usually empty. 27 /// @param postUpgradeCalldata Custom calldata for post upgrade hook, it may be interpreted differently in each 28 /// upgrade. Usually empty. 29 /// @param upgradeTimestamp The timestamp after which the upgrade can be executed. 30 /// @param newProtocolVersion The new version number for the protocol after this upgrade. Should be greater than 31 /// the previous protocol version. 32: /// @param newAllowList The address of the new allowlist contract. If zero, it will not be updated. ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L15-L30) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 12 contract DefaultUpgrade is BaseZkSyncUpgrade { 13 /// @notice Placeholder function for custom logic for upgrading L1 contract. 14 /// Typically this function will never be used. 15 /// @param _customCallDataForUpgrade Custom data for an upgrade, which may be interpreted differently for each 16: /// upgrade. ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L10-L14) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 23: library AddressAliasHelper { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 12: contract DiamondProxy { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 16: contract AdminFacet is Base, IAdmin { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 16: contract Base is ReentrancyGuard, AllowListed { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 20: contract ExecutorFacet is Base, IExecutor { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 17: contract GettersFacet is Base, IGetters, ILegacyGetters { ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 39: contract MailboxFacet is Base, IMailbox { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L37-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 30 interface IExecutor is IBase { 31 /// @notice Rollup batch stored data 32 /// @param batchNumber Rollup batch number 33 /// @param batchHash Hash of L2 batch 34 /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 35 /// @param numberOfLayer1Txs Number of priority operations to be processed 36 /// @param priorityOperationsHash Hash of all priority operations from this batch 37 /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch 38 /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant 39: /// @param commitment Verified input for the zkSync circuit ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L28-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 11 interface IGetters is IBase { 12 /*////////////////////////////////////////////////////////////// 13 CUSTOM GETTERS 14 //////////////////////////////////////////////////////////////*/ 15: ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9-L13) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 18 interface IMailbox is IBase { 19 /// @dev Structure that includes all fields of the L2 transaction 20 /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx 21 /// @param txType The tx type number, depending on which the L2 transaction can be interpreted differently 22 /// @param from The sender's address. `uint256` type for possible address format changes and maintaining backward compatibility 23 /// @param to The recipient's address. `uint256` type for possible address format changes and maintaining backward compatibility 24 /// @param gasLimit The L2 gas limit for L2 transaction. Analog to the `gasLimit` on an L1 transactions 25 /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata (every piece of data that will be stored on L1 as calldata) 26 /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get the transaction included in a batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions 27 /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator to incentivize them to include the transaction in a batch. Analog to the EIP-1559 `maxPriorityFeePerGas` on an L1 transactions 28 /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 29 /// @param nonce The nonce of the transaction. For L1->L2 transactions it is the priority operation Id. 30 /// @param value The value to pass with the transaction 31 /// @param reserved The fixed-length fields for usage in a future extension of transaction formats 32 /// @param data The calldata that is transmitted for the transaction call 33 /// @param signature An abstract set of bytes that are used for transaction authorization 34 /// @param factoryDeps The set of L2 bytecode hashes whose preimages were shown on L1 35 /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call 36: /// @param reservedDynamic The arbitrary-length field for usage in a future extension of transaction formats ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16-L34) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 13: library Diamond { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 8 library LibMap { 9: /// @dev A uint32 map in storage. ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L6-L7) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 11: library Merkle { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 15 library TransactionValidator { 16 /// @dev Used to validate key properties of an L1->L2 transaction 17 /// @param _transaction The transaction to validate 18 /// @param _encoded The abi encoded bytes of the transaction 19: /// @param _priorityTxMaxGasLimit The max gas limit, generally provided from Storage.sol ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L13-L17) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 22 contract L2ERC20Bridge is IL2Bridge, Initializable { 23: /// @dev The address of the L1 bridge counterpart. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L20-L21) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 13 contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { 14 /// @dev Describes whether there is a specific getter in the token. 15 /// @notice Used to explicitly separate which getters the token has and which it does not. 16 /// @notice Different tokens in L1 can implement or not implement getter function as `name`/`symbol`/`decimals`, 17: /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method. ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11-L15) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4-L4) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 18: contract BootloaderUtilities is IBootloaderUtilities { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 16 contract ComplexUpgrader is IComplexUpgrader { 17 /// @notice Executes an upgrade process by delegating calls to another contract. 18 /// @dev This function allows only the `FORCE_DEPLOYER` to initiate the upgrade. 19 /// If the delegate call fails, the function will revert the transaction, returning the error message 20 /// provided by the delegated contract. 21 /// @param _delegateTo the address of the contract to which the calls will be delegated 22: /// @param _calldata the calldata to be delegate called in the `_delegateTo` contract ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L14-L20) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 19 contract SystemContext is ISystemContext, ISystemContextDeprecated, ISystemContract { 20 /// @notice The number of latest L2 blocks to store. 21 /// @dev EVM requires us to be able to query the hashes of previous 256 blocks. 22 /// We could either: 23 /// - Store the latest 256 hashes (and strictly rely that we do not accidentally override the hash of the block 256 blocks ago) 24: /// - Store the latest 257 blocks's hashes. ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L17-L22) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11 interface IAccount { 12 /// @notice Called by the bootloader to validate that an account agrees to process the transaction 13 /// (and potentially pay for it). 14 /// @param _txHash The hash of the transaction to be used in the explorer 15 /// @param _suggestedSignedHash The hash of the transaction is signed by EOAs 16 /// @param _transaction The transaction itself 17 /// @return magic The magic value that should be equal to the signature of this function 18 /// if the user agrees to proceed with the transaction. 19 /// @dev The developer should strive to preserve as many steps as possible both for valid 20 /// and invalid transactions as this very method is also used during the gas fee estimation 21: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9-L19) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7 interface IContractDeployer { 8 /// @notice Defines the version of the account abstraction protocol 9 /// that a contract claims to follow. 10 /// - `None` means that the account is just a contract and it should never be interacted 11 /// with as a custom account 12: /// - `Version1` means that the account follows the first version of the account abstraction protocol ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37 interface IL1Messenger { 38 // Possibly in the future we will be able to track the messages sent to L1 with 39: // some hooks in the VM. For now, it is much easier to track them with L2 events. ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35-L37) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16 interface IPaymaster { 17 /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 18 /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader 19 /// address. 20 /// @param _txHash The hash of the transaction 21 /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA 22 /// @param _transaction The transaction itself. 23 /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24 /// if the paymaster agrees to pay for the transaction. 25 /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be 26 /// passed to the `postTransaction` method of the account. 27 /// @dev The developer should strive to preserve as many steps as possible both for valid 28 /// and invalid transactions as this very method is also used during the gas fee estimation 29: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14-L27) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 12: interface ISystemContext { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 11: interface ISystemContextDeprecated { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 12: library RLPEncoder { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 80: library TransactionHelper { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L78-L78)
### [N‑64] NatSpec: Contract declarations should have `@notice` tags `@notice` is used to explain to end users what the contract does, and the compiler interprets `///` or `/**` comments as this tag if one wasn't explicitly provided *There are 26 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 7 interface IAllowList { 8 /*////////////////////////////////////////////////////////////// 9 EVENTS 10 //////////////////////////////////////////////////////////////*/ 11 12: /// @notice Access mode of target contract is changed ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 7 interface IGovernance { 8 /// @dev This enumeration includes the following states: 9 /// @param Unset Default state, indicating the operation has not been set. 10 /// @param Waiting The operation is scheduled but not yet ready to be executed. 11 /// @param Ready The operation is ready to be executed. 12: /// @param Done The operation has been successfully executed. ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 23: library AddressAliasHelper { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 30 interface IExecutor is IBase { 31 /// @notice Rollup batch stored data 32 /// @param batchNumber Rollup batch number 33 /// @param batchHash Hash of L2 batch 34 /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 35 /// @param numberOfLayer1Txs Number of priority operations to be processed 36 /// @param priorityOperationsHash Hash of all priority operations from this batch 37 /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch 38 /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant 39: /// @param commitment Verified input for the zkSync circuit ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L28-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 11 interface IGetters is IBase { 12 /*////////////////////////////////////////////////////////////// 13 CUSTOM GETTERS 14 //////////////////////////////////////////////////////////////*/ 15: ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9-L13) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 18 interface IMailbox is IBase { 19 /// @dev Structure that includes all fields of the L2 transaction 20 /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx 21 /// @param txType The tx type number, depending on which the L2 transaction can be interpreted differently 22 /// @param from The sender's address. `uint256` type for possible address format changes and maintaining backward compatibility 23 /// @param to The recipient's address. `uint256` type for possible address format changes and maintaining backward compatibility 24 /// @param gasLimit The L2 gas limit for L2 transaction. Analog to the `gasLimit` on an L1 transactions 25 /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata (every piece of data that will be stored on L1 as calldata) 26 /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get the transaction included in a batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions 27 /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator to incentivize them to include the transaction in a batch. Analog to the EIP-1559 `maxPriorityFeePerGas` on an L1 transactions 28 /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 29 /// @param nonce The nonce of the transaction. For L1->L2 transactions it is the priority operation Id. 30 /// @param value The value to pass with the transaction 31 /// @param reserved The fixed-length fields for usage in a future extension of transaction formats 32 /// @param data The calldata that is transmitted for the transaction call 33 /// @param signature An abstract set of bytes that are used for transaction authorization 34 /// @param factoryDeps The set of L2 bytecode hashes whose preimages were shown on L1 35 /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call 36: /// @param reservedDynamic The arbitrary-length field for usage in a future extension of transaction formats ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16-L34) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4-L4) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11 interface IAccount { 12 /// @notice Called by the bootloader to validate that an account agrees to process the transaction 13 /// (and potentially pay for it). 14 /// @param _txHash The hash of the transaction to be used in the explorer 15 /// @param _suggestedSignedHash The hash of the transaction is signed by EOAs 16 /// @param _transaction The transaction itself 17 /// @return magic The magic value that should be equal to the signature of this function 18 /// if the user agrees to proceed with the transaction. 19 /// @dev The developer should strive to preserve as many steps as possible both for valid 20 /// and invalid transactions as this very method is also used during the gas fee estimation 21: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9-L19) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7 interface IContractDeployer { 8 /// @notice Defines the version of the account abstraction protocol 9 /// that a contract claims to follow. 10 /// - `None` means that the account is just a contract and it should never be interacted 11 /// with as a custom account 12: /// - `Version1` means that the account follows the first version of the account abstraction protocol ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37 interface IL1Messenger { 38 // Possibly in the future we will be able to track the messages sent to L1 with 39: // some hooks in the VM. For now, it is much easier to track them with L2 events. ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35-L37) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16 interface IPaymaster { 17 /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 18 /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader 19 /// address. 20 /// @param _txHash The hash of the transaction 21 /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA 22 /// @param _transaction The transaction itself. 23 /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24 /// if the paymaster agrees to pay for the transaction. 25 /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be 26 /// passed to the `postTransaction` method of the account. 27 /// @dev The developer should strive to preserve as many steps as possible both for valid 28 /// and invalid transactions as this very method is also used during the gas fee estimation 29: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14-L27)
### [N‑65] NatSpec: Contract declarations should have `@title` tags *There are 83 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 30: contract L1ERC20Bridge is IL1Bridge, IL1BridgeLegacy, AllowListed, ReentrancyGuard { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28-L28) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 39: contract L1WethBridge is IL1Bridge, AllowListed, ReentrancyGuard { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L37-L37) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 8: interface IL1BridgeLegacy { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 8: interface IL2ERC20Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 16 library BridgeInitializationHelper { 17 /// @dev The L2 gas limit for requesting L1 -> L2 transaction of deploying L2 bridge instance. 18 /// @dev It is big enough to deploy any contract, so we can use the same value for all bridges. 19: /// NOTE: this constant will be accurately calculated in the future. ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L14-L17) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 20: contract AllowList is IAllowList, Ownable2Step { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 11: abstract contract AllowListed { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 27 abstract contract ReentrancyGuard { 28 /// @dev Address of lock flag variable. 29 /// @dev Flag is placed at random memory location to not interfere with Storage contract. 30: // keccak256("ReentrancyGuard") - 1; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L25-L28) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 7 interface IAllowList { 8 /*////////////////////////////////////////////////////////////// 9 EVENTS 10 //////////////////////////////////////////////////////////////*/ 11 12: /// @notice Access mode of target contract is changed ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 11 interface IL2ContractDeployer { 12 /// @notice A struct that describes a forced deployment on an address. 13 /// @param bytecodeHash The bytecode hash to put on an address. 14 /// @param newAddress The address on which to deploy the bytecodehash to. 15 /// @param callConstructor Whether to run the constructor on the force deployment. 16 /// @param value The `msg.value` with which to initialize a contract. 17: /// @param input The constructor calldata. ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L9-L15) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 12 library L2ContractHelper { 13: /// @dev The prefix used to create CREATE2 addresses. ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L10-L11) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 12: library UncheckedMath { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 20: library UnsafeBytes { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 22 contract Governance is IGovernance, Ownable2Step { 23: /// @notice A constant representing the timestamp for completed operations. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L20-L21) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 7 interface IGovernance { 8 /// @dev This enumeration includes the following states: 9 /// @param Unset Default state, indicating the operation has not been set. 10 /// @param Waiting The operation is scheduled but not yet ready to be executed. 11 /// @param Ready The operation is ready to be executed. 12: /// @param Done The operation has been successfully executed. ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 17 abstract contract BaseZkSyncUpgrade is Base { 18 /// @notice The struct that represents the upgrade proposal. 19 /// @param l2ProtocolUpgradeTx The system upgrade transaction. 20 /// @param factoryDeps The list of factory deps for the l2ProtocolUpgradeTx. 21 /// @param bootloaderHash The hash of the new bootloader bytecode. If zero, it will not be updated. 22 /// @param defaultAccountHash The hash of the new default account bytecode. If zero, it will not be updated. 23 /// @param verifier The address of the new verifier. If zero, the verifier will not be updated. 24 /// @param verifierParams The new verifier params. If either of its fields is 0, the params will not be updated. 25 /// @param l1ContractsUpgradeCalldata Custom calldata for L1 contracts upgrade, it may be interpreted differently 26 /// in each upgrade. Usually empty. 27 /// @param postUpgradeCalldata Custom calldata for post upgrade hook, it may be interpreted differently in each 28 /// upgrade. Usually empty. 29 /// @param upgradeTimestamp The timestamp after which the upgrade can be executed. 30 /// @param newProtocolVersion The new version number for the protocol after this upgrade. Should be greater than 31 /// the previous protocol version. 32: /// @param newAllowList The address of the new allowlist contract. If zero, it will not be updated. ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L15-L30) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 12 contract DefaultUpgrade is BaseZkSyncUpgrade { 13 /// @notice Placeholder function for custom logic for upgrading L1 contract. 14 /// Typically this function will never be used. 15 /// @param _customCallDataForUpgrade Custom data for an upgrade, which may be interpreted differently for each 16: /// upgrade. ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L10-L14) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 23: library AddressAliasHelper { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 21 contract DiamondInit is Base { 22 /// @notice Struct that holds all data needed for initializing zkSync Diamond Proxy. 23 /// @dev We use struct instead of raw parameters in `initialize` function to prevent "Stack too deep" error 24 /// @param _verifier address of Verifier contract 25 /// @param _governor address who can manage critical updates in the contract 26 /// @param _admin address who can manage non-critical updates in the contract 27 /// @param _genesisBatchHash Batch hash of the genesis (initial) batch 28 /// @param _genesisIndexRepeatedStorageChanges The serial number of the shortcut storage key for genesis batch 29 /// @param _genesisBatchCommitment The zk-proof commitment for the genesis batch 30 /// @param _allowList The address of the allow list smart contract 31 /// @param _verifierParams Verifier config parameters that describes the circuit to be verified 32 /// @param _zkPorterIsAvailable The availability of zk porter shard 33 /// @param _l2BootloaderBytecodeHash The hash of bootloader L2 bytecode 34 /// @param _l2DefaultAccountBytecodeHash The hash of default account L2 bytecode 35: /// @param _priorityTxMaxGasLimit maximum number of the L2 gas that a user can request for L1 -> L2 transactions ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L19-L33) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 22: contract ValidatorTimelock is IExecutor, Ownable2Step { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 30 interface IExecutor is IBase { 31 /// @notice Rollup batch stored data 32 /// @param batchNumber Rollup batch number 33 /// @param batchHash Hash of L2 batch 34 /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 35 /// @param numberOfLayer1Txs Number of priority operations to be processed 36 /// @param priorityOperationsHash Hash of all priority operations from this batch 37 /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch 38 /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant 39: /// @param commitment Verified input for the zkSync circuit ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L28-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 11 interface IGetters is IBase { 12 /*////////////////////////////////////////////////////////////// 13 CUSTOM GETTERS 14 //////////////////////////////////////////////////////////////*/ 15: ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9-L13) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 13: interface ILegacyGetters is IBase { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 18 interface IMailbox is IBase { 19 /// @dev Structure that includes all fields of the L2 transaction 20 /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx 21 /// @param txType The tx type number, depending on which the L2 transaction can be interpreted differently 22 /// @param from The sender's address. `uint256` type for possible address format changes and maintaining backward compatibility 23 /// @param to The recipient's address. `uint256` type for possible address format changes and maintaining backward compatibility 24 /// @param gasLimit The L2 gas limit for L2 transaction. Analog to the `gasLimit` on an L1 transactions 25 /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata (every piece of data that will be stored on L1 as calldata) 26 /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get the transaction included in a batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions 27 /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator to incentivize them to include the transaction in a batch. Analog to the EIP-1559 `maxPriorityFeePerGas` on an L1 transactions 28 /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 29 /// @param nonce The nonce of the transaction. For L1->L2 transactions it is the priority operation Id. 30 /// @param value The value to pass with the transaction 31 /// @param reserved The fixed-length fields for usage in a future extension of transaction formats 32 /// @param data The calldata that is transmitted for the transaction call 33 /// @param signature An abstract set of bytes that are used for transaction authorization 34 /// @param factoryDeps The set of L2 bytecode hashes whose preimages were shown on L1 35 /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call 36: /// @param reservedDynamic The arbitrary-length field for usage in a future extension of transaction formats ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16-L34) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 13: library Diamond { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 8 library LibMap { 9: /// @dev A uint32 map in storage. ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L6-L7) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 11: library Merkle { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 22: library PriorityQueue { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L20-L20) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 22 contract L2ERC20Bridge is IL2Bridge, Initializable { 23: /// @dev The address of the L1 bridge counterpart. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L20-L21) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 13 contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { 14 /// @dev Describes whether there is a specific getter in the token. 15 /// @notice Used to explicitly separate which getters the token has and which it does not. 16 /// @notice Different tokens in L1 can implement or not implement getter function as `name`/`symbol`/`decimals`, 17: /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method. ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11-L15) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 23 contract L2Weth is ERC20PermitUpgradeable, IL2Weth, IL2StandardToken { 24: /// @dev Address of the L2 WETH Bridge. ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21-L22) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 23 contract L2WethBridge is IL2Bridge, Initializable { 24: /// @dev Event emitted when ETH is received by the contract. ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L21-L22) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4-L4) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 24: contract AccountCodeStorage is IAccountCodeStorage { ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 18: contract BootloaderUtilities is IBootloaderUtilities { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 16 contract ComplexUpgrader is IComplexUpgrader { 17 /// @notice Executes an upgrade process by delegating calls to another contract. 18 /// @dev This function allows only the `FORCE_DEPLOYER` to initiate the upgrade. 19 /// If the delegate call fails, the function will revert the transaction, returning the error message 20 /// provided by the delegated contract. 21 /// @param _delegateTo the address of the contract to which the calls will be delegated 22: /// @param _calldata the calldata to be delegate called in the `_delegateTo` contract ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L14-L20) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 36: contract Compressor is ICompressor, ISystemContract { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L34-L34) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 25 contract ContractDeployer is IContractDeployer, ISystemContract { 26 /// @notice Information about an account contract. 27: /// @dev For EOA and simple contracts (i.e. not accounts) this value is 0. ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L23-L25) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 21: contract DefaultAccount is IAccount { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L19-L19) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 13: contract EmptyContract { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L11-L11) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 20 contract ImmutableSimulator is IImmutableSimulator { 21 /// @dev mapping (contract address) => (index of immutable variable) => value 22: /// @notice that address uses `uint256` type to leave the option to introduce 32-byte address space in future. ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L18-L20) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 21: contract KnownCodesStorage is IKnownCodesStorage, ISystemContract { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L19-L19) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 35 contract L1Messenger is IL1Messenger, ISystemContract { 36 /// @notice Sequential hash of logs sent in the current block. 37: /// @dev Will be reset at the end of the block to zero value. ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L33-L35) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 20 contract L2EthToken is IEthToken, ISystemContract { 21: /// @notice The balances of the users. ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L18-L19) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 21 contract MsgValueSimulator is ISystemContract { 22 /// @notice Extract value, isSystemCall and to from the extraAbi params. 23 /// @dev The contract accepts value, the callee and whether the call should a system one via its ABI params. 24 /// @dev The first ABI param contains the value in the [0..127] bits. The 128th contains 25 /// the flag whether or not the call should be a system one. 26: /// The second ABI params contains the callee. ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L19-L24) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 29: contract NonceHolder is INonceHolder, ISystemContract { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L27-L27) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 19 contract SystemContext is ISystemContext, ISystemContextDeprecated, ISystemContract { 20 /// @notice The number of latest L2 blocks to store. 21 /// @dev EVM requires us to be able to query the hashes of previous 256 blocks. 22 /// We could either: 23 /// - Store the latest 256 hashes (and strictly rely that we do not accidentally override the hash of the block 256 blocks ago) 24: /// - Store the latest 257 blocks's hashes. ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L17-L22) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11 interface IAccount { 12 /// @notice Called by the bootloader to validate that an account agrees to process the transaction 13 /// (and potentially pay for it). 14 /// @param _txHash The hash of the transaction to be used in the explorer 15 /// @param _suggestedSignedHash The hash of the transaction is signed by EOAs 16 /// @param _transaction The transaction itself 17 /// @return magic The magic value that should be equal to the signature of this function 18 /// if the user agrees to proceed with the transaction. 19 /// @dev The developer should strive to preserve as many steps as possible both for valid 20 /// and invalid transactions as this very method is also used during the gas fee estimation 21: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9-L19) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7 interface IContractDeployer { 8 /// @notice Defines the version of the account abstraction protocol 9 /// that a contract claims to follow. 10 /// - `None` means that the account is just a contract and it should never be interacted 11 /// with as a custom account 12: /// - `Version1` means that the account follows the first version of the account abstraction protocol ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37 interface IL1Messenger { 38 // Possibly in the future we will be able to track the messages sent to L1 with 39: // some hooks in the VM. For now, it is much easier to track them with L2 events. ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35-L37) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 15: interface INonceHolder { ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16 interface IPaymaster { 17 /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 18 /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader 19 /// address. 20 /// @param _txHash The hash of the transaction 21 /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA 22 /// @param _transaction The transaction itself. 23 /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24 /// if the paymaster agrees to pay for the transaction. 25 /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be 26 /// passed to the `postTransaction` method of the account. 27 /// @dev The developer should strive to preserve as many steps as possible both for valid 28 /// and invalid transactions as this very method is also used during the gas fee estimation 29: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14-L27) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 14: interface IPaymasterFlow { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 12: interface ISystemContext { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 11: interface ISystemContextDeprecated { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 14 abstract contract ISystemContract { 15 /// @notice Modifier that makes sure that the method 16: /// can only be called via a system call. ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L12-L14) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 34 library EfficientCall { 35 /// @notice Call the `keccak256` without copying calldata to memory. 36 /// @param _data The preimage data. 37: /// @return The `keccak256` hash. ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L32-L35) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 12: library RLPEncoder { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 70 library SystemContractHelper { 71 /// @notice Send an L2Log to L1. 72 /// @param _isService The `isService` flag. 73 /// @param _key The `key` part of the L2Log. 74 /// @param _value The `value` part of the L2Log. 75 /// @dev The meaning of all these parameters is context-dependent, but they 76: /// have no intrinsic meaning per se. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L68-L74) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 70 library SystemContractsCaller { 71 /// @notice Makes a call with the `isSystem` flag. 72 /// @param gasLimit The gas limit for the call. 73 /// @param to The address to call. 74 /// @param value The value to pass with the transaction. 75 /// @param data The calldata. 76 /// @return success Whether the transaction has been successful. 77: /// @dev Note, that the `isSystem` flag can only be set when calling system contracts. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L68-L75) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 80: library TransactionHelper { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L78-L78) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 20: library UnsafeBytesCalldata { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L18-L18) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 13 library Utils { 14: /// @dev Bit mask of bytecode hash "isConstructor" marker ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L11-L12) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 11 library Address { 12 /** 13 * @dev Returns true if `account` is a contract. 14 * 15 * [IMPORTANT] 16 * ==== 17 * It is unsafe to assume that an address for which this function returns 18 * false is an externally-owned account (EOA) and not a contract. 19 * 20 * Among others, `isContract` will return false for the following 21 * types of addresses: 22 * 23 * - an externally-owned account 24 * - a contract in construction 25 * - an address where a contract will be created 26 * - an address where a contract lived, but was destroyed 27 * ==== 28 * 29 * [IMPORTANT] 30 * ==== 31 * You shouldn't rely on `isContract` to protect against flash loan attacks! 32 * 33 * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets 34 * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract 35 * constructor. 36 * ==== 37: */ ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L9-L35)
### [N‑66] NatSpec: Contract declarations should have descriptions e.g. `@dev` or `@notice`, and it must appear above the contract definition braces in order to be identified by the compiler as NatSpec *There are 26 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 7 interface IAllowList { 8 /*////////////////////////////////////////////////////////////// 9 EVENTS 10 //////////////////////////////////////////////////////////////*/ 11 12: /// @notice Access mode of target contract is changed ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 7 interface IGovernance { 8 /// @dev This enumeration includes the following states: 9 /// @param Unset Default state, indicating the operation has not been set. 10 /// @param Waiting The operation is scheduled but not yet ready to be executed. 11 /// @param Ready The operation is ready to be executed. 12: /// @param Done The operation has been successfully executed. ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 23: library AddressAliasHelper { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 30 interface IExecutor is IBase { 31 /// @notice Rollup batch stored data 32 /// @param batchNumber Rollup batch number 33 /// @param batchHash Hash of L2 batch 34 /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 35 /// @param numberOfLayer1Txs Number of priority operations to be processed 36 /// @param priorityOperationsHash Hash of all priority operations from this batch 37 /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch 38 /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant 39: /// @param commitment Verified input for the zkSync circuit ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L28-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 11 interface IGetters is IBase { 12 /*////////////////////////////////////////////////////////////// 13 CUSTOM GETTERS 14 //////////////////////////////////////////////////////////////*/ 15: ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9-L13) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 18 interface IMailbox is IBase { 19 /// @dev Structure that includes all fields of the L2 transaction 20 /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx 21 /// @param txType The tx type number, depending on which the L2 transaction can be interpreted differently 22 /// @param from The sender's address. `uint256` type for possible address format changes and maintaining backward compatibility 23 /// @param to The recipient's address. `uint256` type for possible address format changes and maintaining backward compatibility 24 /// @param gasLimit The L2 gas limit for L2 transaction. Analog to the `gasLimit` on an L1 transactions 25 /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata (every piece of data that will be stored on L1 as calldata) 26 /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get the transaction included in a batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions 27 /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator to incentivize them to include the transaction in a batch. Analog to the EIP-1559 `maxPriorityFeePerGas` on an L1 transactions 28 /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 29 /// @param nonce The nonce of the transaction. For L1->L2 transactions it is the priority operation Id. 30 /// @param value The value to pass with the transaction 31 /// @param reserved The fixed-length fields for usage in a future extension of transaction formats 32 /// @param data The calldata that is transmitted for the transaction call 33 /// @param signature An abstract set of bytes that are used for transaction authorization 34 /// @param factoryDeps The set of L2 bytecode hashes whose preimages were shown on L1 35 /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call 36: /// @param reservedDynamic The arbitrary-length field for usage in a future extension of transaction formats ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16-L34) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4-L4) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11 interface IAccount { 12 /// @notice Called by the bootloader to validate that an account agrees to process the transaction 13 /// (and potentially pay for it). 14 /// @param _txHash The hash of the transaction to be used in the explorer 15 /// @param _suggestedSignedHash The hash of the transaction is signed by EOAs 16 /// @param _transaction The transaction itself 17 /// @return magic The magic value that should be equal to the signature of this function 18 /// if the user agrees to proceed with the transaction. 19 /// @dev The developer should strive to preserve as many steps as possible both for valid 20 /// and invalid transactions as this very method is also used during the gas fee estimation 21: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9-L19) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7 interface IContractDeployer { 8 /// @notice Defines the version of the account abstraction protocol 9 /// that a contract claims to follow. 10 /// - `None` means that the account is just a contract and it should never be interacted 11 /// with as a custom account 12: /// - `Version1` means that the account follows the first version of the account abstraction protocol ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37 interface IL1Messenger { 38 // Possibly in the future we will be able to track the messages sent to L1 with 39: // some hooks in the VM. For now, it is much easier to track them with L2 events. ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35-L37) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16 interface IPaymaster { 17 /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 18 /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader 19 /// address. 20 /// @param _txHash The hash of the transaction 21 /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA 22 /// @param _transaction The transaction itself. 23 /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24 /// if the paymaster agrees to pay for the transaction. 25 /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be 26 /// passed to the `postTransaction` method of the account. 27 /// @dev The developer should strive to preserve as many steps as possible both for valid 28 /// and invalid transactions as this very method is also used during the gas fee estimation 29: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14-L27)
### [N‑67] NatSpec: Event declarations should have descriptions *There are 24 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 9 event DepositInitiated( 10 bytes32 indexed l2DepositTxHash, 11 address indexed from, 12 address indexed to, 13 address l1Token, 14 uint256 amount 15: ); 17: event WithdrawalFinalized(address indexed to, address indexed l1Token, uint256 amount); 19: event ClaimedFailedDeposit(address indexed to, address indexed l1Token, uint256 amount); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L7-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L15-L15), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 25: event DiamondCut(FacetCut[] facetCuts, address initAddress, bytes initCalldata); ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L23-L23) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 9 event FinalizeDeposit( 10 address indexed l1Sender, 11 address indexed l2Receiver, 12 address indexed l2Token, 13 uint256 amount 14: ); 16 event WithdrawalInitiated( 17 address indexed l2Sender, 18 address indexed l1Receiver, 19 address indexed l2Token, 20 uint256 amount 21: ); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L7-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L14-L19) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 8: event BridgeInitialize(address indexed l1Token, string name, string symbol, uint8 decimals); 10: event BridgeMint(address indexed _account, uint256 _amount); 12: event BridgeBurn(address indexed _account, uint256 _amount); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 7: event Initialize(string name, string symbol, uint8 decimals); ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 35 event ContractDeployed( 36 address indexed deployerAddress, 37 bytes32 indexed bytecodeHash, 38 address indexed contractAddress 39: ); 41: event AccountNonceOrderingUpdated(address indexed accountAddress, AccountNonceOrdering nonceOrdering); 43: event AccountVersionUpdated(address indexed accountAddress, AccountAbstractionVersion aaVersion); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L33-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L39-L39), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 26: event Mint(address indexed account, uint256 amount); 28: event Transfer(address indexed from, address indexed to, uint256 value); 30: event Withdrawal(address indexed _l2Sender, address indexed _l1Receiver, uint256 _amount); 32 event WithdrawalWithMessage( 33 address indexed _l2Sender, 34 address indexed _l1Receiver, 35 uint256 _amount, 36 bytes _additionalData 37: ); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L28-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L30-L35) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 8: event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 40: event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message); 42: event L2ToL1LogSent(L2ToL1Log _l2log); 44: event BytecodeL1PublicationRequested(bytes32 _bytecodeHash); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L42-L42) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 8: event BridgeMint(address indexed _account, uint256 _amount); 10: event BridgeBurn(address indexed _account, uint256 _amount); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 16: event ValueSetUnderNonce(address indexed accountAddress, uint256 indexed key, uint256 value); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L14-L14)
### [N‑68] NatSpec: File is missing NatSpec *There are 22 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol ``` *GitHub*: [various](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol)
### [N‑69] NatSpec: Function `@param` tag is missing *There are 538 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit Missing '@param _zkSync' /// @audit Missing '@param _allowList' 65 /// @dev Contract is expected to be used as proxy implementation. 66 /// @dev Initialize the implementation to prevent Parity hack. 67: constructor(IZkSync _zkSync, IAllowList _allowList) reentrancyGuardInitializer { /// @audit Missing '@param _from' /// @audit Missing '@param _token' /// @audit Missing '@param _amount' 216 /// @dev Transfers tokens from the depositor address to the smart contract address 217 /// @return The difference between the contract balance before and after the transferring of funds 218: function _depositFunds(address _from, IERC20 _token, uint256 _amount) internal returns (uint256) { /// @audit Missing '@param _l1Sender' 226 /// @dev Generate a calldata for calling the deposit finalization on the L2 bridge contract 227 function _getDepositL2Calldata( 228: address _l1Sender, /// @audit Missing '@param _l2Receiver' 226 /// @dev Generate a calldata for calling the deposit finalization on the L2 bridge contract 227 function _getDepositL2Calldata( 228 address _l1Sender, 229: address _l2Receiver, /// @audit Missing '@param _l1Token' 226 /// @dev Generate a calldata for calling the deposit finalization on the L2 bridge contract 227 function _getDepositL2Calldata( 228 address _l1Sender, 229 address _l2Receiver, 230: address _l1Token, /// @audit Missing '@param _amount' 226 /// @dev Generate a calldata for calling the deposit finalization on the L2 bridge contract 227 function _getDepositL2Calldata( 228 address _l1Sender, 229 address _l2Receiver, 230 address _l1Token, 231: uint256 _amount /// @audit Missing '@param _token' 241 /// @dev Receives and parses (name, symbol, decimals) from the token contract 242: function _getERC20Getters(address _token) internal view returns (bytes memory data) { /// @audit Missing '@param _l2ToL1message' 324 /// @dev Decode the withdraw message that came from L2 325 function _parseL2WithdrawalMessage( 326: bytes memory _l2ToL1message /// @audit Missing '@param _l1Token' /// @audit Missing '@param _depositor' /// @audit Missing '@param _amount' /// @audit Missing '@param _claiming' 341 /// @dev Verify the deposit limit is reached to its cap or not 342: function _verifyDepositLimit(address _l1Token, address _depositor, uint256 _amount, bool _claiming) internal { /// @audit Missing '@param _l1Token' 354 /// @return The L2 token address that would be minted for deposit of the given L1 token 355: function l2TokenAddress(address _l1Token) public view returns (address) { ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L63-L65), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L63-L65), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L214-L216), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L214-L216), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L214-L216), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L224-L226), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L224-L227), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L224-L228), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L224-L229), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L239-L240), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L322-L324), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L339-L340), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L339-L340), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L339-L340), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L339-L340), [354](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L352-L353) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit Missing '@param _l1WethAddress' /// @audit Missing '@param _zkSync' /// @audit Missing '@param _allowList' 64 /// @dev Contract is expected to be used as proxy implementation. 65 /// @dev Initialize the implementation to prevent Parity hack. 66: constructor(address payable _l1WethAddress, IZkSync _zkSync, IAllowList _allowList) reentrancyGuardInitializer { /// @audit Missing '@param _l1Sender' 200 /// @dev Generate a calldata for calling the deposit finalization on the L2 WETH bridge contract 201 function _getDepositL2Calldata( 202: address _l1Sender, /// @audit Missing '@param _l2Receiver' 200 /// @dev Generate a calldata for calling the deposit finalization on the L2 WETH bridge contract 201 function _getDepositL2Calldata( 202 address _l1Sender, 203: address _l2Receiver, /// @audit Missing '@param _l1Token' 200 /// @dev Generate a calldata for calling the deposit finalization on the L2 WETH bridge contract 201 function _getDepositL2Calldata( 202 address _l1Sender, 203 address _l2Receiver, 204: address _l1Token, /// @audit Missing '@param _amount' 200 /// @dev Generate a calldata for calling the deposit finalization on the L2 WETH bridge contract 201 function _getDepositL2Calldata( 202 address _l1Sender, 203 address _l2Receiver, 204 address _l1Token, 205: uint256 _amount /// @audit Missing '@param _message' 272 /// @dev Decode the ETH withdraw message with additional data about WETH withdrawal that came from L2EthToken 273 /// contract 274 function _parseL2EthWithdrawalMessage( 275: bytes memory _message /// @audit Missing '@param _l1Token' 303 /// @return l2Token Address of an L2 token counterpart. 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L62-L64), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L62-L64), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L62-L64), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L198-L200), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L198-L201), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L198-L202), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L198-L203), [272](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L270-L273), [303](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L301-L302) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol /// @audit Missing '@param _l2BatchNumber' /// @audit Missing '@param _l2MessageIndex' 21: function isWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); /// @audit Missing '@param _l2Receiver' 23 function deposit( 24: address _l2Receiver, /// @audit Missing '@param _l1Token' 23 function deposit( 24 address _l2Receiver, 25: address _l1Token, /// @audit Missing '@param _amount' 23 function deposit( 24 address _l2Receiver, 25 address _l1Token, 26: uint256 _amount, /// @audit Missing '@param _l2TxGasLimit' 23 function deposit( 24 address _l2Receiver, 25 address _l1Token, 26 uint256 _amount, 27: uint256 _l2TxGasLimit, /// @audit Missing '@param _l2TxGasPerPubdataByte' 23 function deposit( 24 address _l2Receiver, 25 address _l1Token, 26 uint256 _amount, 27 uint256 _l2TxGasLimit, 28: uint256 _l2TxGasPerPubdataByte, /// @audit Missing '@param _refundRecipient' 23 function deposit( 24 address _l2Receiver, 25 address _l1Token, 26 uint256 _amount, 27 uint256 _l2TxGasLimit, 28 uint256 _l2TxGasPerPubdataByte, 29: address _refundRecipient /// @audit Missing '@param _depositSender' 32 function claimFailedDeposit( 33: address _depositSender, /// @audit Missing '@param _l1Token' 32 function claimFailedDeposit( 33 address _depositSender, 34: address _l1Token, /// @audit Missing '@param _l2TxHash' 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35: bytes32 _l2TxHash, /// @audit Missing '@param _l2BatchNumber' 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35 bytes32 _l2TxHash, 36: uint256 _l2BatchNumber, /// @audit Missing '@param _l2MessageIndex' 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35 bytes32 _l2TxHash, 36 uint256 _l2BatchNumber, 37: uint256 _l2MessageIndex, /// @audit Missing '@param _l2TxNumberInBatch' 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35 bytes32 _l2TxHash, 36 uint256 _l2BatchNumber, 37 uint256 _l2MessageIndex, 38: uint16 _l2TxNumberInBatch, /// @audit Missing '@param _merkleProof' 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35 bytes32 _l2TxHash, 36 uint256 _l2BatchNumber, 37 uint256 _l2MessageIndex, 38 uint16 _l2TxNumberInBatch, 39: bytes32[] calldata _merkleProof /// @audit Missing '@param _l2BatchNumber' 42 function finalizeWithdrawal( 43: uint256 _l2BatchNumber, /// @audit Missing '@param _l2MessageIndex' 42 function finalizeWithdrawal( 43 uint256 _l2BatchNumber, 44: uint256 _l2MessageIndex, /// @audit Missing '@param _l2TxNumberInBatch' 42 function finalizeWithdrawal( 43 uint256 _l2BatchNumber, 44 uint256 _l2MessageIndex, 45: uint16 _l2TxNumberInBatch, /// @audit Missing '@param _message' 42 function finalizeWithdrawal( 43 uint256 _l2BatchNumber, 44 uint256 _l2MessageIndex, 45 uint16 _l2TxNumberInBatch, 46: bytes calldata _message, /// @audit Missing '@param _merkleProof' 42 function finalizeWithdrawal( 43 uint256 _l2BatchNumber, 44 uint256 _l2MessageIndex, 45 uint16 _l2TxNumberInBatch, 46 bytes calldata _message, 47: bytes32[] calldata _merkleProof /// @audit Missing '@param _l1Token' 50: function l2TokenAddress(address _l1Token) external view returns (address); ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L19-L19), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L19-L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L22), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L23), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L24), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L25), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L26), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L27), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L31), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L32), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L33), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L34), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L35), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L36), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L37), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L41), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L42), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L43), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L44), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L45), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L48-L48) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol /// @audit Missing '@param _l2Receiver' 9 function deposit( 10: address _l2Receiver, /// @audit Missing '@param _l1Token' 9 function deposit( 10 address _l2Receiver, 11: address _l1Token, /// @audit Missing '@param _amount' 9 function deposit( 10 address _l2Receiver, 11 address _l1Token, 12: uint256 _amount, /// @audit Missing '@param _l2TxGasLimit' 9 function deposit( 10 address _l2Receiver, 11 address _l1Token, 12 uint256 _amount, 13: uint256 _l2TxGasLimit, /// @audit Missing '@param _l2TxGasPerPubdataByte' 9 function deposit( 10 address _l2Receiver, 11 address _l1Token, 12 uint256 _amount, 13 uint256 _l2TxGasLimit, 14: uint256 _l2TxGasPerPubdataByte ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L8), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L9), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L10), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L11), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L12) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol /// @audit Missing '@param _l1Sender' 9 function finalizeDeposit( 10: address _l1Sender, /// @audit Missing '@param _l2Receiver' 9 function finalizeDeposit( 10 address _l1Sender, 11: address _l2Receiver, /// @audit Missing '@param _l1Token' 9 function finalizeDeposit( 10 address _l1Sender, 11 address _l2Receiver, 12: address _l1Token, /// @audit Missing '@param _amount' 9 function finalizeDeposit( 10 address _l1Sender, 11 address _l2Receiver, 12 address _l1Token, 13: uint256 _amount, /// @audit Missing '@param _data' 9 function finalizeDeposit( 10 address _l1Sender, 11 address _l2Receiver, 12 address _l1Token, 13 uint256 _amount, 14: bytes calldata _data /// @audit Missing '@param _l1Receiver' 17 function withdraw( 18: address _l1Receiver, /// @audit Missing '@param _l2Token' 17 function withdraw( 18 address _l1Receiver, 19: address _l2Token, /// @audit Missing '@param _amount' 17 function withdraw( 18 address _l1Receiver, 19 address _l2Token, 20: uint256 _amount /// @audit Missing '@param _l2Token' 23: function l1TokenAddress(address _l2Token) external view returns (address); /// @audit Missing '@param _l1Token' 25: function l2TokenAddress(address _l1Token) external view returns (address); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L7-L8), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L7-L9), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L7-L10), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L7-L11), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L7-L12), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L15-L16), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L15-L17), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L15-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L21-L21), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L23-L23) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol /// @audit Missing '@param _l1Bridge' 9 function initialize( 10: address _l1Bridge, /// @audit Missing '@param _l2TokenProxyBytecodeHash' 9 function initialize( 10 address _l1Bridge, 11: bytes32 _l2TokenProxyBytecodeHash, /// @audit Missing '@param _governor' 9 function initialize( 10 address _l1Bridge, 11 bytes32 _l2TokenProxyBytecodeHash, 12: address _governor ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L7-L8), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L7-L9), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L7-L10) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol /// @audit Missing '@param _l1Bridge' 8 function initialize( 9: address _l1Bridge, /// @audit Missing '@param _l1WethAddress' 8 function initialize( 9 address _l1Bridge, 10: address _l1WethAddress, /// @audit Missing '@param _l2WethAddress' 8 function initialize( 9 address _l1Bridge, 10 address _l1WethAddress, 11: address _l2WethAddress ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L6-L7), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L6-L8), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L6-L9) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol /// @audit Missing '@param wad' 9: function withdraw(uint256 wad) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol /// @audit Missing '@param _initialOwner' 33: constructor(address _initialOwner) { /// @audit Missing '@param _target' /// @audit Missing '@param _accessMode' 69 /// @dev Changes access mode and emit the event if the access was changed 70: function _setAccessMode(address _target, AccessMode _accessMode) internal { /// @audit Missing '@param _caller' /// @audit Missing '@param _target' /// @audit Missing '@param _functionSig' /// @audit Missing '@param _enable' 117 /// @dev Changes permission to call and emits the event if the permission was changed 118: function _setPermissionToCall(address _caller, address _target, bytes4 _functionSig, bool _enable) internal { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L31-L31), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L67-L68), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L67-L68), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L115-L116), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L115-L116), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L115-L116), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L115-L116) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol /// @audit Missing '@param _target' 40: function getAccessMode(address _target) external view returns (AccessMode); /// @audit Missing '@param _caller' 42 function hasSpecialAccessToCall( 43: address _caller, /// @audit Missing '@param _target' 42 function hasSpecialAccessToCall( 43 address _caller, 44: address _target, /// @audit Missing '@param _functionSig' 42 function hasSpecialAccessToCall( 43 address _caller, 44 address _target, 45: bytes4 _functionSig /// @audit Missing '@param _caller' 48 function canCall( 49: address _caller, /// @audit Missing '@param _target' 48 function canCall( 49 address _caller, 50: address _target, /// @audit Missing '@param _functionSig' 48 function canCall( 49 address _caller, 50 address _target, 51: bytes4 _functionSig /// @audit Missing '@param _l1Token' 54: function getTokenDepositLimitData(address _l1Token) external view returns (Deposit memory); /// @audit Missing '@param _targets' /// @audit Missing '@param _accessMode' 60: function setBatchAccessMode(address[] calldata _targets, AccessMode[] calldata _accessMode) external; /// @audit Missing '@param _target' /// @audit Missing '@param _accessMode' 62: function setAccessMode(address _target, AccessMode _accessMode) external; /// @audit Missing '@param _callers' 64 function setBatchPermissionToCall( 65: address[] calldata _callers, /// @audit Missing '@param _targets' 64 function setBatchPermissionToCall( 65 address[] calldata _callers, 66: address[] calldata _targets, /// @audit Missing '@param _functionSigs' 64 function setBatchPermissionToCall( 65 address[] calldata _callers, 66 address[] calldata _targets, 67: bytes4[] calldata _functionSigs, /// @audit Missing '@param _enables' 64 function setBatchPermissionToCall( 65 address[] calldata _callers, 66 address[] calldata _targets, 67 bytes4[] calldata _functionSigs, 68: bool[] calldata _enables /// @audit Missing '@param _caller' 71 function setPermissionToCall( 72: address _caller, /// @audit Missing '@param _target' 71 function setPermissionToCall( 72 address _caller, 73: address _target, /// @audit Missing '@param _functionSig' 71 function setPermissionToCall( 72 address _caller, 73 address _target, 74: bytes4 _functionSig, /// @audit Missing '@param _enable' 71 function setPermissionToCall( 72 address _caller, 73 address _target, 74 bytes4 _functionSig, 75: bool _enable /// @audit Missing '@param _l1Token' 82 function setDepositLimit( 83: address _l1Token, /// @audit Missing '@param _depositLimitation' 82 function setDepositLimit( 83 address _l1Token, 84: bool _depositLimitation, /// @audit Missing '@param _depositCap' 82 function setDepositLimit( 83 address _l1Token, 84 bool _depositLimitation, 85: uint256 _depositCap ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L40-L41), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L40-L42), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L40-L43), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L46-L47), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L46-L48), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L46-L49), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L52-L52), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L58-L58), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L58-L58), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L60-L60), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L60-L60), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L62-L63), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L62-L64), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L62-L65), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L62-L66), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L69-L70), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L69-L71), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L69-L72), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L69-L73), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L80-L81), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L80-L82), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L80-L83) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol /// @audit Missing '@param _deployParams' 26 /// @notice This method is to be used only during an upgrade to set bytecodes on specific addresses. 27: function forceDeployOnAddresses(ForceDeployment[] calldata _deployParams) external; ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L24-L25) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol /// @audit Missing '@param _number' 13: function uncheckedInc(uint256 _number) internal pure returns (uint256) { /// @audit Missing '@param _lhs' /// @audit Missing '@param _rhs' 19: function uncheckedAdd(uint256 _lhs, uint256 _rhs) internal pure returns (uint256) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L11-L11), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L17-L17), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 21: function readUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32 result, uint256 offset) { /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 28: function readAddress(bytes memory _bytes, uint256 _start) internal pure returns (address result, uint256 offset) { /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 35: function readUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256 result, uint256 offset) { /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 42: function readBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32 result, uint256 offset) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit Missing '@param _id' 84 /// @dev Returns whether an id corresponds to a registered operation. This 85 /// includes both Waiting, Ready, and Done operations. 86: function isOperation(bytes32 _id) public view returns (bool) { /// @audit Missing '@param _id' 90 /// @dev Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready". 91: function isOperationPending(bytes32 _id) public view returns (bool) { /// @audit Missing '@param _id' 96 /// @dev Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending". 97: function isOperationReady(bytes32 _id) public view returns (bool) { /// @audit Missing '@param _id' 101 /// @dev Returns whether an operation is done or not. 102: function isOperationDone(bytes32 _id) public view returns (bool) { /// @audit Missing '@param _id' 106 /// @dev Returns operation state. 107: function getOperationState(bytes32 _id) public view returns (OperationState) { ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L82-L84), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L88-L89), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L94-L95), [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L99-L100), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L104-L105) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol /// @audit Missing '@param _id' 40: function isOperation(bytes32 _id) external view returns (bool); /// @audit Missing '@param _id' 42: function isOperationPending(bytes32 _id) external view returns (bool); /// @audit Missing '@param _id' 44: function isOperationReady(bytes32 _id) external view returns (bool); /// @audit Missing '@param _id' 46: function isOperationDone(bytes32 _id) external view returns (bool); /// @audit Missing '@param _id' 48: function getOperationState(bytes32 _id) external view returns (OperationState); /// @audit Missing '@param _operation' /// @audit Missing '@param _delay' 50: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external; /// @audit Missing '@param _id' /// @audit Missing '@param _delay' 52: function scheduleShadow(bytes32 _id, uint256 _delay) external; /// @audit Missing '@param _id' 54: function cancel(bytes32 _id) external; /// @audit Missing '@param _operation' 56: function execute(Operation calldata _operation) external; /// @audit Missing '@param _operation' 58: function executeInstant(Operation calldata _operation) external; /// @audit Missing '@param _operation' 60: function hashOperation(Operation calldata _operation) external pure returns (bytes32); /// @audit Missing '@param _newDelay' 62: function updateDelay(uint256 _newDelay) external; /// @audit Missing '@param _newSecurityCouncil' 64: function updateSecurityCouncil(address _newSecurityCouncil) external; ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L42-L42), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L46-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L48-L48), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L50-L50), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L52-L52), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L56-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L58-L58), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L60-L60), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L62-L62) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit Missing '@param _proposedUpgrade' 68 /// @notice The main function that will be provided by the upgrade proxy 69: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public virtual returns (bytes32) { /// @audit Missing '@param _factoryDeps' 159 /// @notice Sets the hash of the L2 system contract upgrade transaction for the next batch to be committed 160 /// @dev If the transaction is noop (i.e. its type is 0) it does nothing and returns 0. 161 /// @param _l2ProtocolUpgradeTx The L2 system contract upgrade transaction. 162 /// @return System contracts upgrade transaction hash. Zero if no upgrade transaction is set. 163 function _setL2SystemContractUpgrade( 164 IMailbox.L2CanonicalTransaction calldata _l2ProtocolUpgradeTx, 165: bytes[] calldata _factoryDeps, /// @audit Missing '@param _newProtocolVersion' 159 /// @notice Sets the hash of the L2 system contract upgrade transaction for the next batch to be committed 160 /// @dev If the transaction is noop (i.e. its type is 0) it does nothing and returns 0. 161 /// @param _l2ProtocolUpgradeTx The L2 system contract upgrade transaction. 162 /// @return System contracts upgrade transaction hash. Zero if no upgrade transaction is set. 163 function _setL2SystemContractUpgrade( 164 IMailbox.L2CanonicalTransaction calldata _l2ProtocolUpgradeTx, 165 bytes[] calldata _factoryDeps, 166: uint256 _newProtocolVersion ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L66-L67), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L157-L163), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L157-L164) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol /// @audit Missing '@param _initalizeData' 54 /// @notice zkSync contract initialization 55 /// @return Magic 32 bytes, which indicates that the contract logic is expected to be used as a diamond proxy 56 /// initializer 57: function initialize(InitializeData calldata _initalizeData) external reentrancyGuardInitializer returns (bytes32) { ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L52-L55) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol /// @audit Missing '@param _chainId' /// @audit Missing '@param _diamondCut' 13: constructor(uint256 _chainId, Diamond.DiamondCutData memory _diamondCut) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L11-L11), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit Missing '@param _initialOwner' /// @audit Missing '@param _zkSyncContract' /// @audit Missing '@param _executionDelay' /// @audit Missing '@param _validator' 46: constructor(address _initialOwner, address _zkSyncContract, uint32 _executionDelay, address _validator) { /// @audit Missing '@param _newValidator' 53 /// @dev Set new validator address. 54: function setValidator(address _newValidator) external onlyOwner { /// @audit Missing '@param _executionDelay' 60 /// @dev Set the delay between committing and executing batches. 61: function setExecutionDelay(uint32 _executionDelay) external onlyOwner { /// @audit Missing '@param _l2BatchNumber' 72 /// @dev Returns the timestamp when `_l2BatchNumber` was committed. 73: function getCommittedBatchTimestamp(uint256 _l2BatchNumber) external view returns (uint256) { /// @audit Missing '@param _newBatchesData' 77 /// @dev Records the timestamp for all provided committed batches and make 78 /// a call to the zkSync contract with the same calldata. 79 function commitBatches( 80 StoredBatchInfo calldata, 81: CommitBatchInfo[] calldata _newBatchesData /// @audit Missing '@param _newBatchesData' 113 /// @dev Check that batches were committed at least X time ago and 114 /// make a call to the zkSync contract with the same calldata. 115: function executeBatches(StoredBatchInfo[] calldata _newBatchesData) external onlyValidator { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44-L44), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44-L44), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44-L44), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44-L44), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L51-L52), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L58-L59), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L70-L71), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L75-L79), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L111-L113) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit Missing '@param _previousBatch' 26 /// @dev Process one batch commit using the previous batch StoredBatchInfo 27 /// @dev returns new batch StoredBatchInfo 28 /// @notice Does not change storage 29 function _commitOneBatch( 30: StoredBatchInfo memory _previousBatch, /// @audit Missing '@param _newBatch' 26 /// @dev Process one batch commit using the previous batch StoredBatchInfo 27 /// @dev returns new batch StoredBatchInfo 28 /// @notice Does not change storage 29 function _commitOneBatch( 30 StoredBatchInfo memory _previousBatch, 31: CommitBatchInfo calldata _newBatch, /// @audit Missing '@param _expectedSystemContractUpgradeTxHash' 26 /// @dev Process one batch commit using the previous batch StoredBatchInfo 27 /// @dev returns new batch StoredBatchInfo 28 /// @notice Does not change storage 29 function _commitOneBatch( 30 StoredBatchInfo memory _previousBatch, 31 CommitBatchInfo calldata _newBatch, 32: bytes32 _expectedSystemContractUpgradeTxHash /// @audit Missing '@param _newBatch' /// @audit Missing '@param _expectedSystemContractUpgradeTxHash' 99 /// @dev Check that L2 logs are proper and batch contain all meta information for them 100 /// @dev The logs processed here should line up such that only one log for each key from the 101 /// SystemLogKey enum in Constants.sol is processed per new batch. 102 /// @dev Data returned from here will be used to form the batch commitment. 103: function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) /// @audit Missing '@param _lastCommittedBatchData' /// @audit Missing '@param _newBatchesData' 175 /// @notice Commit batch 176 /// @notice 1. Checks timestamp. 177 /// @notice 2. Process L2 logs. 178 /// @notice 3. Store batch commitments. 179: function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) /// @audit Missing '@param _nPriorityOps' 261 /// @dev Pops the priority operations from the priority queue and returns a rolling hash of operations 262: function _collectOperationsFromPriorityQueue(uint256 _nPriorityOps) internal returns (bytes32 concatHash) { /// @audit Missing '@param _storedBatch' /// @audit Missing '@param _executedBatchIdx' 271 /// @dev Executes one batch 272 /// @dev 1. Processes all pending operations (Complete priority requests) 273 /// @dev 2. Finalizes batch on Ethereum 274 /// @dev _executedBatchIdx is an index in the array of the batches that we want to execute together 275: function _executeOneBatch(StoredBatchInfo memory _storedBatch, uint256 _executedBatchIdx) internal { /// @audit Missing '@param _batchesData' 290 /// @notice Execute batches, complete priority operations and process withdrawals. 291 /// @notice 1. Processes all pending operations (Complete priority requests) 292 /// @notice 2. Finalizes batch on Ethereum 293: function executeBatches(StoredBatchInfo[] calldata _batchesData) external nonReentrant onlyValidator { /// @audit Missing '@param _prevBatch' 311 /// @notice Batches commitment verification. 312 /// @notice Only verifies batch commitments without any other processing 313 function proveBatches( 314: StoredBatchInfo calldata _prevBatch, /// @audit Missing '@param _committedBatches' 311 /// @notice Batches commitment verification. 312 /// @notice Only verifies batch commitments without any other processing 313 function proveBatches( 314 StoredBatchInfo calldata _prevBatch, 315: StoredBatchInfo[] calldata _committedBatches, /// @audit Missing '@param _proof' 311 /// @notice Batches commitment verification. 312 /// @notice Only verifies batch commitments without any other processing 313 function proveBatches( 314 StoredBatchInfo calldata _prevBatch, 315 StoredBatchInfo[] calldata _committedBatches, 316: ProofInput calldata _proof /// @audit Missing '@param _prevBatchCommitment' 368 /// @dev Gets zk proof public input 369 function _getBatchProofPublicInput( 370: bytes32 _prevBatchCommitment, /// @audit Missing '@param _currentBatchCommitment' 368 /// @dev Gets zk proof public input 369 function _getBatchProofPublicInput( 370 bytes32 _prevBatchCommitment, 371: bytes32 _currentBatchCommitment, /// @audit Missing '@param _verifierParams' 368 /// @dev Gets zk proof public input 369 function _getBatchProofPublicInput( 370 bytes32 _prevBatchCommitment, 371 bytes32 _currentBatchCommitment, 372: VerifierParams memory _verifierParams /// @audit Missing '@param a' /// @audit Missing '@param b' 409 /// @notice Returns larger of two values 410: function _maxU256(uint256 a, uint256 b) internal pure returns (uint256) { /// @audit Missing '@param _newBatchData' /// @audit Missing '@param _stateDiffHash' 414 /// @dev Creates batch commitment from its data 415: function _createBatchCommitment(CommitBatchInfo calldata _newBatchData, bytes32 _stateDiffHash) /// @audit Missing '@param _batch' 427: function _batchPassThroughData(CommitBatchInfo calldata _batch) internal pure returns (bytes memory) { /// @audit Missing '@param _batch' /// @audit Missing '@param _stateDiffHash' 441: function _batchAuxiliaryOutput(CommitBatchInfo calldata _batch, bytes32 _stateDiffHash) /// @audit Missing '@param _storedBatchInfo' 459 /// @notice Returns the keccak hash of the ABI-encoded StoredBatchInfo 460: function _hashStoredBatchInfo(StoredBatchInfo memory _storedBatchInfo) internal pure returns (bytes32) { /// @audit Missing '@param _bitMap' /// @audit Missing '@param _index' 464 /// @notice Returns true if the bit at index {_index} is 1 465: function _checkBit(uint256 _bitMap, uint8 _index) internal pure returns (bool) { /// @audit Missing '@param _bitMap' /// @audit Missing '@param _index' 469 /// @notice Sets the given bit in {_num} at index {_index} to 1. 470: function _setBit(uint256 _bitMap, uint8 _index) internal pure returns (uint256) { ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L24-L28), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L24-L29), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L24-L30), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L97-L101), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L97-L101), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L173-L177), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L173-L177), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L259-L260), [271](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L269-L273), [271](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L269-L273), [290](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L288-L291), [311](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L309-L312), [311](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L309-L313), [311](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L309-L314), [368](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L366-L368), [368](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L366-L369), [368](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L366-L370), [409](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L407-L408), [409](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L407-L408), [414](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L412-L413), [414](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L412-L413), [427](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L425-L425), [441](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L439-L439), [441](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L439-L439), [459](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L457-L458), [464](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L462-L463), [464](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L462-L463), [469](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L467-L468), [469](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L467-L468) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol /// @audit Missing '@param _address' 79 /// @return Whether the address has a validator access 80: function isValidator(address _address) external view returns (bool) { /// @audit Missing '@param _batchNumber' 84 /// @return Merkle root of the tree with L2 logs for the selected batch 85: function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32) { /// @audit Missing '@param _batchNumber' 89 /// @notice For unfinalized (non executed) batches may change 90 /// @dev returns zero for non-committed batches 91 /// @return The hash of committed L2 batch. 92: function storedBatchHash(uint256 _batchNumber) external view returns (bytes32) { /// @audit Missing '@param _facet' 136 /// @return isFreezable Whether the facet can be frozen by the governor or always accessible 137: function isFacetFreezable(address _facet) external view returns (bool isFreezable) { /// @audit Missing '@param _selector' 159 /// @return Whether the selector can be frozen by the governor or always accessible 160: function isFunctionFreezable(bytes4 _selector) external view returns (bool) { /// @audit Missing '@param _facet' 192 /// @return NON-sorted array with function selectors supported by a specific facet 193: function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory) { /// @audit Missing '@param _selector' 204 /// @return Facet address associated with a selector. Zero if the selector is not added to the diamond 205: function facetAddress(bytes4 _selector) external view returns (address) { /// @audit Missing '@param _batchNumber' 232 /// @notice For unfinalized (non executed) batches may change 233 /// @dev It is a *deprecated* method, please use `storedBatchHash` instead. 234 /// @dev returns zero for non-committed batches 235 /// @return The hash of committed L2 batch. 236: function storedBlockHash(uint256 _batchNumber) external view returns (bytes32) { ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L77-L78), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L82-L83), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L87-L90), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L134-L135), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L157-L158), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L190-L191), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L202-L203), [232](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L230-L234) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit Missing '@param _to' /// @audit Missing '@param _amount' 113 /// @notice Transfer ether from the contract to the receiver 114 /// @dev Reverts only if the transfer call failed 115: function _withdrawFunds(address _to, uint256 _amount) internal { /// @audit Missing '@param _batchNumber' 124 /// @dev Prove that a specific L2 log was sent in a specific L2 batch number 125 function _proveL2LogInclusion( 126: uint256 _batchNumber, /// @audit Missing '@param _index' 124 /// @dev Prove that a specific L2 log was sent in a specific L2 batch number 125 function _proveL2LogInclusion( 126 uint256 _batchNumber, 127: uint256 _index, /// @audit Missing '@param _log' 124 /// @dev Prove that a specific L2 log was sent in a specific L2 batch number 125 function _proveL2LogInclusion( 126 uint256 _batchNumber, 127 uint256 _index, 128: L2Log memory _log, /// @audit Missing '@param _proof' 124 /// @dev Prove that a specific L2 log was sent in a specific L2 batch number 125 function _proveL2LogInclusion( 126 uint256 _batchNumber, 127 uint256 _index, 128 L2Log memory _log, 129: bytes32[] calldata _proof /// @audit Missing '@param _message' 150 /// @dev Convert arbitrary-length message to the raw l2 log 151: function _L2MessageToLog(L2Message memory _message) internal pure returns (L2Log memory) { /// @audit Missing '@param _depositor' /// @audit Missing '@param _amount' 277: function _verifyDepositLimit(address _depositor, uint256 _amount) internal { /// @audit Missing '@param _sender' 285 function _requestL2Transaction( 286: address _sender, /// @audit Missing '@param _contractAddressL2' 285 function _requestL2Transaction( 286 address _sender, 287: address _contractAddressL2, /// @audit Missing '@param _l2Value' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288: uint256 _l2Value, /// @audit Missing '@param _calldata' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289: bytes calldata _calldata, /// @audit Missing '@param _l2GasLimit' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290: uint256 _l2GasLimit, /// @audit Missing '@param _l2GasPerPubdataByteLimit' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291: uint256 _l2GasPerPubdataByteLimit, /// @audit Missing '@param _factoryDeps' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291 uint256 _l2GasPerPubdataByteLimit, 292: bytes[] calldata _factoryDeps, /// @audit Missing '@param _isFree' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291 uint256 _l2GasPerPubdataByteLimit, 292 bytes[] calldata _factoryDeps, 293: bool _isFree, /// @audit Missing '@param _refundRecipient' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291 uint256 _l2GasPerPubdataByteLimit, 292 bytes[] calldata _factoryDeps, 293 bool _isFree, 294: address _refundRecipient /// @audit Missing '@param _priorityOpParams' 331 function _serializeL2Transaction( 332: WritePriorityOpParams memory _priorityOpParams, /// @audit Missing '@param _calldata' 331 function _serializeL2Transaction( 332 WritePriorityOpParams memory _priorityOpParams, 333: bytes calldata _calldata, /// @audit Missing '@param _factoryDeps' 331 function _serializeL2Transaction( 332 WritePriorityOpParams memory _priorityOpParams, 333 bytes calldata _calldata, 334: bytes[] calldata _factoryDeps /// @audit Missing '@param _priorityOpParams' 357 /// @notice Stores a transaction record in storage & send event about that 358 function _writePriorityOp( 359: WritePriorityOpParams memory _priorityOpParams, /// @audit Missing '@param _calldata' 357 /// @notice Stores a transaction record in storage & send event about that 358 function _writePriorityOp( 359 WritePriorityOpParams memory _priorityOpParams, 360: bytes calldata _calldata, /// @audit Missing '@param _factoryDeps' 357 /// @notice Stores a transaction record in storage & send event about that 358 function _writePriorityOp( 359 WritePriorityOpParams memory _priorityOpParams, 360 bytes calldata _calldata, 361: bytes[] calldata _factoryDeps /// @audit Missing '@param _factoryDeps' 389 /// @notice Hashes the L2 bytecodes and returns them in the format in which they are processed by the bootloader 390: function _hashFactoryDeps(bytes[] calldata _factoryDeps) /// @audit Missing '@param _message' 407 /// @dev Decode the withdraw message that came from L2 408: function _parseL2WithdrawalMessage(bytes memory _message) ``` *GitHub*: [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L111-L113), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L111-L113), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L122-L124), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L122-L125), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L122-L126), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L122-L127), [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L148-L149), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L275-L275), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L275-L275), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L284), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L285), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L286), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L287), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L288), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L289), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L290), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L291), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L292), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L329-L330), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L329-L331), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L329-L332), [357](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L355-L357), [357](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L355-L358), [357](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L355-L359), [389](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L387-L388), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L405-L406) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol /// @audit Missing '@param _newPendingGovernor' 12: function setPendingGovernor(address _newPendingGovernor) external; /// @audit Missing '@param _newPendingAdmin' 16: function setPendingAdmin(address _newPendingAdmin) external; /// @audit Missing '@param _validator' /// @audit Missing '@param _active' 20: function setValidator(address _validator, bool _active) external; /// @audit Missing '@param _zkPorterIsAvailable' 22: function setPorterAvailability(bool _zkPorterIsAvailable) external; /// @audit Missing '@param _newPriorityTxMaxGasLimit' 24: function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external; /// @audit Missing '@param _diamondCut' 26: function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external; ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L10-L10), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L14-L14), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L18-L18), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L22-L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L24-L24) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol /// @audit Missing '@param _lastCommittedBatchData' /// @audit Missing '@param _newBatchesData' 81: function commitBatches(StoredBatchInfo calldata _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) /// @audit Missing '@param _prevBatch' 84 function proveBatches( 85: StoredBatchInfo calldata _prevBatch, /// @audit Missing '@param _committedBatches' 84 function proveBatches( 85 StoredBatchInfo calldata _prevBatch, 86: StoredBatchInfo[] calldata _committedBatches, /// @audit Missing '@param _proof' 84 function proveBatches( 85 StoredBatchInfo calldata _prevBatch, 86 StoredBatchInfo[] calldata _committedBatches, 87: ProofInput calldata _proof /// @audit Missing '@param _batchesData' 90: function executeBatches(StoredBatchInfo[] calldata _batchesData) external; /// @audit Missing '@param _newLastBatch' 92: function revertBatches(uint256 _newLastBatch) external; ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L79-L79), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L79-L79), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L82-L83), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L82-L84), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L82-L85), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L88-L88), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L90-L90) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol /// @audit Missing '@param _address' 36: function isValidator(address _address) external view returns (bool); /// @audit Missing '@param _batchNumber' 38: function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32 hash); /// @audit Missing '@param _batchNumber' 40: function storedBatchHash(uint256 _batchNumber) external view returns (bytes32); /// @audit Missing '@param _l2BatchNumber' /// @audit Missing '@param _l2MessageIndex' 60: function isEthWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); /// @audit Missing '@param _facet' 76: function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory); /// @audit Missing '@param _selector' 80: function facetAddress(bytes4 _selector) external view returns (address facet); /// @audit Missing '@param _selector' 82: function isFunctionFreezable(bytes4 _selector) external view returns (bool); /// @audit Missing '@param _facet' 84: function isFacetFreezable(address _facet) external view returns (bool isFreezable); ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L36-L36), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L38-L38), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L58-L58), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L58-L58), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L74-L74), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L78-L78), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L80-L80), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L82-L82) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol /// @audit Missing '@param _batchNumber' 20: function storedBlockHash(uint256 _batchNumber) external view returns (bytes32); ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol /// @audit Missing '@param _l2BatchNumber' 91 function proveL2MessageInclusion( 92: uint256 _l2BatchNumber, /// @audit Missing '@param _index' 91 function proveL2MessageInclusion( 92 uint256 _l2BatchNumber, 93: uint256 _index, /// @audit Missing '@param _message' 91 function proveL2MessageInclusion( 92 uint256 _l2BatchNumber, 93 uint256 _index, 94: L2Message calldata _message, /// @audit Missing '@param _proof' 91 function proveL2MessageInclusion( 92 uint256 _l2BatchNumber, 93 uint256 _index, 94 L2Message calldata _message, 95: bytes32[] calldata _proof /// @audit Missing '@param _l2BatchNumber' 98 function proveL2LogInclusion( 99: uint256 _l2BatchNumber, /// @audit Missing '@param _index' 98 function proveL2LogInclusion( 99 uint256 _l2BatchNumber, 100: uint256 _index, /// @audit Missing '@param _log' 98 function proveL2LogInclusion( 99 uint256 _l2BatchNumber, 100 uint256 _index, 101: L2Log memory _log, /// @audit Missing '@param _proof' 98 function proveL2LogInclusion( 99 uint256 _l2BatchNumber, 100 uint256 _index, 101 L2Log memory _log, 102: bytes32[] calldata _proof /// @audit Missing '@param _l2TxHash' 105 function proveL1ToL2TransactionStatus( 106: bytes32 _l2TxHash, /// @audit Missing '@param _l2BatchNumber' 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107: uint256 _l2BatchNumber, /// @audit Missing '@param _l2MessageIndex' 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108: uint256 _l2MessageIndex, /// @audit Missing '@param _l2TxNumberInBatch' 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108 uint256 _l2MessageIndex, 109: uint16 _l2TxNumberInBatch, /// @audit Missing '@param _merkleProof' 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108 uint256 _l2MessageIndex, 109 uint16 _l2TxNumberInBatch, 110: bytes32[] calldata _merkleProof, /// @audit Missing '@param _status' 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108 uint256 _l2MessageIndex, 109 uint16 _l2TxNumberInBatch, 110 bytes32[] calldata _merkleProof, 111: TxStatus _status /// @audit Missing '@param _l2BatchNumber' 114 function finalizeEthWithdrawal( 115: uint256 _l2BatchNumber, /// @audit Missing '@param _l2MessageIndex' 114 function finalizeEthWithdrawal( 115 uint256 _l2BatchNumber, 116: uint256 _l2MessageIndex, /// @audit Missing '@param _l2TxNumberInBatch' 114 function finalizeEthWithdrawal( 115 uint256 _l2BatchNumber, 116 uint256 _l2MessageIndex, 117: uint16 _l2TxNumberInBatch, /// @audit Missing '@param _message' 114 function finalizeEthWithdrawal( 115 uint256 _l2BatchNumber, 116 uint256 _l2MessageIndex, 117 uint16 _l2TxNumberInBatch, 118: bytes calldata _message, /// @audit Missing '@param _merkleProof' 114 function finalizeEthWithdrawal( 115 uint256 _l2BatchNumber, 116 uint256 _l2MessageIndex, 117 uint16 _l2TxNumberInBatch, 118 bytes calldata _message, 119: bytes32[] calldata _merkleProof /// @audit Missing '@param _contractL2' 122 function requestL2Transaction( 123: address _contractL2, /// @audit Missing '@param _l2Value' 122 function requestL2Transaction( 123 address _contractL2, 124: uint256 _l2Value, /// @audit Missing '@param _calldata' 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125: bytes calldata _calldata, /// @audit Missing '@param _l2GasLimit' 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126: uint256 _l2GasLimit, /// @audit Missing '@param _l2GasPerPubdataByteLimit' 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126 uint256 _l2GasLimit, 127: uint256 _l2GasPerPubdataByteLimit, /// @audit Missing '@param _factoryDeps' 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126 uint256 _l2GasLimit, 127 uint256 _l2GasPerPubdataByteLimit, 128: bytes[] calldata _factoryDeps, /// @audit Missing '@param _refundRecipient' 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126 uint256 _l2GasLimit, 127 uint256 _l2GasPerPubdataByteLimit, 128 bytes[] calldata _factoryDeps, 129: address _refundRecipient /// @audit Missing '@param _gasPrice' 132 function l2TransactionBaseCost( 133: uint256 _gasPrice, /// @audit Missing '@param _l2GasLimit' 132 function l2TransactionBaseCost( 133 uint256 _gasPrice, 134: uint256 _l2GasLimit, /// @audit Missing '@param _l2GasPerPubdataByteLimit' 132 function l2TransactionBaseCost( 133 uint256 _gasPrice, 134 uint256 _l2GasLimit, 135: uint256 _l2GasPerPubdataByteLimit ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L90), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L91), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L92), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L93), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L97), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L98), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L99), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L100), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L104), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L105), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L106), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L107), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L108), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L109), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L113), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L114), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L115), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L116), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L117), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L121), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L122), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L123), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L124), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L125), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L126), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L127), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130-L131), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130-L132), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130-L133) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol /// @audit Missing '@param _facet' 125 /// @dev Add new functions to the diamond proxy 126 /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array 127 function _addFunctions( 128: address _facet, /// @audit Missing '@param _selectors' 125 /// @dev Add new functions to the diamond proxy 126 /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array 127 function _addFunctions( 128 address _facet, 129: bytes4[] memory _selectors, /// @audit Missing '@param _isFacetFreezable' 125 /// @dev Add new functions to the diamond proxy 126 /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array 127 function _addFunctions( 128 address _facet, 129 bytes4[] memory _selectors, 130: bool _isFacetFreezable /// @audit Missing '@param _facet' 149 /// @dev Change associated facets to already known function selectors 150 /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array 151 function _replaceFunctions( 152: address _facet, /// @audit Missing '@param _selectors' 149 /// @dev Change associated facets to already known function selectors 150 /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array 151 function _replaceFunctions( 152 address _facet, 153: bytes4[] memory _selectors, /// @audit Missing '@param _isFacetFreezable' 149 /// @dev Change associated facets to already known function selectors 150 /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array 151 function _replaceFunctions( 152 address _facet, 153 bytes4[] memory _selectors, 154: bool _isFacetFreezable /// @audit Missing '@param _facet' /// @audit Missing '@param _selectors' 173 /// @dev Remove association with function and facet 174 /// NOTE: expect but NOT enforce that `_selectors` is NON-EMPTY array 175: function _removeFunctions(address _facet, bytes4[] memory _selectors) private { /// @audit Missing '@param _facet' 190 /// @dev Add address to the list of known facets if it is not on the list yet 191 /// NOTE: should be called ONLY before adding a new selector associated with the address 192: function _saveFacetIfNew(address _facet) private { /// @audit Missing '@param _facet' 203 /// @dev Add one function to the already known facet 204 /// NOTE: It is expected but NOT enforced that: 205 /// - `_facet` is NON-ZERO address 206 /// - `_facet` is already stored address in `DiamondStorage.facets` 207 /// - `_selector` is NOT associated by another facet 208 function _addOneFunction( 209: address _facet, /// @audit Missing '@param _selector' 203 /// @dev Add one function to the already known facet 204 /// NOTE: It is expected but NOT enforced that: 205 /// - `_facet` is NON-ZERO address 206 /// - `_facet` is already stored address in `DiamondStorage.facets` 207 /// - `_selector` is NOT associated by another facet 208 function _addOneFunction( 209 address _facet, 210: bytes4 _selector, /// @audit Missing '@param _isSelectorFreezable' 203 /// @dev Add one function to the already known facet 204 /// NOTE: It is expected but NOT enforced that: 205 /// - `_facet` is NON-ZERO address 206 /// - `_facet` is already stored address in `DiamondStorage.facets` 207 /// - `_selector` is NOT associated by another facet 208 function _addOneFunction( 209 address _facet, 210 bytes4 _selector, 211: bool _isSelectorFreezable /// @audit Missing '@param _facet' /// @audit Missing '@param _selector' 233 /// @dev Remove one associated function with facet 234 /// NOTE: It is expected but NOT enforced that `_facet` is NON-ZERO address 235: function _removeOneFunction(address _facet, bytes4 _selector) private { /// @audit Missing '@param _facet' 262 /// @dev remove facet from the list of known facets 263 /// NOTE: It is expected but NOT enforced that there are no selectors associated with `_facet` 264: function _removeFacet(address _facet) private { /// @audit Missing '@param _init' /// @audit Missing '@param _calldata' 283 /// @dev Delegates call to the initialization address with provided calldata 284 /// @dev Used as a final step of diamond cut to execute the logic of the initialization for changed facets 285: function _initializeDiamondCut(address _init, bytes memory _calldata) private { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L123-L126), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L123-L127), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L123-L128), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L147-L150), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L147-L151), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L147-L152), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L171-L173), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L171-L173), [190](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L188-L190), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L201-L207), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L201-L208), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L201-L209), [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L231-L233), [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L231-L233), [262](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L260-L262), [283](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L281-L283), [283](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L281-L283) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol /// @audit Missing '@param _lhs' /// @audit Missing '@param _rhs' 41 /// @dev Keccak hash of the concatenation of two 32-byte words 42: function _efficientHash(bytes32 _lhs, bytes32 _rhs) private pure returns (bytes32 result) { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L39-L40), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L39-L40) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol /// @audit Missing '@param _queue' 35 /// @notice Returns zero if and only if no operations were processed from the queue 36 /// @return Index of the oldest priority operation that wasn't processed yet 37: function getFirstUnprocessedPriorityTx(Queue storage _queue) internal view returns (uint256) { /// @audit Missing '@param _queue' 41 /// @return The total number of priority operations that were added to the priority queue, including all processed ones 42: function getTotalPriorityTxs(Queue storage _queue) internal view returns (uint256) { /// @audit Missing '@param _queue' 46 /// @return The total number of unprocessed priority operations in a priority queue 47: function getSize(Queue storage _queue) internal view returns (uint256) { /// @audit Missing '@param _queue' 51 /// @return Whether the priority queue contains no operations 52: function isEmpty(Queue storage _queue) internal view returns (bool) { /// @audit Missing '@param _queue' /// @audit Missing '@param _operation' 56 /// @notice Add the priority operation to the end of the priority queue 57: function pushBack(Queue storage _queue, PriorityOperation memory _operation) internal { /// @audit Missing '@param _queue' 65 /// @return The first unprocessed priority operation from the queue 66: function front(Queue storage _queue) internal view returns (PriorityOperation memory) { /// @audit Missing '@param _queue' 72 /// @notice Remove the first unprocessed priority operation from the queue 73 /// @return priorityOperation that was popped from the priority queue 74: function popFront(Queue storage _queue) internal returns (PriorityOperation memory priorityOperation) { ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L33-L35), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L39-L40), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L44-L45), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L49-L50), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L54-L55), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L54-L55), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L63-L64), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L70-L72) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit Missing '@param _l1Bridge' 42 function initialize( 43: address _l1Bridge, /// @audit Missing '@param _l2TokenProxyBytecodeHash' 42 function initialize( 43 address _l1Bridge, 44: bytes32 _l2TokenProxyBytecodeHash, /// @audit Missing '@param _governor' 42 function initialize( 43 address _l1Bridge, 44 bytes32 _l2TokenProxyBytecodeHash, 45: address _governor /// @audit Missing '@param _l1Token' /// @audit Missing '@param _data' 92 /// @dev Deploy and initialize the L2 token for the L1 counterpart 93: function _deployL2Token(address _l1Token, bytes calldata _data) internal returns (address) { /// @audit Missing '@param _to' 123 /// @dev Encode the message for l2ToL1log sent with withdraw initialization 124 function _getL1WithdrawMessage( 125: address _to, /// @audit Missing '@param _l1Token' 123 /// @dev Encode the message for l2ToL1log sent with withdraw initialization 124 function _getL1WithdrawMessage( 125 address _to, 126: address _l1Token, /// @audit Missing '@param _amount' 123 /// @dev Encode the message for l2ToL1log sent with withdraw initialization 124 function _getL1WithdrawMessage( 125 address _to, 126 address _l1Token, 127: uint256 _amount /// @audit Missing '@param _l1Token' 132 /// @return Address of an L2 token counterpart 133: function l2TokenAddress(address _l1Token) public view override returns (address) { /// @audit Missing '@param _l1Token' 141 /// @dev Convert the L1 token address to the create2 salt of deployed L2 token 142: function _getCreate2Salt(address _l1Token) internal pure returns (bytes32 salt) { /// @audit Missing '@param salt' 146 /// @dev Deploy the beacon proxy for the L2 token, while using ContractDeployer system contract. 147 /// @dev This function uses raw call to ContractDeployer to make sure that exactly `l2TokenProxyBytecodeHash` is used 148 /// for the code of the proxy. 149: function _deployBeaconProxy(bytes32 salt) internal returns (BeaconProxy proxy) { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L41), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L42), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L43), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L90-L91), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L90-L91), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L121-L123), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L121-L124), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L121-L125), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L130-L131), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L139-L140), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L144-L147) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit Missing '@param _input' 143 /// @dev External function to decode a string from bytes. 144: function decodeString(bytes memory _input) external pure returns (string memory result) { /// @audit Missing '@param _input' 148 /// @dev External function to decode a uint8 from bytes. 149: function decodeUint8(bytes memory _input) external pure returns (uint8 result) { ``` *GitHub*: [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L141-L142), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L146-L147) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol /// @audit Missing '@param _amount' 94 /// @notice Withdraw WETH to get Ether. 95: function withdraw(uint256 _amount) external override { /// @audit Missing '@param _to' 99 /// @notice Deposit Ether to mint WETH to a given account. 100: function depositTo(address _to) public payable override { /// @audit Missing '@param _to' /// @audit Missing '@param _amount' 104 /// @notice Withdraw WETH to get Ether to a given account. 105 /// burns sender's tokens and sends Ether to the given account 106: function withdrawTo(address _to, uint256 _amount) public override { ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L92-L93), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L97-L98), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L102-L104), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L102-L104) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit Missing '@param _l2Token' 111 /// @return l1Token Address of an L1 token counterpart. 112: function l1TokenAddress(address _l2Token) public view override returns (address l1Token) { /// @audit Missing '@param _l1Token' 116 /// @return l2Token Address of an L2 token counterpart. 117: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L109-L110), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L114-L115) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol /// @audit Missing '@param _l2BatchNumber' 9 function finalizeWithdrawal( 10: uint256 _l2BatchNumber, /// @audit Missing '@param _l2MessageIndex' 9 function finalizeWithdrawal( 10 uint256 _l2BatchNumber, 11: uint256 _l2MessageIndex, /// @audit Missing '@param _l2TxNumberInBatch' 9 function finalizeWithdrawal( 10 uint256 _l2BatchNumber, 11 uint256 _l2MessageIndex, 12: uint16 _l2TxNumberInBatch, /// @audit Missing '@param _message' 9 function finalizeWithdrawal( 10 uint256 _l2BatchNumber, 11 uint256 _l2MessageIndex, 12 uint16 _l2TxNumberInBatch, 13: bytes calldata _message, /// @audit Missing '@param _merkleProof' 9 function finalizeWithdrawal( 10 uint256 _l2BatchNumber, 11 uint256 _l2MessageIndex, 12 uint16 _l2TxNumberInBatch, 13 bytes calldata _message, 14: bytes32[] calldata _merkleProof ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L8), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L9), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L10), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L11), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L12) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol /// @audit Missing '@param _l1Sender' 23 function finalizeDeposit( 24: address _l1Sender, /// @audit Missing '@param _l2Receiver' 23 function finalizeDeposit( 24 address _l1Sender, 25: address _l2Receiver, /// @audit Missing '@param _l1Token' 23 function finalizeDeposit( 24 address _l1Sender, 25 address _l2Receiver, 26: address _l1Token, /// @audit Missing '@param _amount' 23 function finalizeDeposit( 24 address _l1Sender, 25 address _l2Receiver, 26 address _l1Token, 27: uint256 _amount, /// @audit Missing '@param _data' 23 function finalizeDeposit( 24 address _l1Sender, 25 address _l2Receiver, 26 address _l1Token, 27 uint256 _amount, 28: bytes calldata _data /// @audit Missing '@param _l1Receiver' 31 function withdraw( 32: address _l1Receiver, /// @audit Missing '@param _l2Token' 31 function withdraw( 32 address _l1Receiver, 33: address _l2Token, /// @audit Missing '@param _amount' 31 function withdraw( 32 address _l1Receiver, 33 address _l2Token, 34: uint256 _amount /// @audit Missing '@param _l2Token' 37: function l1TokenAddress(address _l2Token) external view returns (address); /// @audit Missing '@param _l1Token' 39: function l2TokenAddress(address _l1Token) external view returns (address); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L21-L22), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L21-L23), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L21-L24), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L21-L25), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L21-L26), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L29-L30), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L29-L31), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L29-L32), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L37-L37) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol /// @audit Missing '@param _account' /// @audit Missing '@param _amount' 14: function bridgeMint(address _account, uint256 _amount) external; /// @audit Missing '@param _account' /// @audit Missing '@param _amount' 16: function bridgeBurn(address _account, uint256 _amount) external; ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L12-L12), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L14-L14), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L14-L14) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol /// @audit Missing '@param _amount' 11: function withdraw(uint256 _amount) external; /// @audit Missing '@param _to' 13: function depositTo(address _to) external payable; /// @audit Missing '@param _to' /// @audit Missing '@param _amount' 15: function withdrawTo(address _to, uint256 _amount) external; ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L9-L9), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit Missing '@param _address' 35 /// @notice Returns information about a certain account. 36: function getAccountInfo(address _address) external view returns (AccountInfo memory info) { /// @audit Missing '@param _address' 40 /// @notice Returns the account abstraction version if `_address` is a deployed contract. 41 /// Returns the latest supported account abstraction version if `_address` is an EOA. 42: function extendedAccountVersion(address _address) public view returns (AccountAbstractionVersion) { /// @audit Missing '@param _address' /// @audit Missing '@param _newInfo' 56 /// @notice Stores the new account information 57: function _storeAccountInfo(address _address, AccountInfo memory _newInfo) internal { /// @audit Missing '@param _salt' 140 /// @notice Deploys a contract with similar address derivation rules to the EVM's `CREATE` opcode. 141 /// @param _bytecodeHash The correctly formatted hash of the bytecode. 142 /// @param _input The constructor calldata 143 /// @dev This method also accepts nonce as one of its parameters. 144 /// It is not used anywhere and it needed simply for the consistency for the compiler 145 /// @dev In case of a revert, the zero address should be returned. 146 /// Note: this method may be callable only in system mode, 147 /// that is checked in the `createAccount` by `onlySystemCall` modifier. 148 function create( 149: bytes32 _salt, /// @audit Missing '@param _deployments' 237 /// @notice This method is to be used only during an upgrade to set bytecodes on specific addresses. 238 /// @dev We do not require `onlySystemCall` here, since the method is accessible only 239 /// by `FORCE_DEPLOYER`. 240: function forceDeployOnAddresses(ForceDeployment[] calldata _deployments) external payable { /// @audit Missing '@param _bytecodeHash' 260 function _nonSystemDeployOnAddress( 261: bytes32 _bytecodeHash, /// @audit Missing '@param _newAddress' 260 function _nonSystemDeployOnAddress( 261 bytes32 _bytecodeHash, 262: address _newAddress, /// @audit Missing '@param _aaVersion' 260 function _nonSystemDeployOnAddress( 261 bytes32 _bytecodeHash, 262 address _newAddress, 263: AccountAbstractionVersion _aaVersion, /// @audit Missing '@param _input' 260 function _nonSystemDeployOnAddress( 261 bytes32 _bytecodeHash, 262 address _newAddress, 263 AccountAbstractionVersion _aaVersion, 264: bytes calldata _input /// @audit Missing '@param _bytecodeHash' 303 /// @notice Check that bytecode hash is marked as known on the `KnownCodeStorage` system contracts 304: function _ensureBytecodeIsKnown(bytes32 _bytecodeHash) internal view { /// @audit Missing '@param _bytecodeHash' 318 /// @notice Transfers the `msg.value` ETH to the deployed account & invokes its constructor. 319 /// This function must revert in case the deployment fails. 320 /// @param _sender The msg.sender to be used in the constructor 321 /// @param _newAddress The address of the deployed contract 322 /// @param _input The constructor calldata 323 /// @param _isSystem Whether the call should be a system call (could be possibly required in the future). 324 function _constructContract( 325 address _sender, 326 address _newAddress, 327: bytes32 _bytecodeHash, /// @audit Missing '@param _callConstructor' 320 /// @param _sender The msg.sender to be used in the constructor 321 /// @param _newAddress The address of the deployed contract 322 /// @param _input The constructor calldata 323 /// @param _isSystem Whether the call should be a system call (could be possibly required in the future). 324 function _constructContract( 325 address _sender, 326 address _newAddress, 327 bytes32 _bytecodeHash, 328 bytes calldata _input, 329 bool _isSystem, 330: bool _callConstructor ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L33-L34), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L38-L40), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L54-L55), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L54-L55), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L138-L147), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L235-L238), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L258-L259), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L258-L260), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L258-L261), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L258-L262), [303](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L301-L302), [318](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L316-L325), [320](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L318-L328) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit Missing '@param _hash' 66 /// @notice Returns the marker stored for a bytecode hash. 1 means that the bytecode hash is known 67 /// and can be used for deploying contracts. 0 otherwise. 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { /// @audit Missing '@param _bytecodeHash' 74 /// @notice Validates the format of bytecodehash 75 /// @dev zk-circuit accepts & handles only valid format of bytecode hash, other input has undefined behavior 76 /// That's why we need to validate it 77: function _validateBytecode(bytes32 _bytecodeHash) internal pure { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L64-L66), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L72-L75) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit Missing '@param _length' 59 /// The gas cost of calculation of keccak256 of bytes array of such length. 60: function keccakGasCost(uint256 _length) internal pure returns (uint256) { /// @audit Missing '@param _length' 70 /// The gas cost of calculation of sha256 of bytes array of such length. 71: function sha256GasCost(uint256 _length) internal pure returns (uint256) { /// @audit Missing '@param _isService' 75 /// @notice Sends L2ToL1Log. 76 /// @dev Can be called only by a system contract. 77 function sendL2ToL1Log( 78: bool _isService, /// @audit Missing '@param _key' 75 /// @notice Sends L2ToL1Log. 76 /// @dev Can be called only by a system contract. 77 function sendL2ToL1Log( 78 bool _isService, 79: bytes32 _key, /// @audit Missing '@param _value' 75 /// @notice Sends L2ToL1Log. 76 /// @dev Can be called only by a system contract. 77 function sendL2ToL1Log( 78 bool _isService, 79 bytes32 _key, 80: bytes32 _value /// @audit Missing '@param _l2ToL1Log' 99 /// @notice Internal function to send L2ToL1Log. 100: function _processL2ToL1Log(L2ToL1Log memory _l2ToL1Log) internal returns (uint256 logIdInMerkleTree) { /// @audit Missing '@param _message' 120 /// @notice Public functionality to send messages to L1. 121: function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { /// @audit Missing '@param _bytecodeHash' 166 /// @dev Can be called only by KnownCodesStorage system contract. 167 function requestBytecodeL1Publication( 168: bytes32 _bytecodeHash ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L57-L58), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L68-L69), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L73-L76), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L73-L77), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L73-L78), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L97-L98), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L118-L119), [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L164-L166) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit Missing '@param _to' /// @audit Missing '@param _amount' 113 /// @dev Get the message to be sent to L1 to initiate a withdrawal. 114: function _getL1WithdrawMessage(address _to, uint256 _amount) internal pure returns (bytes memory) { /// @audit Missing '@param _to' 118 /// @dev Get the message to be sent to L1 to initiate a withdrawal. 119 function _getExtendedWithdrawMessage( 120: address _to, /// @audit Missing '@param _amount' 118 /// @dev Get the message to be sent to L1 to initiate a withdrawal. 119 function _getExtendedWithdrawMessage( 120 address _to, 121: uint256 _amount, /// @audit Missing '@param _sender' 118 /// @dev Get the message to be sent to L1 to initiate a withdrawal. 119 function _getExtendedWithdrawMessage( 120 address _to, 121 uint256 _amount, 122: address _sender, /// @audit Missing '@param _additionalData' 118 /// @dev Get the message to be sent to L1 to initiate a withdrawal. 119 function _getExtendedWithdrawMessage( 120 address _to, 121 uint256 _amount, 122 address _sender, 123: bytes memory _additionalData ``` *GitHub*: [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L111-L112), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L111-L112), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L116-L118), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L116-L119), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L116-L120), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L116-L121) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit Missing '@param _data' 37: fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L35-L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit Missing '@param _address' /// @audit Missing '@param _nonce' 149: function isNonceUsed(address _address, uint256 _nonce) public view returns (bool) { ``` *GitHub*: [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L147-L147), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit Missing '@param _block' 99 /// @notice The method that emulates `blockhash` opcode in EVM. 100 /// @dev Just like the blockhash in the EVM, it returns bytes32(0), 101 /// when queried about hashes that are older than 256 blocks ago. 102 /// @dev Since zksolc compiler calls this method to emulate `blockhash`, 103 /// its signature can not be changed to `getL2BlockHashEVM`. 104 /// @return hash The blockhash of the block with the given number. 105: function getBlockHashEVM(uint256 _block) external view returns (bytes32 hash) { /// @audit Missing '@param _newTimestamp' 443 /// @notice A testing method that manually sets the current blocks' number and timestamp. 444 /// @dev Should be used only for testing / ethCalls and should never be used in production. 445 function unsafeOverrideBatch( 446: uint256 _newTimestamp, /// @audit Missing '@param _number' 443 /// @notice A testing method that manually sets the current blocks' number and timestamp. 444 /// @dev Should be used only for testing / ethCalls and should never be used in production. 445 function unsafeOverrideBatch( 446 uint256 _newTimestamp, 447: uint256 _number, /// @audit Missing '@param _baseFee' 443 /// @notice A testing method that manually sets the current blocks' number and timestamp. 444 /// @dev Should be used only for testing / ethCalls and should never be used in production. 445 function unsafeOverrideBatch( 446 uint256 _newTimestamp, 447 uint256 _number, 448: uint256 _baseFee /// @audit Missing '@param _blockNumber' 481 /// @notice Returns the hash of the given batch. 482 /// @dev Deprecated in favor of getBatchHash. 483: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash) { ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L97-L103), [443](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L441-L444), [443](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L441-L445), [443](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L441-L446), [481](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L479-L481) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol /// @audit Missing '@param _txHash' 28 function executeTransaction( 29: bytes32 _txHash, /// @audit Missing '@param _suggestedSignedHash' 28 function executeTransaction( 29 bytes32 _txHash, 30: bytes32 _suggestedSignedHash, /// @audit Missing '@param _transaction' 28 function executeTransaction( 29 bytes32 _txHash, 30 bytes32 _suggestedSignedHash, 31: Transaction calldata _transaction /// @audit Missing '@param _transaction' 36: function executeTransactionFromOutside(Transaction calldata _transaction) external payable; /// @audit Missing '@param _txHash' 38 function payForTransaction( 39: bytes32 _txHash, /// @audit Missing '@param _suggestedSignedHash' 38 function payForTransaction( 39 bytes32 _txHash, 40: bytes32 _suggestedSignedHash, /// @audit Missing '@param _transaction' 38 function payForTransaction( 39 bytes32 _txHash, 40 bytes32 _suggestedSignedHash, 41: Transaction calldata _transaction /// @audit Missing '@param _txHash' 44 function prepareForPaymaster( 45: bytes32 _txHash, /// @audit Missing '@param _possibleSignedHash' 44 function prepareForPaymaster( 45 bytes32 _txHash, 46: bytes32 _possibleSignedHash, /// @audit Missing '@param _transaction' 44 function prepareForPaymaster( 45 bytes32 _txHash, 46 bytes32 _possibleSignedHash, 47: Transaction calldata _transaction ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L26-L27), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L26-L28), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L26-L29), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L36-L37), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L36-L38), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L36-L39), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L42-L43), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L42-L44), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L42-L45) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol /// @audit Missing '@param _address' /// @audit Missing '@param _hash' 8: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external; /// @audit Missing '@param _address' /// @audit Missing '@param _hash' 10: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external; /// @audit Missing '@param _address' 12: function markAccountCodeHashAsConstructed(address _address) external; /// @audit Missing '@param _address' 14: function getRawCodeHash(address _address) external view returns (bytes32 codeHash); /// @audit Missing '@param _input' 16: function getCodeHash(uint256 _input) external view returns (bytes32 codeHash); /// @audit Missing '@param _input' 18: function getCodeSize(uint256 _input) external view returns (uint256 codeSize); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L8-L8), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol /// @audit Missing '@param _transaction' 10 function getTransactionHashes( 11: Transaction calldata _transaction ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L8-L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol /// @audit Missing '@param _delegateTo' /// @audit Missing '@param _calldata' 8: function upgrade(address _delegateTo, bytes calldata _calldata) external payable; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol /// @audit Missing '@param _bytecode' 15 function publishCompressedBytecode( 16: bytes calldata _bytecode, /// @audit Missing '@param _rawCompressedData' 15 function publishCompressedBytecode( 16 bytes calldata _bytecode, 17: bytes calldata _rawCompressedData /// @audit Missing '@param _numberOfStateDiffs' 20 function verifyCompressedStateDiffs( 21: uint256 _numberOfStateDiffs, /// @audit Missing '@param _enumerationIndexSize' 20 function verifyCompressedStateDiffs( 21 uint256 _numberOfStateDiffs, 22: uint256 _enumerationIndexSize, /// @audit Missing '@param _stateDiffs' 20 function verifyCompressedStateDiffs( 21 uint256 _numberOfStateDiffs, 22 uint256 _enumerationIndexSize, 23: bytes calldata _stateDiffs, /// @audit Missing '@param _compressedStateDiffs' 20 function verifyCompressedStateDiffs( 21 uint256 _numberOfStateDiffs, 22 uint256 _enumerationIndexSize, 23 bytes calldata _stateDiffs, 24: bytes calldata _compressedStateDiffs ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L13-L14), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L13-L15), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L18-L19), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L18-L20), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L18-L21), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L18-L22) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol /// @audit Missing '@param _sender' 45 function getNewAddressCreate2( 46: address _sender, /// @audit Missing '@param _bytecodeHash' 45 function getNewAddressCreate2( 46 address _sender, 47: bytes32 _bytecodeHash, /// @audit Missing '@param _salt' 45 function getNewAddressCreate2( 46 address _sender, 47 bytes32 _bytecodeHash, 48: bytes32 _salt, /// @audit Missing '@param _input' 45 function getNewAddressCreate2( 46 address _sender, 47 bytes32 _bytecodeHash, 48 bytes32 _salt, 49: bytes calldata _input /// @audit Missing '@param _sender' /// @audit Missing '@param _senderNonce' 52: function getNewAddressCreate(address _sender, uint256 _senderNonce) external pure returns (address newAddress); /// @audit Missing '@param _salt' 54 function create2( 55: bytes32 _salt, /// @audit Missing '@param _bytecodeHash' 54 function create2( 55 bytes32 _salt, 56: bytes32 _bytecodeHash, /// @audit Missing '@param _input' 54 function create2( 55 bytes32 _salt, 56 bytes32 _bytecodeHash, 57: bytes calldata _input /// @audit Missing '@param _salt' 60 function create2Account( 61: bytes32 _salt, /// @audit Missing '@param _bytecodeHash' 60 function create2Account( 61 bytes32 _salt, 62: bytes32 _bytecodeHash, /// @audit Missing '@param _input' 60 function create2Account( 61 bytes32 _salt, 62 bytes32 _bytecodeHash, 63: bytes calldata _input, /// @audit Missing '@param _aaVersion' 60 function create2Account( 61 bytes32 _salt, 62 bytes32 _bytecodeHash, 63 bytes calldata _input, 64: AccountAbstractionVersion _aaVersion /// @audit Missing '@param _salt' 67 /// @dev While the `_salt` parameter is not used anywhere here, 68 /// it is still needed for consistency between `create` and 69 /// `create2` functions (required by the compiler). 70 function create( 71: bytes32 _salt, /// @audit Missing '@param _bytecodeHash' 67 /// @dev While the `_salt` parameter is not used anywhere here, 68 /// it is still needed for consistency between `create` and 69 /// `create2` functions (required by the compiler). 70 function create( 71 bytes32 _salt, 72: bytes32 _bytecodeHash, /// @audit Missing '@param _input' 67 /// @dev While the `_salt` parameter is not used anywhere here, 68 /// it is still needed for consistency between `create` and 69 /// `create2` functions (required by the compiler). 70 function create( 71 bytes32 _salt, 72 bytes32 _bytecodeHash, 73: bytes calldata _input /// @audit Missing '@param _salt' 76 /// @dev While `_salt` is never used here, we leave it here as a parameter 77 /// for the consistency with the `create` function. 78 function createAccount( 79: bytes32 _salt, /// @audit Missing '@param _bytecodeHash' 76 /// @dev While `_salt` is never used here, we leave it here as a parameter 77 /// for the consistency with the `create` function. 78 function createAccount( 79 bytes32 _salt, 80: bytes32 _bytecodeHash, /// @audit Missing '@param _input' 76 /// @dev While `_salt` is never used here, we leave it here as a parameter 77 /// for the consistency with the `create` function. 78 function createAccount( 79 bytes32 _salt, 80 bytes32 _bytecodeHash, 81: bytes calldata _input, /// @audit Missing '@param _aaVersion' 76 /// @dev While `_salt` is never used here, we leave it here as a parameter 77 /// for the consistency with the `create` function. 78 function createAccount( 79 bytes32 _salt, 80 bytes32 _bytecodeHash, 81 bytes calldata _input, 82: AccountAbstractionVersion _aaVersion /// @audit Missing '@param _address' 85 /// @notice Returns the information about a certain AA. 86: function getAccountInfo(address _address) external view returns (AccountInfo memory info); /// @audit Missing '@param _version' 88 /// @notice Can be called by an account to update its account version 89: function updateAccountVersion(AccountAbstractionVersion _version) external; /// @audit Missing '@param _nonceOrdering' 91 /// @notice Can be called by an account to update its nonce ordering 92: function updateNonceOrdering(AccountNonceOrdering _nonceOrdering) external; ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L43-L44), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L43-L45), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L43-L46), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L43-L47), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L50-L50), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L52-L53), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L52-L54), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L52-L55), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L58-L59), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L58-L60), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L58-L61), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L58-L62), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L65-L69), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L65-L70), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L65-L71), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L74-L77), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L74-L78), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L74-L79), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L74-L80), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L83-L84), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L86-L87), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L89-L90) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol /// @audit Missing '@param _from' /// @audit Missing '@param _to' /// @audit Missing '@param _amount' 10: function transferFromTo(address _from, address _to, uint256 _amount) external; /// @audit Missing '@param _account' /// @audit Missing '@param _amount' 20: function mint(address _account, uint256 _amount) external; /// @audit Missing '@param _l1Receiver' 22: function withdraw(address _l1Receiver) external payable; /// @audit Missing '@param _l1Receiver' /// @audit Missing '@param _additionalData' 24: function withdrawWithMessage(address _l1Receiver, bytes calldata _additionalData) external payable; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L8-L8), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L8-L8), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L8-L8), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L18-L18), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L22-L22), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol /// @audit Missing '@param _dest' /// @audit Missing '@param _index' 13: function getImmutable(address _dest, uint256 _index) external view returns (bytes32); /// @audit Missing '@param _dest' /// @audit Missing '@param _immutables' 15: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external; ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L11-L11), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol /// @audit Missing '@param _shouldSendToL1' /// @audit Missing '@param _hashes' 10: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external; /// @audit Missing '@param _bytecodeHash' 12: function markBytecodeAsPublished(bytes32 _bytecodeHash) external; /// @audit Missing '@param _hash' 14: function getMarker(bytes32 _hash) external view returns (uint256); ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L8-L8), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol /// @audit Missing '@param _message' 46: function sendToL1(bytes memory _message) external returns (bytes32); /// @audit Missing '@param _isService' /// @audit Missing '@param _key' /// @audit Missing '@param _value' 48: function sendL2ToL1Log(bool _isService, bytes32 _key, bytes32 _value) external returns (uint256 logIdInMerkleTree); /// @audit Missing '@param _bytecodeHash' 51: function requestBytecodeL1Publication(bytes32 _bytecodeHash) external; ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L46-L46), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L46-L46), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L46-L46), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L49-L49) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol /// @audit Missing '@param _account' /// @audit Missing '@param _amount' 12: function bridgeMint(address _account, uint256 _amount) external; /// @audit Missing '@param _account' /// @audit Missing '@param _amount' 14: function bridgeBurn(address _account, uint256 _amount) external; ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L10-L10), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L12-L12), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol /// @audit Missing '@param _l2BatchNumber' 8 function finalizeEthWithdrawal( 9: uint256 _l2BatchNumber, /// @audit Missing '@param _l2MessageIndex' 8 function finalizeEthWithdrawal( 9 uint256 _l2BatchNumber, 10: uint256 _l2MessageIndex, /// @audit Missing '@param _l2TxNumberInBlock' 8 function finalizeEthWithdrawal( 9 uint256 _l2BatchNumber, 10 uint256 _l2MessageIndex, 11: uint16 _l2TxNumberInBlock, /// @audit Missing '@param _message' 8 function finalizeEthWithdrawal( 9 uint256 _l2BatchNumber, 10 uint256 _l2MessageIndex, 11 uint16 _l2TxNumberInBlock, 12: bytes calldata _message, /// @audit Missing '@param _merkleProof' 8 function finalizeEthWithdrawal( 9 uint256 _l2BatchNumber, 10 uint256 _l2MessageIndex, 11 uint16 _l2TxNumberInBlock, 12 bytes calldata _message, 13: bytes32[] calldata _merkleProof ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L7), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L8), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L9), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L10), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L11) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol /// @audit Missing '@param _address' 18 /// @dev Returns the current minimal nonce for account. 19: function getMinNonce(address _address) external view returns (uint256); /// @audit Missing '@param _address' 21 /// @dev Returns the raw version of the current minimal nonce 22 /// (equal to minNonce + 2^128 * deployment nonce). 23: function getRawNonce(address _address) external view returns (uint256); /// @audit Missing '@param _value' 25 /// @dev Increases the minimal nonce for the msg.sender. 26: function increaseMinNonce(uint256 _value) external returns (uint256); /// @audit Missing '@param _key' /// @audit Missing '@param _value' 28 /// @dev Sets the nonce value `key` as used. 29: function setValueUnderNonce(uint256 _key, uint256 _value) external; /// @audit Missing '@param _key' 31 /// @dev Gets the value stored inside a custom nonce. 32: function getValueUnderNonce(uint256 _key) external view returns (uint256); /// @audit Missing '@param _expectedNonce' 34 /// @dev A convenience method to increment the minimal nonce if it is equal 35 /// to the `_expectedNonce`. 36: function incrementMinNonceIfEquals(uint256 _expectedNonce) external; /// @audit Missing '@param _address' 38 /// @dev Returns the deployment nonce for the accounts used for CREATE opcode. 39: function getDeploymentNonce(address _address) external view returns (uint256); /// @audit Missing '@param _address' 41 /// @dev Increments the deployment nonce for the account and returns the previous one. 42: function incrementDeploymentNonce(address _address) external returns (uint256); /// @audit Missing '@param _address' /// @audit Missing '@param _key' /// @audit Missing '@param _shouldBeUsed' 44 /// @dev Determines whether a certain nonce has been already used for an account. 45: function validateNonceUsage(address _address, uint256 _key, bool _shouldBeUsed) external view; /// @audit Missing '@param _address' /// @audit Missing '@param _nonce' 47 /// @dev Returns whether a nonce has been used for an account. 48: function isNonceUsed(address _address, uint256 _nonce) external view returns (bool); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L16-L17), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L19-L21), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L23-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L26-L27), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L26-L27), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L29-L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L32-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L36-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L39-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L42-L43), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L42-L43), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L42-L43), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L45-L46), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L45-L46) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol /// @audit Missing '@param _txHash' 38 /// this method won't be called if the transaction execution results in out-of-gas. 39 /// @param _context, the context of the execution, returned by the "validateAndPayForPaymasterTransaction" method. 40 /// @param _transaction, the users' transaction. 41 /// @param _txResult, the result of the transaction execution (success or failure). 42 /// @param _maxRefundedGas, the upper bound on the amout of gas that could be refunded to the paymaster. 43 /// @dev The exact amount refunded depends on the gas spent by the "postOp" itself and so the developers should 44 /// take that into account. 45 function postTransaction( 46 bytes calldata _context, 47 Transaction calldata _transaction, 48: bytes32 _txHash, /// @audit Missing '@param _suggestedSignedHash' 39 /// @param _context, the context of the execution, returned by the "validateAndPayForPaymasterTransaction" method. 40 /// @param _transaction, the users' transaction. 41 /// @param _txResult, the result of the transaction execution (success or failure). 42 /// @param _maxRefundedGas, the upper bound on the amout of gas that could be refunded to the paymaster. 43 /// @dev The exact amount refunded depends on the gas spent by the "postOp" itself and so the developers should 44 /// take that into account. 45 function postTransaction( 46 bytes calldata _context, 47 Transaction calldata _transaction, 48 bytes32 _txHash, 49: bytes32 _suggestedSignedHash, ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L36-L46), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L37-L47) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol /// @audit Missing '@param input' 15: function general(bytes calldata input) external; /// @audit Missing '@param _token' /// @audit Missing '@param _minAllowance' /// @audit Missing '@param _innerInput' 17: function approvalBased(address _token, uint256 _minAllowance, bytes calldata _innerInput) external; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L13-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L15-L15), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L15-L15), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L15-L15) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol /// @audit Missing '@param _block' 47: function getBlockHashEVM(uint256 _block) external view returns (bytes32); /// @audit Missing '@param _batchNumber' 49: function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash); ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L45-L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L47-L47) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol /// @audit Missing '@param _blockNumber' 16: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L14-L14) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol /// @audit Missing '@param _val' 13: function encodeAddress(address _val) internal pure returns (bytes memory encoded) { /// @audit Missing '@param _val' 26: function encodeUint256(uint256 _val) internal pure returns (bytes memory encoded) { /// @audit Missing '@param _len' /// @audit Missing '@param _offset' 62: function _encodeLength(uint64 _len, uint256 _offset) private pure returns (bytes memory encoded) { /// @audit Missing '@param _number' 83 /// @notice Computes the index of the highest byte set in number. 84 /// @notice Uses little endian ordering (The least significant byte has index `0`). 85 /// NOTE: returns `0` for `0` 86: function _highestByteSet(uint256 _number) private pure returns (uint256 hbs) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L11-L11), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L24-L24), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L60-L60), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L60-L60), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L81-L84) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit Missing '@param _farCallAbi' 110 /// @notice Compiler simulation of the `ptr.pack` opcode for the virtual `ACTIVE_PTR` pointer. 111 /// @dev Do the concatenation between lowest part of `ACTIVE_PTR` and highest part of `_farCallAbi` 112 /// forming packed fat pointer for a far call or ret ABI when necessary. 113 /// Note: Panics if the lowest 128 bits of `_farCallAbi` are not zeroes. 114: function ptrPackIntoActivePtr(uint256 _farCallAbi) internal view { /// @audit Missing '@param _value' 121 /// @notice Compiler simulation of the `ptr.add` opcode for the virtual `ACTIVE_PTR` pointer. 122 /// @dev Transforms `ACTIVE_PTR.offset` into `ACTIVE_PTR.offset + u32(_value)`. If overflow happens then it panics. 123: function ptrAddIntoActive(uint32 _value) internal view { /// @audit Missing '@param _shrink' 133 /// @notice Compiler simulation of the `ptr.shrink` opcode for the virtual `ACTIVE_PTR` pointer. 134 /// @dev Transforms `ACTIVE_PTR.length` into `ACTIVE_PTR.length - u32(_shrink)`. If underflow happens then it panics. 135: function ptrShrinkIntoActive(uint32 _shrink) internal view { /// @audit Missing '@param index' 332 /// @notice Returns the N-th extraAbiParam for the current call. 333 /// @return extraAbiData The value of the N-th extraAbiParam for this call. 334 /// @dev It is equal to the value of the (N+2)-th register 335 /// at the start of the call. 336: function getExtraAbiData(uint256 index) internal view returns (uint256 extraAbiData) { ``` *GitHub*: [110](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L108-L112), [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L119-L121), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L131-L133), [332](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L330-L334) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit Missing '@param _transaction' 100 /// @notice Calculate the suggested signed hash of the transaction, 101 /// i.e. the hash that is signed by EOAs and is recommended to be signed by other accounts. 102: function encodeHash(Transaction calldata _transaction) internal view returns (bytes32 resultHash) { /// @audit Missing '@param _transaction' 118 /// @notice Encode hash of the zkSync native transaction type. 119 /// @return keccak256 hash of the EIP-712 encoded representation of transaction 120: function _encodeHashEIP712Transaction(Transaction calldata _transaction) private view returns (bytes32) { /// @audit Missing '@param _transaction' 147 /// @notice Encode hash of the legacy transaction type. 148 /// @return keccak256 of the serialized RLP encoded representation of transaction 149: function _encodeHashLegacyTransaction(Transaction calldata _transaction) private view returns (bytes32) { /// @audit Missing '@param _transaction' 219 /// @notice Encode hash of the EIP2930 transaction type. 220 /// @return keccak256 of the serialized RLP encoded representation of transaction 221: function _encodeHashEIP2930Transaction(Transaction calldata _transaction) private view returns (bytes32) { /// @audit Missing '@param _transaction' 289 /// @notice Encode hash of the EIP1559 transaction type. 290 /// @return keccak256 of the serialized RLP encoded representation of transaction 291: function _encodeHashEIP1559Transaction(Transaction calldata _transaction) private view returns (bytes32) { /// @audit Missing '@param _transaction' 361 /// @notice Processes the common paymaster flows, e.g. setting proper allowance 362 /// for tokens, etc. For more information on the expected behavior, check out 363 /// the "Paymaster flows" section in the documentation. 364: function processPaymasterInput(Transaction calldata _transaction) internal { /// @audit Missing '@param _transaction' 394 /// @notice Pays the required fee for the transaction to the bootloader. 395 /// @dev Currently it pays the maximum amount "_transaction.maxFeePerGas * _transaction.gasLimit", 396 /// it will change in the future. 397: function payToTheBootloader(Transaction calldata _transaction) internal returns (bool success) { /// @audit Missing '@param _transaction' 407: function totalRequiredBalance(Transaction calldata _transaction) internal pure returns (uint256 requiredBalance) { ``` *GitHub*: [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L98-L100), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L116-L118), [147](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L145-L147), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L217-L219), [289](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L287-L289), [361](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L359-L362), [394](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L392-L395), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L405-L405) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 21: function readUint16(bytes calldata _bytes, uint256 _start) internal pure returns (uint16 result) { /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 28: function readUint32(bytes calldata _bytes, uint256 _start) internal pure returns (uint32 result) { /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 35: function readUint64(bytes calldata _bytes, uint256 _start) internal pure returns (uint64 result) { /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 42: function readBytes32(bytes calldata _bytes, uint256 _start) internal pure returns (bytes32 result) { /// @audit Missing '@param _bytes' /// @audit Missing '@param _start' 48: function readUint256(bytes calldata _bytes, uint256 _start) internal pure returns (uint256 result) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol /// @audit Missing '@param _x' 22: function safeCastToU128(uint256 _x) internal pure returns (uint128) { /// @audit Missing '@param _x' 28: function safeCastToU32(uint256 _x) internal pure returns (uint32) { /// @audit Missing '@param _x' 34: function safeCastToU24(uint256 _x) internal pure returns (uint24) { /// @audit Missing '@param _bytecodeHash' 40 /// @return codeLength The bytecode length in bytes 41: function bytecodeLenInBytes(bytes32 _bytecodeHash) internal pure returns (uint256 codeLength) { /// @audit Missing '@param _bytecodeHash' 45 /// @return codeLengthInWords The bytecode length in machine words 46: function bytecodeLenInWords(bytes32 _bytecodeHash) internal pure returns (uint256 codeLengthInWords) { /// @audit Missing '@param _bytecodeHash' 52 /// @notice Denotes whether bytecode hash corresponds to a contract that already constructed 53: function isContractConstructed(bytes32 _bytecodeHash) internal pure returns (bool) { /// @audit Missing '@param _bytecodeHash' 57 /// @notice Denotes whether bytecode hash corresponds to a contract that is on constructor or has already been constructed 58: function isContractConstructing(bytes32 _bytecodeHash) internal pure returns (bool) { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L20-L20), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L26-L26), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L32-L32), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L38-L39), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L43-L44), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L50-L51), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L55-L56) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol /// @audit Missing '@param account' 28 * 29 * [IMPORTANT] 30 * ==== 31 * You shouldn't rely on `isContract` to protect against flash loan attacks! 32 * 33 * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets 34 * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract 35 * constructor. 36 * ==== 37 */ 38: function isContract(address account) internal view returns (bool) { /// @audit Missing '@param recipient' /// @audit Missing '@param amount' 52 * imposed by `transfer`, making them unable to receive funds via 53 * `transfer`. {sendValue} removes this limitation. 54 * 55 * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. 56 * 57 * IMPORTANT: because control is transferred to `recipient`, care must be 58 * taken to not create reentrancy vulnerabilities. Consider using 59 * {ReentrancyGuard} or the 60 * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. 61 */ 62: function sendValue(address payable recipient, uint256 amount) internal { /// @audit Missing '@param target' /// @audit Missing '@param data' 83 * Returns the raw returned data. To convert to the expected return value, 84 * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. 85 * 86 * Requirements: 87 * 88 * - `target` must be a contract. 89 * - calling `target` with `data` must not revert. 90 * 91 * _Available since v3.1._ 92 */ 93: function functionCall(address target, bytes memory data) /// @audit Missing '@param target' 106 /** 107 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with 108 * `errorMessage` as a fallback revert reason when `target` reverts. 109 * 110 * _Available since v3.1._ 111 */ 112 function functionCall( 113: address target, /// @audit Missing '@param data' 106 /** 107 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with 108 * `errorMessage` as a fallback revert reason when `target` reverts. 109 * 110 * _Available since v3.1._ 111 */ 112 function functionCall( 113 address target, 114: bytes memory data, /// @audit Missing '@param errorMessage' 106 /** 107 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with 108 * `errorMessage` as a fallback revert reason when `target` reverts. 109 * 110 * _Available since v3.1._ 111 */ 112 function functionCall( 113 address target, 114 bytes memory data, 115: string memory errorMessage /// @audit Missing '@param target' 122 * but also transferring `value` wei to `target`. 123 * 124 * Requirements: 125 * 126 * - the calling contract must have an ETH balance of at least `value`. 127 * - the called Solidity function must be `payable`. 128 * 129 * _Available since v3.1._ 130 */ 131 function functionCallWithValue( 132: address target, /// @audit Missing '@param data' 123 * 124 * Requirements: 125 * 126 * - the calling contract must have an ETH balance of at least `value`. 127 * - the called Solidity function must be `payable`. 128 * 129 * _Available since v3.1._ 130 */ 131 function functionCallWithValue( 132 address target, 133: bytes memory data, /// @audit Missing '@param value' 124 * Requirements: 125 * 126 * - the calling contract must have an ETH balance of at least `value`. 127 * - the called Solidity function must be `payable`. 128 * 129 * _Available since v3.1._ 130 */ 131 function functionCallWithValue( 132 address target, 133 bytes memory data, 134: uint256 value /// @audit Missing '@param target' 145 /** 146 * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but 147 * with `errorMessage` as a fallback revert reason when `target` reverts. 148 * 149 * _Available since v3.1._ 150 */ 151 function functionCallWithValue( 152: address target, /// @audit Missing '@param data' 145 /** 146 * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but 147 * with `errorMessage` as a fallback revert reason when `target` reverts. 148 * 149 * _Available since v3.1._ 150 */ 151 function functionCallWithValue( 152 address target, 153: bytes memory data, /// @audit Missing '@param value' 145 /** 146 * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but 147 * with `errorMessage` as a fallback revert reason when `target` reverts. 148 * 149 * _Available since v3.1._ 150 */ 151 function functionCallWithValue( 152 address target, 153 bytes memory data, 154: uint256 value, /// @audit Missing '@param errorMessage' 145 /** 146 * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but 147 * with `errorMessage` as a fallback revert reason when `target` reverts. 148 * 149 * _Available since v3.1._ 150 */ 151 function functionCallWithValue( 152 address target, 153 bytes memory data, 154 uint256 value, 155: string memory errorMessage /// @audit Missing '@param target' /// @audit Missing '@param data' 173 /** 174 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], 175 * but performing a static call. 176 * 177 * _Available since v3.3._ 178 */ 179: function functionStaticCall(address target, bytes memory data) /// @audit Missing '@param target' 192 /** 193 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 194 * but performing a static call. 195 * 196 * _Available since v3.3._ 197 */ 198 function functionStaticCall( 199: address target, /// @audit Missing '@param data' 192 /** 193 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 194 * but performing a static call. 195 * 196 * _Available since v3.3._ 197 */ 198 function functionStaticCall( 199 address target, 200: bytes memory data, /// @audit Missing '@param errorMessage' 192 /** 193 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 194 * but performing a static call. 195 * 196 * _Available since v3.3._ 197 */ 198 function functionStaticCall( 199 address target, 200 bytes memory data, 201: string memory errorMessage /// @audit Missing '@param target' /// @audit Missing '@param data' 213 /** 214 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], 215 * but performing a delegate call. 216 * 217 * _Available since v3.4._ 218 */ 219: function functionDelegateCall(address target, bytes memory data) /// @audit Missing '@param target' 231 /** 232 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 233 * but performing a delegate call. 234 * 235 * _Available since v3.4._ 236 */ 237 function functionDelegateCall( 238: address target, /// @audit Missing '@param data' 231 /** 232 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 233 * but performing a delegate call. 234 * 235 * _Available since v3.4._ 236 */ 237 function functionDelegateCall( 238 address target, 239: bytes memory data, /// @audit Missing '@param errorMessage' 231 /** 232 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 233 * but performing a delegate call. 234 * 235 * _Available since v3.4._ 236 */ 237 function functionDelegateCall( 238 address target, 239 bytes memory data, 240: string memory errorMessage /// @audit Missing '@param target' 252 /** 253 * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling 254 * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. 255 * 256 * _Available since v4.8._ 257 */ 258 function verifyCallResultFromTarget( 259: address target, /// @audit Missing '@param success' 252 /** 253 * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling 254 * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. 255 * 256 * _Available since v4.8._ 257 */ 258 function verifyCallResultFromTarget( 259 address target, 260: bool success, /// @audit Missing '@param returndata' 252 /** 253 * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling 254 * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. 255 * 256 * _Available since v4.8._ 257 */ 258 function verifyCallResultFromTarget( 259 address target, 260 bool success, 261: bytes memory returndata, /// @audit Missing '@param errorMessage' 252 /** 253 * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling 254 * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. 255 * 256 * _Available since v4.8._ 257 */ 258 function verifyCallResultFromTarget( 259 address target, 260 bool success, 261 bytes memory returndata, 262: string memory errorMessage /// @audit Missing '@param success' 276 /** 277 * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the 278 * revert reason or using the provided one. 279 * 280 * _Available since v4.3._ 281 */ 282 function verifyCallResult( 283: bool success, /// @audit Missing '@param returndata' 276 /** 277 * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the 278 * revert reason or using the provided one. 279 * 280 * _Available since v4.3._ 281 */ 282 function verifyCallResult( 283 bool success, 284: bytes memory returndata, /// @audit Missing '@param errorMessage' 276 /** 277 * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the 278 * revert reason or using the provided one. 279 * 280 * _Available since v4.3._ 281 */ 282 function verifyCallResult( 283 bool success, 284 bytes memory returndata, 285: string memory errorMessage /// @audit Missing '@param returndata' /// @audit Missing '@param errorMessage' 294: function _revert(bytes memory returndata, string memory errorMessage) ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L26-L36), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L50-L60), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L50-L60), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L81-L91), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L81-L91), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L104-L111), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L104-L112), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L104-L113), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L120-L130), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L121-L131), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L122-L132), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L143-L150), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L143-L151), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L143-L152), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L143-L153), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L171-L177), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L171-L177), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L190-L197), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L190-L198), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L190-L199), [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L211-L217), [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L211-L217), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L229-L236), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L229-L237), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L229-L238), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L250-L257), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L250-L258), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L250-L259), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L250-L260), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L274-L281), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L274-L282), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L274-L283), [294](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L292-L292), [294](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L292-L292)
### [N‑70] NatSpec: Function `@return` tag is missing *There are 250 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit Missing '@return txCalldata' 226 /// @dev Generate a calldata for calling the deposit finalization on the L2 bridge contract 227 function _getDepositL2Calldata( 228 address _l1Sender, 229 address _l2Receiver, 230 address _l1Token, 231 uint256 _amount 232: ) internal view returns (bytes memory txCalldata) { /// @audit Missing '@return data' 241 /// @dev Receives and parses (name, symbol, decimals) from the token contract 242: function _getERC20Getters(address _token) internal view returns (bytes memory data) { /// @audit Missing '@return l1Receiver' /// @audit Missing '@return l1Token' /// @audit Missing '@return amount' 324 /// @dev Decode the withdraw message that came from L2 325 function _parseL2WithdrawalMessage( 326 bytes memory _l2ToL1message 327: ) internal pure returns (address l1Receiver, address l1Token, uint256 amount) { ``` *GitHub*: [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L224-L230), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L239-L240), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L322-L325), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L322-L325), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L322-L325) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit Missing '@return txCalldata' 200 /// @dev Generate a calldata for calling the deposit finalization on the L2 WETH bridge contract 201 function _getDepositL2Calldata( 202 address _l1Sender, 203 address _l2Receiver, 204 address _l1Token, 205 uint256 _amount 206: ) internal pure returns (bytes memory txCalldata) { /// @audit Missing '@return l1WethReceiver' /// @audit Missing '@return ethAmount' 272 /// @dev Decode the ETH withdraw message with additional data about WETH withdrawal that came from L2EthToken 273 /// contract 274 function _parseL2EthWithdrawalMessage( 275 bytes memory _message 276: ) internal view returns (address l1WethReceiver, uint256 ethAmount) { ``` *GitHub*: [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L198-L204), [272](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L270-L274), [272](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L270-L274) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol /// @audit Missing '@return ' 21: function isWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); /// @audit Missing '@return txHash' 23 function deposit( 24 address _l2Receiver, 25 address _l1Token, 26 uint256 _amount, 27 uint256 _l2TxGasLimit, 28 uint256 _l2TxGasPerPubdataByte, 29 address _refundRecipient 30: ) external payable returns (bytes32 txHash); /// @audit Missing '@return ' 50: function l2TokenAddress(address _l1Token) external view returns (address); /// @audit Missing '@return ' 52: function l2Bridge() external view returns (address); ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L19-L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L28), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol /// @audit Missing '@return txHash' 9 function deposit( 10 address _l2Receiver, 11 address _l1Token, 12 uint256 _amount, 13 uint256 _l2TxGasLimit, 14 uint256 _l2TxGasPerPubdataByte 15: ) external payable returns (bytes32 txHash); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L13) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol /// @audit Missing '@return ' 23: function l1TokenAddress(address _l2Token) external view returns (address); /// @audit Missing '@return ' 25: function l2TokenAddress(address _l1Token) external view returns (address); /// @audit Missing '@return ' 27: function l1Bridge() external view returns (address); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L21-L21), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L23-L23), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol /// @audit Missing '@return deployedAddress' 28 /// @param _deployTransactionFee The fee that will be paid for the L1 -> L2 transaction 29 /// @param _bytecodeHash The hash of the bytecode of the contract to be deployed 30 /// @param _constructorData The data to be passed to the contract constructor 31 /// @param _factoryDeps A list of raw bytecodes that are needed for deployment 32 function requestDeployTransaction( 33 IZkSync _zkSync, 34 uint256 _deployTransactionFee, 35 bytes32 _bytecodeHash, 36 bytes memory _constructorData, 37 bytes[] memory _factoryDeps 38: ) internal returns (address deployedAddress) { ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L26-L36) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol /// @audit Missing '@return ' 136 /// @dev Get deposit limit data of a token 137 /// @param _l1Token The address of L1 token 138: function getTokenDepositLimitData(address _l1Token) external view returns (Deposit memory) { ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L134-L136) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol /// @audit Missing '@return ' 40: function getAccessMode(address _target) external view returns (AccessMode); /// @audit Missing '@return ' 42 function hasSpecialAccessToCall( 43 address _caller, 44 address _target, 45 bytes4 _functionSig 46: ) external view returns (bool); /// @audit Missing '@return ' 48 function canCall( 49 address _caller, 50 address _target, 51 bytes4 _functionSig 52: ) external view returns (bool); /// @audit Missing '@return ' 54: function getTokenDepositLimitData(address _l1Token) external view returns (Deposit memory); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L40-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L46-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L52-L52) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol /// @audit Missing '@return ' 13: function uncheckedInc(uint256 _number) internal pure returns (uint256) { /// @audit Missing '@return ' 19: function uncheckedAdd(uint256 _lhs, uint256 _rhs) internal pure returns (uint256) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L11-L11), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol /// @audit Missing '@return result' /// @audit Missing '@return offset' 21: function readUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32 result, uint256 offset) { /// @audit Missing '@return result' /// @audit Missing '@return offset' 28: function readAddress(bytes memory _bytes, uint256 _start) internal pure returns (address result, uint256 offset) { /// @audit Missing '@return result' /// @audit Missing '@return offset' 35: function readUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256 result, uint256 offset) { /// @audit Missing '@return result' /// @audit Missing '@return offset' 42: function readBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32 result, uint256 offset) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit Missing '@return ' 84 /// @dev Returns whether an id corresponds to a registered operation. This 85 /// includes both Waiting, Ready, and Done operations. 86: function isOperation(bytes32 _id) public view returns (bool) { /// @audit Missing '@return ' 90 /// @dev Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready". 91: function isOperationPending(bytes32 _id) public view returns (bool) { /// @audit Missing '@return ' 96 /// @dev Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending". 97: function isOperationReady(bytes32 _id) public view returns (bool) { /// @audit Missing '@return ' 101 /// @dev Returns whether an operation is done or not. 102: function isOperationDone(bytes32 _id) public view returns (bool) { /// @audit Missing '@return ' 106 /// @dev Returns operation state. 107: function getOperationState(bytes32 _id) public view returns (OperationState) { /// @audit Missing '@return ' 204 /// @dev Returns the identifier of an operation. 205 /// @param _operation The operation object to compute the identifier for. 206: function hashOperation(Operation calldata _operation) public pure returns (bytes32) { ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L82-L84), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L88-L89), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L94-L95), [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L99-L100), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L104-L105), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L202-L204) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol /// @audit Missing '@return ' 40: function isOperation(bytes32 _id) external view returns (bool); /// @audit Missing '@return ' 42: function isOperationPending(bytes32 _id) external view returns (bool); /// @audit Missing '@return ' 44: function isOperationReady(bytes32 _id) external view returns (bool); /// @audit Missing '@return ' 46: function isOperationDone(bytes32 _id) external view returns (bool); /// @audit Missing '@return ' 48: function getOperationState(bytes32 _id) external view returns (OperationState); /// @audit Missing '@return ' 60: function hashOperation(Operation calldata _operation) external pure returns (bytes32); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L42-L42), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L46-L46), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L58-L58) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit Missing '@return ' 68 /// @notice The main function that will be provided by the upgrade proxy 69: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public virtual returns (bytes32) { ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L66-L67) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol /// @audit Missing '@return ' 25 /// @notice The main function that will be called by the upgrade proxy. 26 /// @param _proposedUpgrade The upgrade to be executed. 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L23-L25) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit Missing '@return ' 72 /// @dev Returns the timestamp when `_l2BatchNumber` was committed. 73: function getCommittedBatchTimestamp(uint256 _l2BatchNumber) external view returns (uint256) { ``` *GitHub*: [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L70-L71) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit Missing '@return ' 26 /// @dev Process one batch commit using the previous batch StoredBatchInfo 27 /// @dev returns new batch StoredBatchInfo 28 /// @notice Does not change storage 29 function _commitOneBatch( 30 StoredBatchInfo memory _previousBatch, 31 CommitBatchInfo calldata _newBatch, 32 bytes32 _expectedSystemContractUpgradeTxHash 33: ) internal view returns (StoredBatchInfo memory) { /// @audit Missing '@return numberOfLayer1Txs' 99 /// @dev Check that L2 logs are proper and batch contain all meta information for them 100 /// @dev The logs processed here should line up such that only one log for each key from the 101 /// SystemLogKey enum in Constants.sol is processed per new batch. 102 /// @dev Data returned from here will be used to form the batch commitment. 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107: uint256 numberOfLayer1Txs, /// @audit Missing '@return chainedPriorityTxsHash' 99 /// @dev Check that L2 logs are proper and batch contain all meta information for them 100 /// @dev The logs processed here should line up such that only one log for each key from the 101 /// SystemLogKey enum in Constants.sol is processed per new batch. 102 /// @dev Data returned from here will be used to form the batch commitment. 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108: bytes32 chainedPriorityTxsHash, /// @audit Missing '@return previousBatchHash' 99 /// @dev Check that L2 logs are proper and batch contain all meta information for them 100 /// @dev The logs processed here should line up such that only one log for each key from the 101 /// SystemLogKey enum in Constants.sol is processed per new batch. 102 /// @dev Data returned from here will be used to form the batch commitment. 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109: bytes32 previousBatchHash, /// @audit Missing '@return stateDiffHash' 100 /// @dev The logs processed here should line up such that only one log for each key from the 101 /// SystemLogKey enum in Constants.sol is processed per new batch. 102 /// @dev Data returned from here will be used to form the batch commitment. 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109 bytes32 previousBatchHash, 110: bytes32 stateDiffHash, /// @audit Missing '@return l2LogsTreeRoot' 101 /// SystemLogKey enum in Constants.sol is processed per new batch. 102 /// @dev Data returned from here will be used to form the batch commitment. 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109 bytes32 previousBatchHash, 110 bytes32 stateDiffHash, 111: bytes32 l2LogsTreeRoot, /// @audit Missing '@return packedBatchAndL2BlockTimestamp' 102 /// @dev Data returned from here will be used to form the batch commitment. 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109 bytes32 previousBatchHash, 110 bytes32 stateDiffHash, 111 bytes32 l2LogsTreeRoot, 112: uint256 packedBatchAndL2BlockTimestamp /// @audit Missing '@return concatHash' 261 /// @dev Pops the priority operations from the priority queue and returns a rolling hash of operations 262: function _collectOperationsFromPriorityQueue(uint256 _nPriorityOps) internal returns (bytes32 concatHash) { /// @audit Missing '@return ' 368 /// @dev Gets zk proof public input 369 function _getBatchProofPublicInput( 370 bytes32 _prevBatchCommitment, 371 bytes32 _currentBatchCommitment, 372 VerifierParams memory _verifierParams 373: ) internal pure returns (uint256) { /// @audit Missing '@return ' 409 /// @notice Returns larger of two values 410: function _maxU256(uint256 a, uint256 b) internal pure returns (uint256) { /// @audit Missing '@return ' 414 /// @dev Creates batch commitment from its data 415 function _createBatchCommitment(CommitBatchInfo calldata _newBatchData, bytes32 _stateDiffHash) 416 internal 417 view 418: returns (bytes32) /// @audit Missing '@return ' 427: function _batchPassThroughData(CommitBatchInfo calldata _batch) internal pure returns (bytes memory) { /// @audit Missing '@return ' 437: function _batchMetaParameters() internal view returns (bytes memory) { /// @audit Missing '@return ' 441 function _batchAuxiliaryOutput(CommitBatchInfo calldata _batch, bytes32 _stateDiffHash) 442 internal 443 pure 444: returns (bytes memory) /// @audit Missing '@return ' 459 /// @notice Returns the keccak hash of the ABI-encoded StoredBatchInfo 460: function _hashStoredBatchInfo(StoredBatchInfo memory _storedBatchInfo) internal pure returns (bytes32) { /// @audit Missing '@return ' 464 /// @notice Returns true if the bit at index {_index} is 1 465: function _checkBit(uint256 _bitMap, uint8 _index) internal pure returns (bool) { /// @audit Missing '@return ' 469 /// @notice Sets the given bit in {_num} at index {_index} to 1. 470: function _setBit(uint256 _bitMap, uint8 _index) internal pure returns (uint256) { ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L24-L31), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L97-L105), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L97-L106), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L97-L107), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L98-L108), [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L99-L109), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L100-L110), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L259-L260), [368](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L366-L371), [409](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L407-L408), [414](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L412-L416), [427](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L425-L425), [437](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L435-L435), [441](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L439-L442), [459](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L457-L458), [464](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L462-L463), [469](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L467-L468) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit Missing '@return ' 124 /// @dev Prove that a specific L2 log was sent in a specific L2 batch number 125 function _proveL2LogInclusion( 126 uint256 _batchNumber, 127 uint256 _index, 128 L2Log memory _log, 129 bytes32[] calldata _proof 130: ) internal view returns (bool) { /// @audit Missing '@return ' 150 /// @dev Convert arbitrary-length message to the raw l2 log 151: function _L2MessageToLog(L2Message memory _message) internal pure returns (L2Log memory) { /// @audit Missing '@return canonicalTxHash' 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291 uint256 _l2GasPerPubdataByteLimit, 292 bytes[] calldata _factoryDeps, 293 bool _isFree, 294 address _refundRecipient 295: ) internal returns (bytes32 canonicalTxHash) { /// @audit Missing '@return transaction' 331 function _serializeL2Transaction( 332 WritePriorityOpParams memory _priorityOpParams, 333 bytes calldata _calldata, 334 bytes[] calldata _factoryDeps 335: ) internal pure returns (L2CanonicalTransaction memory transaction) { /// @audit Missing '@return canonicalTxHash' 357 /// @notice Stores a transaction record in storage & send event about that 358 function _writePriorityOp( 359 WritePriorityOpParams memory _priorityOpParams, 360 bytes calldata _calldata, 361 bytes[] calldata _factoryDeps 362: ) internal returns (bytes32 canonicalTxHash) { /// @audit Missing '@return hashedFactoryDeps' 389 /// @notice Hashes the L2 bytecodes and returns them in the format in which they are processed by the bootloader 390 function _hashFactoryDeps(bytes[] calldata _factoryDeps) 391 internal 392 pure 393: returns (uint256[] memory hashedFactoryDeps) /// @audit Missing '@return l1Receiver' /// @audit Missing '@return amount' 407 /// @dev Decode the withdraw message that came from L2 408 function _parseL2WithdrawalMessage(bytes memory _message) 409 internal 410 pure 411: returns (address l1Receiver, uint256 amount) ``` *GitHub*: [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L122-L128), [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L148-L149), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L293), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L329-L333), [357](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L355-L360), [389](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L387-L391), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L405-L409), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L405-L409) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol /// @audit Missing '@return ' 7: function getName() external view returns (string memory); ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol /// @audit Missing '@return ' 16: function getVerifier() external view returns (address); /// @audit Missing '@return ' 18: function getGovernor() external view returns (address); /// @audit Missing '@return ' 20: function getPendingGovernor() external view returns (address); /// @audit Missing '@return ' 22: function getTotalBatchesCommitted() external view returns (uint256); /// @audit Missing '@return ' 24: function getTotalBatchesVerified() external view returns (uint256); /// @audit Missing '@return ' 26: function getTotalBatchesExecuted() external view returns (uint256); /// @audit Missing '@return ' 28: function getTotalPriorityTxs() external view returns (uint256); /// @audit Missing '@return ' 30: function getFirstUnprocessedPriorityTx() external view returns (uint256); /// @audit Missing '@return ' 32: function getPriorityQueueSize() external view returns (uint256); /// @audit Missing '@return ' 34: function priorityQueueFrontOperation() external view returns (PriorityOperation memory); /// @audit Missing '@return ' 36: function isValidator(address _address) external view returns (bool); /// @audit Missing '@return hash' 38: function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32 hash); /// @audit Missing '@return ' 40: function storedBatchHash(uint256 _batchNumber) external view returns (bytes32); /// @audit Missing '@return ' 42: function getL2BootloaderBytecodeHash() external view returns (bytes32); /// @audit Missing '@return ' 44: function getL2DefaultAccountBytecodeHash() external view returns (bytes32); /// @audit Missing '@return ' 46: function getVerifierParams() external view returns (VerifierParams memory); /// @audit Missing '@return ' 48: function isDiamondStorageFrozen() external view returns (bool); /// @audit Missing '@return ' 50: function getProtocolVersion() external view returns (uint256); /// @audit Missing '@return ' 52: function getL2SystemContractsUpgradeTxHash() external view returns (bytes32); /// @audit Missing '@return ' 54: function getL2SystemContractsUpgradeBatchNumber() external view returns (uint256); /// @audit Missing '@return ' 56: function getPriorityTxMaxGasLimit() external view returns (uint256); /// @audit Missing '@return ' 58: function getAllowList() external view returns (address); /// @audit Missing '@return ' 60: function isEthWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); /// @audit Missing '@return ' 74: function facets() external view returns (Facet[] memory); /// @audit Missing '@return ' 76: function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory); /// @audit Missing '@return facets' 78: function facetAddresses() external view returns (address[] memory facets); /// @audit Missing '@return facet' 80: function facetAddress(bytes4 _selector) external view returns (address facet); /// @audit Missing '@return ' 82: function isFunctionFreezable(bytes4 _selector) external view returns (bool); /// @audit Missing '@return isFreezable' 84: function isFacetFreezable(address _facet) external view returns (bool isFreezable); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L22-L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L28-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L30-L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L32-L32), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L36-L36), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L42-L42), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L46-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L52-L52), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L56-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L58-L58), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L72-L72), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L74-L74), [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L76-L76), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L78-L78), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L80-L80), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L82-L82) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol /// @audit Missing '@return ' 14: function getTotalBlocksCommitted() external view returns (uint256); /// @audit Missing '@return ' 16: function getTotalBlocksVerified() external view returns (uint256); /// @audit Missing '@return ' 18: function getTotalBlocksExecuted() external view returns (uint256); /// @audit Missing '@return ' 20: function storedBlockHash(uint256 _batchNumber) external view returns (bytes32); /// @audit Missing '@return ' 22: function getL2SystemContractsUpgradeBlockNumber() external view returns (uint256); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol /// @audit Missing '@return ' 91 function proveL2MessageInclusion( 92 uint256 _l2BatchNumber, 93 uint256 _index, 94 L2Message calldata _message, 95 bytes32[] calldata _proof 96: ) external view returns (bool); /// @audit Missing '@return ' 98 function proveL2LogInclusion( 99 uint256 _l2BatchNumber, 100 uint256 _index, 101 L2Log memory _log, 102 bytes32[] calldata _proof 103: ) external view returns (bool); /// @audit Missing '@return ' 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108 uint256 _l2MessageIndex, 109 uint16 _l2TxNumberInBatch, 110 bytes32[] calldata _merkleProof, 111 TxStatus _status 112: ) external view returns (bool); /// @audit Missing '@return canonicalTxHash' 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126 uint256 _l2GasLimit, 127 uint256 _l2GasPerPubdataByteLimit, 128 bytes[] calldata _factoryDeps, 129 address _refundRecipient 130: ) external payable returns (bytes32 canonicalTxHash); /// @audit Missing '@return ' 132 function l2TransactionBaseCost( 133 uint256 _gasPrice, 134 uint256 _l2GasLimit, 135 uint256 _l2GasPerPubdataByteLimit 136: ) external view returns (uint256); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L94), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L101), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L110), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L128), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130-L134) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol /// @audit Missing '@return result' 41 /// @dev Keccak hash of the concatenation of two 32-byte words 42: function _efficientHash(bytes32 _lhs, bytes32 _rhs) private pure returns (bytes32 result) { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L39-L40) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol /// @audit Missing '@return txBodyGasLimit' 106 /// @notice Based on the full L2 gas limit (that includes the batch overhead) and other 107 /// properties of the transaction, returns the l2GasLimit for the body of the transaction (the actual execution). 108 /// @param _totalGasLimit The L2 gas limit that includes both the overhead for processing the batch 109 /// and the L2 gas needed to process the transaction itself (i.e. the actual l2GasLimit that will be used for the transaction). 110 /// @param _gasPricePerPubdata The L2 gas price for each byte of pubdata. 111 /// @param _encodingLength The length of the ABI-encoding of the transaction. 112 function getTransactionBodyGasLimit( 113 uint256 _totalGasLimit, 114 uint256 _gasPricePerPubdata, 115 uint256 _encodingLength 116: ) internal pure returns (uint256 txBodyGasLimit) { /// @audit Missing '@return batchOverheadForTransaction' 129 /// of the fee model of zkSync. The appropriate comments are also present 130 /// in the Rust implementation description of function `get_maximal_allowed_overhead`. 131 /// @param _totalGasLimit The L2 gas limit that includes both the overhead for processing the batch 132 /// and the L2 gas needed to process the transaction itself (i.e. the actual gasLimit that will be used for the transaction). 133 /// @param _gasPricePerPubdata The maximum amount of L2 gas that the operator may charge the user for a single byte of pubdata. 134 /// @param _encodingLength The length of the binary encoding of the transaction in bytes 135 function getOverheadForTransaction( 136 uint256 _totalGasLimit, 137 uint256 _gasPricePerPubdata, 138 uint256 _encodingLength 139: ) internal pure returns (uint256 batchOverheadForTransaction) { ``` *GitHub*: [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L104-L114), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L127-L137) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit Missing '@return ' 92 /// @dev Deploy and initialize the L2 token for the L1 counterpart 93: function _deployL2Token(address _l1Token, bytes calldata _data) internal returns (address) { /// @audit Missing '@return ' 123 /// @dev Encode the message for l2ToL1log sent with withdraw initialization 124 function _getL1WithdrawMessage( 125 address _to, 126 address _l1Token, 127 uint256 _amount 128: ) internal pure returns (bytes memory) { /// @audit Missing '@return salt' 141 /// @dev Convert the L1 token address to the create2 salt of deployed L2 token 142: function _getCreate2Salt(address _l1Token) internal pure returns (bytes32 salt) { /// @audit Missing '@return proxy' 146 /// @dev Deploy the beacon proxy for the L2 token, while using ContractDeployer system contract. 147 /// @dev This function uses raw call to ContractDeployer to make sure that exactly `l2TokenProxyBytecodeHash` is used 148 /// for the code of the proxy. 149: function _deployBeaconProxy(bytes32 salt) internal returns (BeaconProxy proxy) { ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L90-L91), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L121-L126), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L139-L140), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L144-L147) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit Missing '@return ' 125: function name() public view override returns (string memory) { /// @audit Missing '@return ' 131: function symbol() public view override returns (string memory) { /// @audit Missing '@return ' 137: function decimals() public view override returns (uint8) { /// @audit Missing '@return result' 143 /// @dev External function to decode a string from bytes. 144: function decodeString(bytes memory _input) external pure returns (string memory result) { /// @audit Missing '@return result' 148 /// @dev External function to decode a uint8 from bytes. 149: function decodeUint8(bytes memory _input) external pure returns (uint8 result) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L123-L123), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L129-L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135-L135), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L141-L142), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L146-L147) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol /// @audit Missing '@return ' 37: function l1TokenAddress(address _l2Token) external view returns (address); /// @audit Missing '@return ' 39: function l2TokenAddress(address _l1Token) external view returns (address); /// @audit Missing '@return ' 41: function l1Bridge() external view returns (address); ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L37-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L39-L39) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol /// @audit Missing '@return ' 18: function l1Address() external view returns (address); /// @audit Missing '@return ' 20: function l2Bridge() external view returns (address); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L18-L18) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol /// @audit Missing '@return bytecodeHash' 49 /// Since the bytecode size is always a multiple of 32, this is always possible. 50 /// 2. For each 8-byte chunk in the original bytecode: 51 /// * If the chunk is not already in the dictionary, it is added to the dictionary array. 52 /// * If the dictionary becomes overcrowded (2^16 + 1 elements), the compression process will fail. 53 /// * The 2-byte index of the chunk in the dictionary is added to the encoded data. 54 /// @dev Currently, the method may be called only from the bootloader because the server is not ready to publish bytecodes 55 /// in internal transactions. However, in the future, we will allow everyone to publish compressed bytecodes. 56 function publishCompressedBytecode( 57 bytes calldata _bytecode, 58 bytes calldata _rawCompressedData 59: ) external payable onlyCallFromBootloader returns (bytes32 bytecodeHash) { /// @audit Missing '@return dictionary' /// @audit Missing '@return encodedData' 199 /// @notice Decode the raw compressed data into the dictionary and the encoded data. 200 /// @param _rawCompressedData The compressed bytecode in a format of: 201 /// - 2 bytes: the bytes length of the dictionary 202 /// - N bytes: the dictionary 203 /// - M bytes: the encoded data 204 function _decodeRawBytecode( 205 bytes calldata _rawCompressedData 206: ) internal pure returns (bytes calldata dictionary, bytes calldata encodedData) { ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L47-L57), [199](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L197-L204), [199](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L197-L204) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit Missing '@return info' 35 /// @notice Returns information about a certain account. 36: function getAccountInfo(address _address) external view returns (AccountInfo memory info) { /// @audit Missing '@return ' 40 /// @notice Returns the account abstraction version if `_address` is a deployed contract. 41 /// Returns the latest supported account abstraction version if `_address` is an EOA. 42: function extendedAccountVersion(address _address) public view returns (AccountAbstractionVersion) { /// @audit Missing '@return newAddress' 111 /// @notice Calculates the address of a deployed contract via create 112 /// @param _sender The account that deploys the contract. 113 /// @param _senderNonce The deploy nonce of the sender's account. 114 function getNewAddressCreate( 115 address _sender, 116 uint256 _senderNonce 117: ) public pure override returns (address newAddress) { /// @audit Missing '@return ' 127 /// @notice Deploys a contract with similar address derivation rules to the EVM's `CREATE2` opcode. 128 /// @param _salt The CREATE2 salt 129 /// @param _bytecodeHash The correctly formatted hash of the bytecode. 130 /// @param _input The constructor calldata 131 /// @dev In case of a revert, the zero address should be returned. 132 function create2( 133 bytes32 _salt, 134 bytes32 _bytecodeHash, 135 bytes calldata _input 136: ) external payable override returns (address) { /// @audit Missing '@return ' 142 /// @param _input The constructor calldata 143 /// @dev This method also accepts nonce as one of its parameters. 144 /// It is not used anywhere and it needed simply for the consistency for the compiler 145 /// @dev In case of a revert, the zero address should be returned. 146 /// Note: this method may be callable only in system mode, 147 /// that is checked in the `createAccount` by `onlySystemCall` modifier. 148 function create( 149 bytes32 _salt, 150 bytes32 _bytecodeHash, 151 bytes calldata _input 152: ) external payable override returns (address) { /// @audit Missing '@return ' 159 /// @param _input The constructor calldata. 160 /// @param _aaVersion The account abstraction version to use. 161 /// @dev In case of a revert, the zero address should be returned. 162 /// Note: this method may be callable only in system mode, 163 /// that is checked in the `createAccount` by `onlySystemCall` modifier. 164 function create2Account( 165 bytes32 _salt, 166 bytes32 _bytecodeHash, 167 bytes calldata _input, 168 AccountAbstractionVersion _aaVersion 169: ) public payable override onlySystemCall returns (address) { /// @audit Missing '@return ' 180 /// @param _input The constructor calldata. 181 /// @param _aaVersion The account abstraction version to use. 182 /// @dev This method also accepts salt as one of its parameters. 183 /// It is not used anywhere and it needed simply for the consistency for the compiler 184 /// @dev In case of a revert, the zero address should be returned. 185 function createAccount( 186 bytes32, // salt 187 bytes32 _bytecodeHash, 188 bytes calldata _input, 189 AccountAbstractionVersion _aaVersion 190: ) public payable override onlySystemCall returns (address) { ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L33-L34), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L38-L40), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L109-L115), [127](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L125-L134), [142](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L140-L150), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L157-L167), [180](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L178-L188) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit Missing '@return magic' 63 /// and the nonce has been set as used. 64 /// @param _suggestedSignedHash The suggested hash of the transaction to be signed by the user. 65 /// This is the hash that is signed by the EOA by default. 66 /// @param _transaction The transaction structure itself. 67 /// @dev Besides the params above, it also accepts unused first paramter "_txHash", which 68 /// is the unique (canonical) hash of the transaction. 69 function validateTransaction( 70 bytes32, // _txHash 71 bytes32 _suggestedSignedHash, 72 Transaction calldata _transaction 73: ) external payable override ignoreNonBootloader ignoreInDelegateCall returns (bytes4 magic) { /// @audit Missing '@return magic' 77 /// @notice Inner method for validating transaction and increasing the nonce 78 /// @param _suggestedSignedHash The hash of the transaction signed by the EOA 79 /// @param _transaction The transaction. 80 function _validateTransaction( 81 bytes32 _suggestedSignedHash, 82 Transaction calldata _transaction 83: ) internal returns (bytes4 magic) { ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L61-L71), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L75-L81) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit Missing '@return marker' 66 /// @notice Returns the marker stored for a bytecode hash. 1 means that the bytecode hash is known 67 /// and can be used for deploying contracts. 0 otherwise. 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L64-L66) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit Missing '@return ' 59 /// The gas cost of calculation of keccak256 of bytes array of such length. 60: function keccakGasCost(uint256 _length) internal pure returns (uint256) { /// @audit Missing '@return ' 70 /// The gas cost of calculation of sha256 of bytes array of such length. 71: function sha256GasCost(uint256 _length) internal pure returns (uint256) { /// @audit Missing '@return logIdInMerkleTree' 75 /// @notice Sends L2ToL1Log. 76 /// @dev Can be called only by a system contract. 77 function sendL2ToL1Log( 78 bool _isService, 79 bytes32 _key, 80 bytes32 _value 81: ) external onlyCallFromSystemContract returns (uint256 logIdInMerkleTree) { /// @audit Missing '@return logIdInMerkleTree' 99 /// @notice Internal function to send L2ToL1Log. 100: function _processL2ToL1Log(L2ToL1Log memory _l2ToL1Log) internal returns (uint256 logIdInMerkleTree) { /// @audit Missing '@return hash' 120 /// @notice Public functionality to send messages to L1. 121: function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L57-L58), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L68-L69), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L73-L79), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L97-L98), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L118-L119) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit Missing '@return ' 54 /// @notice Returns ETH balance of an account 55 /// @dev It takes `uint256` as an argument to be able to properly simulate the behaviour of the 56 /// Ethereum's `BALANCE` opcode that accepts uint256 as an argument and truncates any upper bits 57 /// @param _account The address of the account to return the balance of. 58: function balanceOf(uint256 _account) external view override returns (uint256) { /// @audit Missing '@return amount' 97 /// @dev The function burn the sent `msg.value`. 98 /// NOTE: Since this contract holds the mapping of all ether balances of the system, 99 /// the sent `msg.value` is added to the `this` balance before the call. 100 /// So the balance of `address(this)` is always bigger or equal to the `msg.value`! 101: function _burnMsgValue() internal returns (uint256 amount) { /// @audit Missing '@return ' 113 /// @dev Get the message to be sent to L1 to initiate a withdrawal. 114: function _getL1WithdrawMessage(address _to, uint256 _amount) internal pure returns (bytes memory) { /// @audit Missing '@return ' 118 /// @dev Get the message to be sent to L1 to initiate a withdrawal. 119 function _getExtendedWithdrawMessage( 120 address _to, 121 uint256 _amount, 122 address _sender, 123 bytes memory _additionalData 124: ) internal pure returns (bytes memory) { /// @audit Missing '@return ' 128 /// @dev This method has not been stabilized and might be 129 /// removed later on. 130: function name() external pure override returns (string memory) { /// @audit Missing '@return ' 134 /// @dev This method has not been stabilized and might be 135 /// removed later on. 136: function symbol() external pure override returns (string memory) { /// @audit Missing '@return ' 140 /// @dev This method has not been stabilized and might be 141 /// removed later on. 142: function decimals() external pure override returns (uint8) { ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L52-L56), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L95-L99), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L111-L112), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L116-L122), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L126-L128), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L132-L134), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L138-L140) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit Missing '@return value' /// @audit Missing '@return isSystemCall' /// @audit Missing '@return to' 22 /// @notice Extract value, isSystemCall and to from the extraAbi params. 23 /// @dev The contract accepts value, the callee and whether the call should a system one via its ABI params. 24 /// @dev The first ABI param contains the value in the [0..127] bits. The 128th contains 25 /// the flag whether or not the call should be a system one. 26 /// The second ABI params contains the callee. 27: function _getAbiParams() internal view returns (uint256 value, bool isSystemCall, address to) { /// @audit Missing '@return ' 37: fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L20-L25), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L20-L25), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L20-L25), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L35-L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit Missing '@return ' 149: function isNonceUsed(address _address, uint256 _nonce) public view returns (bool) { ``` *GitHub*: [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit Missing '@return ' 189 /// @notice Calculates the hash of an L2 block. 190 /// @param _blockNumber The number of the L2 block. 191 /// @param _blockTimestamp The timestamp of the L2 block. 192 /// @param _prevL2BlockHash The hash of the previous L2 block. 193 /// @param _blockTxsRollingHash The rolling hash of the transactions in the L2 block. 194 function _calculateL2BlockHash( 195 uint128 _blockNumber, 196 uint128 _blockTimestamp, 197 bytes32 _prevL2BlockHash, 198 bytes32 _blockTxsRollingHash 199: ) internal pure returns (bytes32) { /// @audit Missing '@return ' 203 /// @notice Calculates the legacy block hash of L2 block, which were used before the upgrade where 204 /// the advanced block hashes were introduced. 205 /// @param _blockNumber The number of the L2 block. 206: function _calculateLegacyL2BlockHash(uint128 _blockNumber) internal pure returns (bytes32) { /// @audit Missing '@return blockInfo' 468 /// @notice Returns the current batch's number and timestamp. 469 /// @dev Deprecated in favor of getBatchNumberAndTimestamp. 470: function currentBlockInfo() external view returns (uint256 blockInfo) { /// @audit Missing '@return blockNumber' /// @audit Missing '@return blockTimestamp' 475 /// @notice Returns the current batch's number and timestamp. 476 /// @dev Deprecated in favor of getBatchNumberAndTimestamp. 477: function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp) { /// @audit Missing '@return hash' 481 /// @notice Returns the hash of the given batch. 482 /// @dev Deprecated in favor of getBatchHash. 483: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash) { ``` *GitHub*: [189](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L187-L197), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L201-L204), [468](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L466-L468), [475](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L473-L475), [475](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L473-L475), [481](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L479-L481) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol /// @audit Missing '@return codeHash' 14: function getRawCodeHash(address _address) external view returns (bytes32 codeHash); /// @audit Missing '@return codeHash' 16: function getCodeHash(uint256 _input) external view returns (bytes32 codeHash); /// @audit Missing '@return codeSize' 18: function getCodeSize(uint256 _input) external view returns (uint256 codeSize); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol /// @audit Missing '@return txHash' /// @audit Missing '@return signedTxHash' 10 function getTransactionHashes( 11 Transaction calldata _transaction 12: ) external view returns (bytes32 txHash, bytes32 signedTxHash); ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L8-L10), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L8-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol /// @audit Missing '@return bytecodeHash' 15 function publishCompressedBytecode( 16 bytes calldata _bytecode, 17 bytes calldata _rawCompressedData 18: ) external payable returns (bytes32 bytecodeHash); /// @audit Missing '@return stateDiffHash' 20 function verifyCompressedStateDiffs( 21 uint256 _numberOfStateDiffs, 22 uint256 _enumerationIndexSize, 23 bytes calldata _stateDiffs, 24 bytes calldata _compressedStateDiffs 25: ) external payable returns (bytes32 stateDiffHash); ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L13-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L18-L23) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol /// @audit Missing '@return newAddress' 45 function getNewAddressCreate2( 46 address _sender, 47 bytes32 _bytecodeHash, 48 bytes32 _salt, 49 bytes calldata _input 50: ) external view returns (address newAddress); /// @audit Missing '@return newAddress' 52: function getNewAddressCreate(address _sender, uint256 _senderNonce) external pure returns (address newAddress); /// @audit Missing '@return newAddress' 54 function create2( 55 bytes32 _salt, 56 bytes32 _bytecodeHash, 57 bytes calldata _input 58: ) external payable returns (address newAddress); /// @audit Missing '@return newAddress' 60 function create2Account( 61 bytes32 _salt, 62 bytes32 _bytecodeHash, 63 bytes calldata _input, 64 AccountAbstractionVersion _aaVersion 65: ) external payable returns (address newAddress); /// @audit Missing '@return newAddress' 67 /// @dev While the `_salt` parameter is not used anywhere here, 68 /// it is still needed for consistency between `create` and 69 /// `create2` functions (required by the compiler). 70 function create( 71 bytes32 _salt, 72 bytes32 _bytecodeHash, 73 bytes calldata _input 74: ) external payable returns (address newAddress); /// @audit Missing '@return newAddress' 76 /// @dev While `_salt` is never used here, we leave it here as a parameter 77 /// for the consistency with the `create` function. 78 function createAccount( 79 bytes32 _salt, 80 bytes32 _bytecodeHash, 81 bytes calldata _input, 82 AccountAbstractionVersion _aaVersion 83: ) external payable returns (address newAddress); /// @audit Missing '@return info' 85 /// @notice Returns the information about a certain AA. 86: function getAccountInfo(address _address) external view returns (AccountInfo memory info); ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L43-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L52-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L58-L63), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L65-L72), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L74-L81), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L83-L84) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol /// @audit Missing '@return ' 8: function balanceOf(uint256) external view returns (uint256); /// @audit Missing '@return ' 12: function totalSupply() external view returns (uint256); /// @audit Missing '@return ' 14: function name() external pure returns (string memory); /// @audit Missing '@return ' 16: function symbol() external pure returns (string memory); /// @audit Missing '@return ' 18: function decimals() external pure returns (uint8); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L6-L6), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol /// @audit Missing '@return ' 13: function getImmutable(address _dest, uint256 _index) external view returns (bytes32); ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L11-L11) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol /// @audit Missing '@return ' 14: function getMarker(bytes32 _hash) external view returns (uint256); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol /// @audit Missing '@return ' 46: function sendToL1(bytes memory _message) external returns (bytes32); /// @audit Missing '@return logIdInMerkleTree' 48: function sendL2ToL1Log(bool _isService, bytes32 _key, bytes32 _value) external returns (uint256 logIdInMerkleTree); ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol /// @audit Missing '@return ' 16: function l1Address() external view returns (address); /// @audit Missing '@return ' 18: function l2Bridge() external view returns (address); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol /// @audit Missing '@return ' 18 /// @dev Returns the current minimal nonce for account. 19: function getMinNonce(address _address) external view returns (uint256); /// @audit Missing '@return ' 21 /// @dev Returns the raw version of the current minimal nonce 22 /// (equal to minNonce + 2^128 * deployment nonce). 23: function getRawNonce(address _address) external view returns (uint256); /// @audit Missing '@return ' 25 /// @dev Increases the minimal nonce for the msg.sender. 26: function increaseMinNonce(uint256 _value) external returns (uint256); /// @audit Missing '@return ' 31 /// @dev Gets the value stored inside a custom nonce. 32: function getValueUnderNonce(uint256 _key) external view returns (uint256); /// @audit Missing '@return ' 38 /// @dev Returns the deployment nonce for the accounts used for CREATE opcode. 39: function getDeploymentNonce(address _address) external view returns (uint256); /// @audit Missing '@return ' 41 /// @dev Increments the deployment nonce for the account and returns the previous one. 42: function incrementDeploymentNonce(address _address) external returns (uint256); /// @audit Missing '@return ' 47 /// @dev Returns whether a nonce has been used for an account. 48: function isNonceUsed(address _address, uint256 _nonce) external view returns (bool); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L16-L17), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L19-L21), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L23-L24), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L29-L30), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L36-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L39-L40), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L45-L46) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol /// @audit Missing '@return ' 31: function chainId() external view returns (uint256); /// @audit Missing '@return ' 33: function origin() external view returns (address); /// @audit Missing '@return ' 35: function gasPrice() external view returns (uint256); /// @audit Missing '@return ' 37: function blockGasLimit() external view returns (uint256); /// @audit Missing '@return ' 39: function coinbase() external view returns (address); /// @audit Missing '@return ' 41: function difficulty() external view returns (uint256); /// @audit Missing '@return ' 43: function baseFee() external view returns (uint256); /// @audit Missing '@return ' 45: function txNumberInBlock() external view returns (uint16); /// @audit Missing '@return ' 47: function getBlockHashEVM(uint256 _block) external view returns (bytes32); /// @audit Missing '@return hash' 49: function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash); /// @audit Missing '@return ' 51: function getBlockNumber() external view returns (uint128); /// @audit Missing '@return ' 53: function getBlockTimestamp() external view returns (uint128); /// @audit Missing '@return blockNumber' /// @audit Missing '@return blockTimestamp' 55: function getBatchNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); /// @audit Missing '@return blockNumber' /// @audit Missing '@return blockTimestamp' 57: function getL2BlockNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L29-L29), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L31-L31), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L33-L33), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L37-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L39-L39), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L41-L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L43-L43), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L45-L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L47-L47), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L49-L49), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L51-L51), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L53-L53), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L53-L53), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L55-L55), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L55-L55) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol /// @audit Missing '@return ' 12: function currentBlockInfo() external view returns (uint256); /// @audit Missing '@return blockNumber' /// @audit Missing '@return blockTimestamp' 14: function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp); /// @audit Missing '@return hash' 16: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash); ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L12-L12), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L14-L14) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol /// @audit Missing '@return encoded' 13: function encodeAddress(address _val) internal pure returns (bytes memory encoded) { /// @audit Missing '@return encoded' 26: function encodeUint256(uint256 _val) internal pure returns (bytes memory encoded) { /// @audit Missing '@return ' 48 /// @notice Encodes the size of bytes in RLP format. 49 /// @param _len The length of the bytes to encode. It has a `uint64` type since as larger values are not supported. 50 /// NOTE: panics if the length is 1 since the length encoding is ambiguous in this case. 51: function encodeNonSingleBytesLen(uint64 _len) internal pure returns (bytes memory) { /// @audit Missing '@return ' 56 /// @notice Encodes the size of list items in RLP format. 57 /// @param _len The length of the bytes to encode. It has a `uint64` type since as larger values are not supported. 58: function encodeListLen(uint64 _len) internal pure returns (bytes memory) { /// @audit Missing '@return encoded' 62: function _encodeLength(uint64 _len, uint256 _offset) private pure returns (bytes memory encoded) { /// @audit Missing '@return hbs' 83 /// @notice Computes the index of the highest byte set in number. 84 /// @notice Uses little endian ordering (The least significant byte has index `0`). 85 /// NOTE: returns `0` for `0` 86: function _highestByteSet(uint256 _number) private pure returns (uint256 hbs) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L11-L11), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L24-L24), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L46-L49), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L54-L56), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L60-L60), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L81-L84) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit Missing '@return addr' 88 /// @notice Get address of the currently executed code. 89 /// @dev This allows differentiating between `call` and `delegatecall`. 90 /// During the former `this` and `codeAddress` are the same, while 91 /// during the latter they are not. 92: function getCodeAddress() internal view returns (address addr) { /// @audit Missing '@return rawParams' 149 /// @param _outputMemoryLength The length of the output data in words. 150 /// @param _perPrecompileInterpreted The constant, the meaning of which is defined separately for 151 /// each precompile. For information, please read the documentation of the precompilecall log in 152 /// the VM. 153 function packPrecompileParams( 154 uint32 _inputMemoryOffset, 155 uint32 _inputMemoryLength, 156 uint32 _outputMemoryOffset, 157 uint32 _outputMemoryLength, 158 uint64 _perPrecompileInterpreted 159: ) internal pure returns (uint256 rawParams) { /// @audit Missing '@return success' 188 /// @notice Set `msg.value` to next far call. 189 /// @param _value The msg.value that will be used for the *next* call. 190 /// @dev If called not in kernel mode, it will result in a revert (enforced by the VM) 191: function setValueForNextFarCall(uint128 _value) internal returns (bool success) { ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L86-L90), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L147-L157), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L186-L189) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit Missing '@return resultHash' 100 /// @notice Calculate the suggested signed hash of the transaction, 101 /// i.e. the hash that is signed by EOAs and is recommended to be signed by other accounts. 102: function encodeHash(Transaction calldata _transaction) internal view returns (bytes32 resultHash) { /// @audit Missing '@return success' 394 /// @notice Pays the required fee for the transaction to the bootloader. 395 /// @dev Currently it pays the maximum amount "_transaction.maxFeePerGas * _transaction.gasLimit", 396 /// it will change in the future. 397: function payToTheBootloader(Transaction calldata _transaction) internal returns (bool success) { /// @audit Missing '@return requiredBalance' 407: function totalRequiredBalance(Transaction calldata _transaction) internal pure returns (uint256 requiredBalance) { ``` *GitHub*: [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L98-L100), [394](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L392-L395), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L405-L405) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol /// @audit Missing '@return result' 21: function readUint16(bytes calldata _bytes, uint256 _start) internal pure returns (uint16 result) { /// @audit Missing '@return result' 28: function readUint32(bytes calldata _bytes, uint256 _start) internal pure returns (uint32 result) { /// @audit Missing '@return result' 35: function readUint64(bytes calldata _bytes, uint256 _start) internal pure returns (uint64 result) { /// @audit Missing '@return result' 42: function readBytes32(bytes calldata _bytes, uint256 _start) internal pure returns (bytes32 result) { /// @audit Missing '@return result' 48: function readUint256(bytes calldata _bytes, uint256 _start) internal pure returns (uint256 result) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol /// @audit Missing '@return ' 22: function safeCastToU128(uint256 _x) internal pure returns (uint128) { /// @audit Missing '@return ' 28: function safeCastToU32(uint256 _x) internal pure returns (uint32) { /// @audit Missing '@return ' 34: function safeCastToU24(uint256 _x) internal pure returns (uint24) { /// @audit Missing '@return ' 52 /// @notice Denotes whether bytecode hash corresponds to a contract that already constructed 53: function isContractConstructed(bytes32 _bytecodeHash) internal pure returns (bool) { /// @audit Missing '@return ' 57 /// @notice Denotes whether bytecode hash corresponds to a contract that is on constructor or has already been constructed 58: function isContractConstructing(bytes32 _bytecodeHash) internal pure returns (bool) { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L20-L20), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L26-L26), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L32-L32), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L50-L51), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L55-L56) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol /// @audit Missing '@return ' 28 * 29 * [IMPORTANT] 30 * ==== 31 * You shouldn't rely on `isContract` to protect against flash loan attacks! 32 * 33 * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets 34 * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract 35 * constructor. 36 * ==== 37 */ 38: function isContract(address account) internal view returns (bool) { /// @audit Missing '@return ' 85 * 86 * Requirements: 87 * 88 * - `target` must be a contract. 89 * - calling `target` with `data` must not revert. 90 * 91 * _Available since v3.1._ 92 */ 93 function functionCall(address target, bytes memory data) 94 internal 95: returns (bytes memory) /// @audit Missing '@return ' 106 /** 107 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with 108 * `errorMessage` as a fallback revert reason when `target` reverts. 109 * 110 * _Available since v3.1._ 111 */ 112 function functionCall( 113 address target, 114 bytes memory data, 115 string memory errorMessage 116: ) internal returns (bytes memory) { /// @audit Missing '@return ' 125 * 126 * - the calling contract must have an ETH balance of at least `value`. 127 * - the called Solidity function must be `payable`. 128 * 129 * _Available since v3.1._ 130 */ 131 function functionCallWithValue( 132 address target, 133 bytes memory data, 134 uint256 value 135: ) internal returns (bytes memory) { /// @audit Missing '@return ' 146 * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but 147 * with `errorMessage` as a fallback revert reason when `target` reverts. 148 * 149 * _Available since v3.1._ 150 */ 151 function functionCallWithValue( 152 address target, 153 bytes memory data, 154 uint256 value, 155 string memory errorMessage 156: ) internal returns (bytes memory) { /// @audit Missing '@return ' 173 /** 174 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], 175 * but performing a static call. 176 * 177 * _Available since v3.3._ 178 */ 179 function functionStaticCall(address target, bytes memory data) 180 internal 181 view 182: returns (bytes memory) /// @audit Missing '@return ' 192 /** 193 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 194 * but performing a static call. 195 * 196 * _Available since v3.3._ 197 */ 198 function functionStaticCall( 199 address target, 200 bytes memory data, 201 string memory errorMessage 202: ) internal view returns (bytes memory) { /// @audit Missing '@return ' 213 /** 214 * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], 215 * but performing a delegate call. 216 * 217 * _Available since v3.4._ 218 */ 219 function functionDelegateCall(address target, bytes memory data) 220 internal 221: returns (bytes memory) /// @audit Missing '@return ' 231 /** 232 * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], 233 * but performing a delegate call. 234 * 235 * _Available since v3.4._ 236 */ 237 function functionDelegateCall( 238 address target, 239 bytes memory data, 240 string memory errorMessage 241: ) internal returns (bytes memory) { /// @audit Missing '@return ' 253 * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling 254 * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. 255 * 256 * _Available since v4.8._ 257 */ 258 function verifyCallResultFromTarget( 259 address target, 260 bool success, 261 bytes memory returndata, 262 string memory errorMessage 263: ) internal view returns (bytes memory) { /// @audit Missing '@return ' 276 /** 277 * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the 278 * revert reason or using the provided one. 279 * 280 * _Available since v4.3._ 281 */ 282 function verifyCallResult( 283 bool success, 284 bytes memory returndata, 285 string memory errorMessage 286: ) internal pure returns (bytes memory) { ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L26-L36), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L83-L93), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L104-L114), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L123-L133), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L144-L154), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L171-L180), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L190-L200), [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L211-L219), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L229-L239), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L251-L261), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L274-L284)
### [N‑71] NatSpec: Function declarations should have `@notice` tags `@notice` is used to explain to end users what the function does, and the compiler interprets `///` or `/**` comments as this tag if one wasn't explicitly provided *There are 182 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 21: function isWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); 23 function deposit( 24 address _l2Receiver, 25 address _l1Token, 26 uint256 _amount, 27 uint256 _l2TxGasLimit, 28 uint256 _l2TxGasPerPubdataByte, 29 address _refundRecipient 30: ) external payable returns (bytes32 txHash); 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35 bytes32 _l2TxHash, 36 uint256 _l2BatchNumber, 37 uint256 _l2MessageIndex, 38 uint16 _l2TxNumberInBatch, 39 bytes32[] calldata _merkleProof 40: ) external; 42 function finalizeWithdrawal( 43 uint256 _l2BatchNumber, 44 uint256 _l2MessageIndex, 45 uint16 _l2TxNumberInBatch, 46 bytes calldata _message, 47 bytes32[] calldata _merkleProof 48: ) external; 50: function l2TokenAddress(address _l1Token) external view returns (address); 52: function l2Bridge() external view returns (address); ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L19-L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 9 function deposit( 10 address _l2Receiver, 11 address _l1Token, 12 uint256 _amount, 13 uint256 _l2TxGasLimit, 14 uint256 _l2TxGasPerPubdataByte 15: ) external payable returns (bytes32 txHash); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L13) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 9 function finalizeDeposit( 10 address _l1Sender, 11 address _l2Receiver, 12 address _l1Token, 13 uint256 _amount, 14 bytes calldata _data 15: ) external payable; 17 function withdraw( 18 address _l1Receiver, 19 address _l2Token, 20 uint256 _amount 21: ) external; 23: function l1TokenAddress(address _l2Token) external view returns (address); 25: function l2TokenAddress(address _l1Token) external view returns (address); 27: function l1Bridge() external view returns (address); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L7-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L15-L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L21-L21), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L23-L23), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 9 function initialize( 10 address _l1Bridge, 11 bytes32 _l2TokenProxyBytecodeHash, 12 address _governor 13: ) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L7-L11) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 8 function initialize( 9 address _l1Bridge, 10 address _l1WethAddress, 11 address _l2WethAddress 12: ) external; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L6-L10) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 7: function deposit() external payable; 9: function withdraw(uint256 wad) external; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 33: constructor(address _initialOwner) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L31-L31) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 40: function getAccessMode(address _target) external view returns (AccessMode); 42 function hasSpecialAccessToCall( 43 address _caller, 44 address _target, 45 bytes4 _functionSig 46: ) external view returns (bool); 48 function canCall( 49 address _caller, 50 address _target, 51 bytes4 _functionSig 52: ) external view returns (bool); 54: function getTokenDepositLimitData(address _l1Token) external view returns (Deposit memory); 60: function setBatchAccessMode(address[] calldata _targets, AccessMode[] calldata _accessMode) external; 62: function setAccessMode(address _target, AccessMode _accessMode) external; 64 function setBatchPermissionToCall( 65 address[] calldata _callers, 66 address[] calldata _targets, 67 bytes4[] calldata _functionSigs, 68 bool[] calldata _enables 69: ) external; 71 function setPermissionToCall( 72 address _caller, 73 address _target, 74 bytes4 _functionSig, 75 bool _enable 76: ) external; 82 function setDepositLimit( 83 address _l1Token, 84 bool _depositLimitation, 85 uint256 _depositCap 86: ) external; ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L40-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L46-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L52-L52), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L58-L58), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L60-L60), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L62-L67), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L69-L74), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L80-L84) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 40: function isOperation(bytes32 _id) external view returns (bool); 42: function isOperationPending(bytes32 _id) external view returns (bool); 44: function isOperationReady(bytes32 _id) external view returns (bool); 46: function isOperationDone(bytes32 _id) external view returns (bool); 48: function getOperationState(bytes32 _id) external view returns (OperationState); 50: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external; 52: function scheduleShadow(bytes32 _id, uint256 _delay) external; 54: function cancel(bytes32 _id) external; 56: function execute(Operation calldata _operation) external; 58: function executeInstant(Operation calldata _operation) external; 60: function hashOperation(Operation calldata _operation) external pure returns (bytes32); 62: function updateDelay(uint256 _newDelay) external; 64: function updateSecurityCouncil(address _newSecurityCouncil) external; ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L42-L42), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L46-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L52-L52), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L56-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L58-L58), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L60-L60), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L62-L62) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 13: constructor(uint256 _chainId, Diamond.DiamondCutData memory _diamondCut) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 46: constructor(address _initialOwner, address _zkSyncContract, uint32 _executionDelay, address _validator) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44-L44) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 12: function setPendingGovernor(address _newPendingGovernor) external; 14: function acceptGovernor() external; 16: function setPendingAdmin(address _newPendingAdmin) external; 18: function acceptAdmin() external; 20: function setValidator(address _validator, bool _active) external; 22: function setPorterAvailability(bool _zkPorterIsAvailable) external; 24: function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external; 26: function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external; 28: function freezeDiamond() external; 30: function unfreezeDiamond() external; ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L22-L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L28-L28) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 7: function getName() external view returns (string memory); ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 81 function commitBatches(StoredBatchInfo calldata _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 82: external; 84 function proveBatches( 85 StoredBatchInfo calldata _prevBatch, 86 StoredBatchInfo[] calldata _committedBatches, 87 ProofInput calldata _proof 88: ) external; 90: function executeBatches(StoredBatchInfo[] calldata _batchesData) external; 92: function revertBatches(uint256 _newLastBatch) external; ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L79-L80), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L82-L86), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L88-L88), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L90-L90) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 16: function getVerifier() external view returns (address); 18: function getGovernor() external view returns (address); 20: function getPendingGovernor() external view returns (address); 22: function getTotalBatchesCommitted() external view returns (uint256); 24: function getTotalBatchesVerified() external view returns (uint256); 26: function getTotalBatchesExecuted() external view returns (uint256); 28: function getTotalPriorityTxs() external view returns (uint256); 30: function getFirstUnprocessedPriorityTx() external view returns (uint256); 32: function getPriorityQueueSize() external view returns (uint256); 34: function priorityQueueFrontOperation() external view returns (PriorityOperation memory); 36: function isValidator(address _address) external view returns (bool); 38: function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32 hash); 40: function storedBatchHash(uint256 _batchNumber) external view returns (bytes32); 42: function getL2BootloaderBytecodeHash() external view returns (bytes32); 44: function getL2DefaultAccountBytecodeHash() external view returns (bytes32); 46: function getVerifierParams() external view returns (VerifierParams memory); 48: function isDiamondStorageFrozen() external view returns (bool); 50: function getProtocolVersion() external view returns (uint256); 52: function getL2SystemContractsUpgradeTxHash() external view returns (bytes32); 54: function getL2SystemContractsUpgradeBatchNumber() external view returns (uint256); 56: function getPriorityTxMaxGasLimit() external view returns (uint256); 58: function getAllowList() external view returns (address); 60: function isEthWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); 74: function facets() external view returns (Facet[] memory); 76: function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory); 78: function facetAddresses() external view returns (address[] memory facets); 80: function facetAddress(bytes4 _selector) external view returns (address facet); 82: function isFunctionFreezable(bytes4 _selector) external view returns (bool); 84: function isFacetFreezable(address _facet) external view returns (bool isFreezable); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L22-L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L28-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L30-L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L32-L32), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L36-L36), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L42-L42), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L46-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L52-L52), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L56-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L58-L58), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L72-L72), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L74-L74), [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L76-L76), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L78-L78), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L80-L80), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L82-L82) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 14: function getTotalBlocksCommitted() external view returns (uint256); 16: function getTotalBlocksVerified() external view returns (uint256); 18: function getTotalBlocksExecuted() external view returns (uint256); 20: function storedBlockHash(uint256 _batchNumber) external view returns (bytes32); 22: function getL2SystemContractsUpgradeBlockNumber() external view returns (uint256); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 91 function proveL2MessageInclusion( 92 uint256 _l2BatchNumber, 93 uint256 _index, 94 L2Message calldata _message, 95 bytes32[] calldata _proof 96: ) external view returns (bool); 98 function proveL2LogInclusion( 99 uint256 _l2BatchNumber, 100 uint256 _index, 101 L2Log memory _log, 102 bytes32[] calldata _proof 103: ) external view returns (bool); 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108 uint256 _l2MessageIndex, 109 uint16 _l2TxNumberInBatch, 110 bytes32[] calldata _merkleProof, 111 TxStatus _status 112: ) external view returns (bool); 114 function finalizeEthWithdrawal( 115 uint256 _l2BatchNumber, 116 uint256 _l2MessageIndex, 117 uint16 _l2TxNumberInBatch, 118 bytes calldata _message, 119 bytes32[] calldata _merkleProof 120: ) external; 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126 uint256 _l2GasLimit, 127 uint256 _l2GasPerPubdataByteLimit, 128 bytes[] calldata _factoryDeps, 129 address _refundRecipient 130: ) external payable returns (bytes32 canonicalTxHash); 132 function l2TransactionBaseCost( 133 uint256 _gasPrice, 134 uint256 _l2GasLimit, 135 uint256 _l2GasPerPubdataByteLimit 136: ) external view returns (uint256); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L94), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L101), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L110), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L118), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L128), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130-L134) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 42 function initialize( 43 address _l1Bridge, 44 bytes32 _l2TokenProxyBytecodeHash, 45 address _governor 46: ) external initializer { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L44) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 125: function name() public view override returns (string memory) { 131: function symbol() public view override returns (string memory) { 137: function decimals() public view override returns (uint8) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L123-L123), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L129-L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135-L135) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 121: receive() external payable { ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L119-L119) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 9 function finalizeWithdrawal( 10 uint256 _l2BatchNumber, 11 uint256 _l2MessageIndex, 12 uint16 _l2TxNumberInBatch, 13 bytes calldata _message, 14 bytes32[] calldata _merkleProof 15: ) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L13) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 23 function finalizeDeposit( 24 address _l1Sender, 25 address _l2Receiver, 26 address _l1Token, 27 uint256 _amount, 28 bytes calldata _data 29: ) external payable; 31 function withdraw( 32 address _l1Receiver, 33 address _l2Token, 34 uint256 _amount 35: ) external; 37: function l1TokenAddress(address _l2Token) external view returns (address); 39: function l2TokenAddress(address _l1Token) external view returns (address); 41: function l1Bridge() external view returns (address); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L21-L27), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L29-L33), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L37-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L39-L39) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 14: function bridgeMint(address _account, uint256 _amount) external; 16: function bridgeBurn(address _account, uint256 _amount) external; 18: function l1Address() external view returns (address); 20: function l2Bridge() external view returns (address); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L18-L18) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 9: function deposit() external payable; 11: function withdraw(uint256 _amount) external; 13: function depositTo(address _to) external payable; 15: function withdrawTo(address _to, uint256 _amount) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L7-L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L9-L9), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 224: fallback() external payable { 231 receive() external payable { 232 // If the contract is called directly, behave like an EOA 233: } ``` *GitHub*: [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L222-L222), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L229-L231) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 14: fallback() external payable {} 16: receive() external payable {} ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L14-L14) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 37: fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L35-L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 149: function isNonceUsed(address _address, uint256 _nonce) public view returns (bool) { ``` *GitHub*: [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 456: function incrementTxNumberInBatch() external onlyCallFromBootloader { 460: function resetTxNumberInBatch() external onlyCallFromBootloader { ``` *GitHub*: [456](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L454-L454), [460](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L458-L458) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 28 function executeTransaction( 29 bytes32 _txHash, 30 bytes32 _suggestedSignedHash, 31 Transaction calldata _transaction 32: ) external payable; 36: function executeTransactionFromOutside(Transaction calldata _transaction) external payable; 38 function payForTransaction( 39 bytes32 _txHash, 40 bytes32 _suggestedSignedHash, 41 Transaction calldata _transaction 42: ) external payable; 44 function prepareForPaymaster( 45 bytes32 _txHash, 46 bytes32 _possibleSignedHash, 47 Transaction calldata _transaction 48: ) external payable; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L26-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L36-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L42-L46) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 8: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external; 10: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external; 12: function markAccountCodeHashAsConstructed(address _address) external; 14: function getRawCodeHash(address _address) external view returns (bytes32 codeHash); 16: function getCodeHash(uint256 _input) external view returns (bytes32 codeHash); 18: function getCodeSize(uint256 _input) external view returns (uint256 codeSize); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 10 function getTransactionHashes( 11 Transaction calldata _transaction 12: ) external view returns (bytes32 txHash, bytes32 signedTxHash); ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L8-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 8: function upgrade(address _delegateTo, bytes calldata _calldata) external payable; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 15 function publishCompressedBytecode( 16 bytes calldata _bytecode, 17 bytes calldata _rawCompressedData 18: ) external payable returns (bytes32 bytecodeHash); 20 function verifyCompressedStateDiffs( 21 uint256 _numberOfStateDiffs, 22 uint256 _enumerationIndexSize, 23 bytes calldata _stateDiffs, 24 bytes calldata _compressedStateDiffs 25: ) external payable returns (bytes32 stateDiffHash); ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L13-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L18-L23) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 45 function getNewAddressCreate2( 46 address _sender, 47 bytes32 _bytecodeHash, 48 bytes32 _salt, 49 bytes calldata _input 50: ) external view returns (address newAddress); 52: function getNewAddressCreate(address _sender, uint256 _senderNonce) external pure returns (address newAddress); 54 function create2( 55 bytes32 _salt, 56 bytes32 _bytecodeHash, 57 bytes calldata _input 58: ) external payable returns (address newAddress); 60 function create2Account( 61 bytes32 _salt, 62 bytes32 _bytecodeHash, 63 bytes calldata _input, 64 AccountAbstractionVersion _aaVersion 65: ) external payable returns (address newAddress); ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L43-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L52-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L58-L63) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 8: function balanceOf(uint256) external view returns (uint256); 10: function transferFromTo(address _from, address _to, uint256 _amount) external; 12: function totalSupply() external view returns (uint256); 14: function name() external pure returns (string memory); 16: function symbol() external pure returns (string memory); 18: function decimals() external pure returns (uint8); 20: function mint(address _account, uint256 _amount) external; 22: function withdraw(address _l1Receiver) external payable; 24: function withdrawWithMessage(address _l1Receiver, bytes calldata _additionalData) external payable; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 13: function getImmutable(address _dest, uint256 _index) external view returns (bytes32); 15: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external; ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 10: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external; 12: function markBytecodeAsPublished(bytes32 _bytecodeHash) external; 14: function getMarker(bytes32 _hash) external view returns (uint256); ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 46: function sendToL1(bytes memory _message) external returns (bytes32); 48: function sendL2ToL1Log(bool _isService, bytes32 _key, bytes32 _value) external returns (uint256 logIdInMerkleTree); 51: function requestBytecodeL1Publication(bytes32 _bytecodeHash) external; ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L46-L46), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L49-L49) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 12: function bridgeMint(address _account, uint256 _amount) external; 14: function bridgeBurn(address _account, uint256 _amount) external; 16: function l1Address() external view returns (address); 18: function l2Bridge() external view returns (address); ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 8 function finalizeEthWithdrawal( 9 uint256 _l2BatchNumber, 10 uint256 _l2MessageIndex, 11 uint16 _l2TxNumberInBlock, 12 bytes calldata _message, 13 bytes32[] calldata _merkleProof 14: ) external; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 15: function general(bytes calldata input) external; 17: function approvalBased(address _token, uint256 _minAllowance, bytes calldata _innerInput) external; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L13-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L15-L15) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 31: function chainId() external view returns (uint256); 33: function origin() external view returns (address); 35: function gasPrice() external view returns (uint256); 37: function blockGasLimit() external view returns (uint256); 39: function coinbase() external view returns (address); 41: function difficulty() external view returns (uint256); 43: function baseFee() external view returns (uint256); 45: function txNumberInBlock() external view returns (uint16); 47: function getBlockHashEVM(uint256 _block) external view returns (bytes32); 49: function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash); 51: function getBlockNumber() external view returns (uint128); 53: function getBlockTimestamp() external view returns (uint128); 55: function getBatchNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); 57: function getL2BlockNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L29-L29), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L31-L31), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L33-L33), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L37-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L39-L39), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L41-L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L43-L43), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L45-L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L47-L47), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L49-L49), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L51-L51), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L53-L53), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L55-L55) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 12: function currentBlockInfo() external view returns (uint256); 14: function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp); 16: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash); ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L14-L14)
### [N‑72] NatSpec: Function declarations should have descriptions *There are 182 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 21: function isWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); 23 function deposit( 24 address _l2Receiver, 25 address _l1Token, 26 uint256 _amount, 27 uint256 _l2TxGasLimit, 28 uint256 _l2TxGasPerPubdataByte, 29 address _refundRecipient 30: ) external payable returns (bytes32 txHash); 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35 bytes32 _l2TxHash, 36 uint256 _l2BatchNumber, 37 uint256 _l2MessageIndex, 38 uint16 _l2TxNumberInBatch, 39 bytes32[] calldata _merkleProof 40: ) external; 42 function finalizeWithdrawal( 43 uint256 _l2BatchNumber, 44 uint256 _l2MessageIndex, 45 uint16 _l2TxNumberInBatch, 46 bytes calldata _message, 47 bytes32[] calldata _merkleProof 48: ) external; 50: function l2TokenAddress(address _l1Token) external view returns (address); 52: function l2Bridge() external view returns (address); ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L19-L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L21-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 9 function deposit( 10 address _l2Receiver, 11 address _l1Token, 12 uint256 _amount, 13 uint256 _l2TxGasLimit, 14 uint256 _l2TxGasPerPubdataByte 15: ) external payable returns (bytes32 txHash); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L7-L13) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 9 function finalizeDeposit( 10 address _l1Sender, 11 address _l2Receiver, 12 address _l1Token, 13 uint256 _amount, 14 bytes calldata _data 15: ) external payable; 17 function withdraw( 18 address _l1Receiver, 19 address _l2Token, 20 uint256 _amount 21: ) external; 23: function l1TokenAddress(address _l2Token) external view returns (address); 25: function l2TokenAddress(address _l1Token) external view returns (address); 27: function l1Bridge() external view returns (address); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L7-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L15-L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L21-L21), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L23-L23), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 9 function initialize( 10 address _l1Bridge, 11 bytes32 _l2TokenProxyBytecodeHash, 12 address _governor 13: ) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L7-L11) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 8 function initialize( 9 address _l1Bridge, 10 address _l1WethAddress, 11 address _l2WethAddress 12: ) external; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L6-L10) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 7: function deposit() external payable; 9: function withdraw(uint256 wad) external; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 33: constructor(address _initialOwner) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L31-L31) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 40: function getAccessMode(address _target) external view returns (AccessMode); 42 function hasSpecialAccessToCall( 43 address _caller, 44 address _target, 45 bytes4 _functionSig 46: ) external view returns (bool); 48 function canCall( 49 address _caller, 50 address _target, 51 bytes4 _functionSig 52: ) external view returns (bool); 54: function getTokenDepositLimitData(address _l1Token) external view returns (Deposit memory); 60: function setBatchAccessMode(address[] calldata _targets, AccessMode[] calldata _accessMode) external; 62: function setAccessMode(address _target, AccessMode _accessMode) external; 64 function setBatchPermissionToCall( 65 address[] calldata _callers, 66 address[] calldata _targets, 67 bytes4[] calldata _functionSigs, 68 bool[] calldata _enables 69: ) external; 71 function setPermissionToCall( 72 address _caller, 73 address _target, 74 bytes4 _functionSig, 75 bool _enable 76: ) external; 82 function setDepositLimit( 83 address _l1Token, 84 bool _depositLimitation, 85 uint256 _depositCap 86: ) external; ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L40-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L46-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L52-L52), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L58-L58), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L60-L60), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L62-L67), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L69-L74), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L80-L84) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 40: function isOperation(bytes32 _id) external view returns (bool); 42: function isOperationPending(bytes32 _id) external view returns (bool); 44: function isOperationReady(bytes32 _id) external view returns (bool); 46: function isOperationDone(bytes32 _id) external view returns (bool); 48: function getOperationState(bytes32 _id) external view returns (OperationState); 50: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external; 52: function scheduleShadow(bytes32 _id, uint256 _delay) external; 54: function cancel(bytes32 _id) external; 56: function execute(Operation calldata _operation) external; 58: function executeInstant(Operation calldata _operation) external; 60: function hashOperation(Operation calldata _operation) external pure returns (bytes32); 62: function updateDelay(uint256 _newDelay) external; 64: function updateSecurityCouncil(address _newSecurityCouncil) external; ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L42-L42), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L46-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L52-L52), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L56-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L58-L58), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L60-L60), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L62-L62) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 13: constructor(uint256 _chainId, Diamond.DiamondCutData memory _diamondCut) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 46: constructor(address _initialOwner, address _zkSyncContract, uint32 _executionDelay, address _validator) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44-L44) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 12: function setPendingGovernor(address _newPendingGovernor) external; 14: function acceptGovernor() external; 16: function setPendingAdmin(address _newPendingAdmin) external; 18: function acceptAdmin() external; 20: function setValidator(address _validator, bool _active) external; 22: function setPorterAvailability(bool _zkPorterIsAvailable) external; 24: function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external; 26: function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external; 28: function freezeDiamond() external; 30: function unfreezeDiamond() external; ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L22-L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L28-L28) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 7: function getName() external view returns (string memory); ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 81 function commitBatches(StoredBatchInfo calldata _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 82: external; 84 function proveBatches( 85 StoredBatchInfo calldata _prevBatch, 86 StoredBatchInfo[] calldata _committedBatches, 87 ProofInput calldata _proof 88: ) external; 90: function executeBatches(StoredBatchInfo[] calldata _batchesData) external; 92: function revertBatches(uint256 _newLastBatch) external; ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L79-L80), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L82-L86), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L88-L88), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L90-L90) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 16: function getVerifier() external view returns (address); 18: function getGovernor() external view returns (address); 20: function getPendingGovernor() external view returns (address); 22: function getTotalBatchesCommitted() external view returns (uint256); 24: function getTotalBatchesVerified() external view returns (uint256); 26: function getTotalBatchesExecuted() external view returns (uint256); 28: function getTotalPriorityTxs() external view returns (uint256); 30: function getFirstUnprocessedPriorityTx() external view returns (uint256); 32: function getPriorityQueueSize() external view returns (uint256); 34: function priorityQueueFrontOperation() external view returns (PriorityOperation memory); 36: function isValidator(address _address) external view returns (bool); 38: function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32 hash); 40: function storedBatchHash(uint256 _batchNumber) external view returns (bytes32); 42: function getL2BootloaderBytecodeHash() external view returns (bytes32); 44: function getL2DefaultAccountBytecodeHash() external view returns (bytes32); 46: function getVerifierParams() external view returns (VerifierParams memory); 48: function isDiamondStorageFrozen() external view returns (bool); 50: function getProtocolVersion() external view returns (uint256); 52: function getL2SystemContractsUpgradeTxHash() external view returns (bytes32); 54: function getL2SystemContractsUpgradeBatchNumber() external view returns (uint256); 56: function getPriorityTxMaxGasLimit() external view returns (uint256); 58: function getAllowList() external view returns (address); 60: function isEthWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool); 74: function facets() external view returns (Facet[] memory); 76: function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory); 78: function facetAddresses() external view returns (address[] memory facets); 80: function facetAddress(bytes4 _selector) external view returns (address facet); 82: function isFunctionFreezable(bytes4 _selector) external view returns (bool); 84: function isFacetFreezable(address _facet) external view returns (bool isFreezable); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L22-L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L28-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L30-L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L32-L32), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L36-L36), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L42-L42), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L46-L46), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L52-L52), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L54-L54), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L56-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L58-L58), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L72-L72), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L74-L74), [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L76-L76), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L78-L78), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L80-L80), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L82-L82) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 14: function getTotalBlocksCommitted() external view returns (uint256); 16: function getTotalBlocksVerified() external view returns (uint256); 18: function getTotalBlocksExecuted() external view returns (uint256); 20: function storedBlockHash(uint256 _batchNumber) external view returns (bytes32); 22: function getL2SystemContractsUpgradeBlockNumber() external view returns (uint256); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 91 function proveL2MessageInclusion( 92 uint256 _l2BatchNumber, 93 uint256 _index, 94 L2Message calldata _message, 95 bytes32[] calldata _proof 96: ) external view returns (bool); 98 function proveL2LogInclusion( 99 uint256 _l2BatchNumber, 100 uint256 _index, 101 L2Log memory _log, 102 bytes32[] calldata _proof 103: ) external view returns (bool); 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108 uint256 _l2MessageIndex, 109 uint16 _l2TxNumberInBatch, 110 bytes32[] calldata _merkleProof, 111 TxStatus _status 112: ) external view returns (bool); 114 function finalizeEthWithdrawal( 115 uint256 _l2BatchNumber, 116 uint256 _l2MessageIndex, 117 uint16 _l2TxNumberInBatch, 118 bytes calldata _message, 119 bytes32[] calldata _merkleProof 120: ) external; 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126 uint256 _l2GasLimit, 127 uint256 _l2GasPerPubdataByteLimit, 128 bytes[] calldata _factoryDeps, 129 address _refundRecipient 130: ) external payable returns (bytes32 canonicalTxHash); 132 function l2TransactionBaseCost( 133 uint256 _gasPrice, 134 uint256 _l2GasLimit, 135 uint256 _l2GasPerPubdataByteLimit 136: ) external view returns (uint256); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L94), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L101), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L110), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L118), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L128), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130-L134) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 42 function initialize( 43 address _l1Bridge, 44 bytes32 _l2TokenProxyBytecodeHash, 45 address _governor 46: ) external initializer { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L44) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 125: function name() public view override returns (string memory) { 131: function symbol() public view override returns (string memory) { 137: function decimals() public view override returns (uint8) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L123-L123), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L129-L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135-L135) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 121: receive() external payable { ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L119-L119) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 9 function finalizeWithdrawal( 10 uint256 _l2BatchNumber, 11 uint256 _l2MessageIndex, 12 uint16 _l2TxNumberInBatch, 13 bytes calldata _message, 14 bytes32[] calldata _merkleProof 15: ) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L13) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 23 function finalizeDeposit( 24 address _l1Sender, 25 address _l2Receiver, 26 address _l1Token, 27 uint256 _amount, 28 bytes calldata _data 29: ) external payable; 31 function withdraw( 32 address _l1Receiver, 33 address _l2Token, 34 uint256 _amount 35: ) external; 37: function l1TokenAddress(address _l2Token) external view returns (address); 39: function l2TokenAddress(address _l1Token) external view returns (address); 41: function l1Bridge() external view returns (address); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L21-L27), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L29-L33), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L37-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L39-L39) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 14: function bridgeMint(address _account, uint256 _amount) external; 16: function bridgeBurn(address _account, uint256 _amount) external; 18: function l1Address() external view returns (address); 20: function l2Bridge() external view returns (address); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L18-L18) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 9: function deposit() external payable; 11: function withdraw(uint256 _amount) external; 13: function depositTo(address _to) external payable; 15: function withdrawTo(address _to, uint256 _amount) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L7-L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L9-L9), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 224: fallback() external payable { 231 receive() external payable { 232 // If the contract is called directly, behave like an EOA 233: } ``` *GitHub*: [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L222-L222), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L229-L231) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 14: fallback() external payable {} 16: receive() external payable {} ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L14-L14) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 37: fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L35-L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 149: function isNonceUsed(address _address, uint256 _nonce) public view returns (bool) { ``` *GitHub*: [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 456: function incrementTxNumberInBatch() external onlyCallFromBootloader { 460: function resetTxNumberInBatch() external onlyCallFromBootloader { ``` *GitHub*: [456](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L454-L454), [460](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L458-L458) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 28 function executeTransaction( 29 bytes32 _txHash, 30 bytes32 _suggestedSignedHash, 31 Transaction calldata _transaction 32: ) external payable; 36: function executeTransactionFromOutside(Transaction calldata _transaction) external payable; 38 function payForTransaction( 39 bytes32 _txHash, 40 bytes32 _suggestedSignedHash, 41 Transaction calldata _transaction 42: ) external payable; 44 function prepareForPaymaster( 45 bytes32 _txHash, 46 bytes32 _possibleSignedHash, 47 Transaction calldata _transaction 48: ) external payable; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L26-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L34-L34), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L36-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L42-L46) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 8: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external; 10: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external; 12: function markAccountCodeHashAsConstructed(address _address) external; 14: function getRawCodeHash(address _address) external view returns (bytes32 codeHash); 16: function getCodeHash(uint256 _input) external view returns (bytes32 codeHash); 18: function getCodeSize(uint256 _input) external view returns (uint256 codeSize); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 10 function getTransactionHashes( 11 Transaction calldata _transaction 12: ) external view returns (bytes32 txHash, bytes32 signedTxHash); ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L8-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 8: function upgrade(address _delegateTo, bytes calldata _calldata) external payable; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 15 function publishCompressedBytecode( 16 bytes calldata _bytecode, 17 bytes calldata _rawCompressedData 18: ) external payable returns (bytes32 bytecodeHash); 20 function verifyCompressedStateDiffs( 21 uint256 _numberOfStateDiffs, 22 uint256 _enumerationIndexSize, 23 bytes calldata _stateDiffs, 24 bytes calldata _compressedStateDiffs 25: ) external payable returns (bytes32 stateDiffHash); ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L13-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L18-L23) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 45 function getNewAddressCreate2( 46 address _sender, 47 bytes32 _bytecodeHash, 48 bytes32 _salt, 49 bytes calldata _input 50: ) external view returns (address newAddress); 52: function getNewAddressCreate(address _sender, uint256 _senderNonce) external pure returns (address newAddress); 54 function create2( 55 bytes32 _salt, 56 bytes32 _bytecodeHash, 57 bytes calldata _input 58: ) external payable returns (address newAddress); 60 function create2Account( 61 bytes32 _salt, 62 bytes32 _bytecodeHash, 63 bytes calldata _input, 64 AccountAbstractionVersion _aaVersion 65: ) external payable returns (address newAddress); ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L43-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L50-L50), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L52-L56), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L58-L63) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 8: function balanceOf(uint256) external view returns (uint256); 10: function transferFromTo(address _from, address _to, uint256 _amount) external; 12: function totalSupply() external view returns (uint256); 14: function name() external pure returns (string memory); 16: function symbol() external pure returns (string memory); 18: function decimals() external pure returns (uint8); 20: function mint(address _account, uint256 _amount) external; 22: function withdraw(address _l1Receiver) external payable; 24: function withdrawWithMessage(address _l1Receiver, bytes calldata _additionalData) external payable; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L16-L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L18-L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 13: function getImmutable(address _dest, uint256 _index) external view returns (bytes32); 15: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external; ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 10: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external; 12: function markBytecodeAsPublished(bytes32 _bytecodeHash) external; 14: function getMarker(bytes32 _hash) external view returns (uint256); ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 46: function sendToL1(bytes memory _message) external returns (bytes32); 48: function sendL2ToL1Log(bool _isService, bytes32 _key, bytes32 _value) external returns (uint256 logIdInMerkleTree); 51: function requestBytecodeL1Publication(bytes32 _bytecodeHash) external; ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L44-L44), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L46-L46), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L49-L49) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 12: function bridgeMint(address _account, uint256 _amount) external; 14: function bridgeBurn(address _account, uint256 _amount) external; 16: function l1Address() external view returns (address); 18: function l2Bridge() external view returns (address); ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 8 function finalizeEthWithdrawal( 9 uint256 _l2BatchNumber, 10 uint256 _l2MessageIndex, 11 uint16 _l2TxNumberInBlock, 12 bytes calldata _message, 13 bytes32[] calldata _merkleProof 14: ) external; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 15: function general(bytes calldata input) external; 17: function approvalBased(address _token, uint256 _minAllowance, bytes calldata _innerInput) external; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L13-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L15-L15) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 31: function chainId() external view returns (uint256); 33: function origin() external view returns (address); 35: function gasPrice() external view returns (uint256); 37: function blockGasLimit() external view returns (uint256); 39: function coinbase() external view returns (address); 41: function difficulty() external view returns (uint256); 43: function baseFee() external view returns (uint256); 45: function txNumberInBlock() external view returns (uint16); 47: function getBlockHashEVM(uint256 _block) external view returns (bytes32); 49: function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash); 51: function getBlockNumber() external view returns (uint128); 53: function getBlockTimestamp() external view returns (uint128); 55: function getBatchNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); 57: function getL2BlockNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L29-L29), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L31-L31), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L33-L33), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L35-L35), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L37-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L39-L39), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L41-L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L43-L43), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L45-L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L47-L47), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L49-L49), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L51-L51), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L53-L53), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L55-L55) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 12: function currentBlockInfo() external view returns (uint256); 14: function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp); 16: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash); ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L14-L14)
### [N‑73] NatSpec: Modifier declarations should have descriptions *There are 7 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 12 modifier senderCanCallFunction(IAllowList _allowList) { 13 // Preventing the stack too deep error 14 { 15 require(_allowList.canCall(msg.sender, address(this), msg.sig), "nr"); 16 } 17 _; 18: } ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L10-L16) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 43 modifier reentrancyGuardInitializer() { 44 _initializeReentrancyGuard(); 45 _; 46: } ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L41-L44) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 102 modifier onlyBridge() { 103 require(msg.sender == l2Bridge, "xnt"); // Only L2 bridge can call this method 104 _; 105: } ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L100-L103) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 61 modifier onlyBridge() { 62 require(msg.sender == l2Bridge, "permission denied"); // Only L2 bridge can call this method 63 _; 64: } ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L59-L62) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 27 modifier onlyDeployer() { 28 require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); 29 _; 30: } ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L25-L28) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 30 modifier onlySelf() { 31 require(msg.sender == address(this), "Callable only by self"); 32 _; 33: } ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L28-L31) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 22 modifier onlyCompressor() { 23 require(msg.sender == address(COMPRESSOR_CONTRACT), "Callable only by the compressor"); 24 _; 25: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L20-L23)
### [N‑74] NatSpec: State variable declarations should have descriptions e.g. `@notice` for public state variables, and `@dev` for [non-public](https://docs.soliditylang.org/en/latest/natspec-format.html#tags) ones *There are 13 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 56: mapping(address => uint256) public __DEPRECATED_lastWithdrawalLimitReset; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L54-L54) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 40: uint256 private constant _NOT_ENTERED = 1; 41: uint256 private constant _ENTERED = 2; ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L38-L38), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L39-L39) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 24: uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 17: string public constant override getName = "AdminFacet"; ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 17: AppStorage internal s; ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 24: string public constant override getName = "ExecutorFacet"; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 21: string public constant override getName = "GettersFacet"; ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L19-L19) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 43: string public constant override getName = "MailboxFacet"; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 24: ERC20Getters availableGetters; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 25: bytes32 constant EMPTY_STRING_KECCAK = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L23-L23) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 30: uint256 constant DEPLOY_NONCE_MULTIPLIER = 2 ** 128; ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L28-L28) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 86 bytes32 constant EIP712_TRANSACTION_TYPE_HASH = 87 keccak256( 88 "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 89: ); ``` *GitHub*: [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L84-L87)
### [N‑75] Non-library/interface files should use fixed compiler versions, not floating ones Note that some file names may indicate an interface, but actually contain abstract contracts *There are 35 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L1-L1)
### [N‑76] Not using the named return variables anywhere in the function is confusing Consider changing the variable to be an unnamed one, since the variable is never assigned, nor is it returned by name. If the optimizer is not turned on, leaving the code as it is will also waste gas for the stack variable. *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol /// @audit txHash 46: function encodeLegacyTransactionHash(Transaction calldata _transaction) internal view returns (bytes32 txHash) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L44) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit info 36: function getAccountInfo(address _address) external view returns (AccountInfo memory info) { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L34) ### [N‑77] Open TODOs Code architecture, incentives, and error handling/reporting questions/issues should be resolved before deployment *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 375: layer2Tip: uint192(0) // TODO: Restore after fee modeling will be stable. (SMA-1230) ``` *GitHub*: [375](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L373) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 151: // TODO: possibly charge a separate fee for possible pubdata spending ``` *GitHub*: [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L149) ### [N‑78] Overflows in unchecked blocks While integers with a large number of bits are unlikely to overflow on human time scales, it is not strictly correct to use an `unchecked` block around them, because _eventually_ they will overflow, and `unchecked` blocks are meant for cases where it's mathematically impossible for an operation to trigger an overflow (e.g. a prior `require()` statement prevents the overflow case) *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 87: for (uint256 i = 0; i < _newBatchesData.length; ++i) { 118: for (uint256 i = 0; i < _newBatchesData.length; ++i) { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L85-L85), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L116-L116) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 40: for (uint256 i = 0; i < immutablesLength; ++i) { ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L38-L38) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 33: for (uint256 i = 0; i < hashesLen; ++i) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L31-L31) ### [N‑79] Polymorphic functions make security audits more time-consuming and error-prone The instances below point to one of two functions with the same name. Consider naming each function differently, in order to make code navigation and analysis easier. *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 178 function deposit( 179 address _l2Receiver, 180 address _l1Token, 181 uint256 _amount, 182 uint256 _l2TxGasLimit, 183 uint256 _l2TxGasPerPubdataByte, 184 address _refundRecipient 185: ) public payable nonReentrant senderCanCallFunction(allowList) returns (bytes32 l2TxHash) { ``` *GitHub*: [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L176-L183) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 112 function functionCall( 113 address target, 114 bytes memory data, 115 string memory errorMessage 116: ) internal returns (bytes memory) { 151 function functionCallWithValue( 152 address target, 153 bytes memory data, 154 uint256 value, 155 string memory errorMessage 156: ) internal returns (bytes memory) { 198 function functionStaticCall( 199 address target, 200 bytes memory data, 201 string memory errorMessage 202: ) internal view returns (bytes memory) { 237 function functionDelegateCall( 238 address target, 239 bytes memory data, 240 string memory errorMessage 241: ) internal returns (bytes memory) { ``` *GitHub*: [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L110-L114), [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L149-L154), [198](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L196-L200), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L235-L239) ### [N‑80] Setters should prevent re-setting of the same value This especially problematic when the setter also emits the same value, which may be confusing to offline parsers *There are 15 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 131 function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { 132 tokenDeposit[_l1Token].depositLimitation = _depositLimitation; 133 tokenDeposit[_l1Token].depositCap = _depositCap; 134: } ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129-L132) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 251 function updateDelay(uint256 _newDelay) external onlySelf { 252 emit ChangeMinDelay(minDelay, _newDelay); 253 minDelay = _newDelay; 254: } 258 function updateSecurityCouncil(address _newSecurityCouncil) external onlySelf { 259 emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); 260 securityCouncil = _newSecurityCouncil; 261: } ``` *GitHub*: [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L249-L252), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L256-L259) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 54 function setValidator(address _newValidator) external onlyOwner { 55 address oldValidator = validator; 56 validator = _newValidator; 57 emit NewValidator(oldValidator, _newValidator); 58: } 61 function setExecutionDelay(uint32 _executionDelay) external onlyOwner { 62 executionDelay = _executionDelay; 63 emit NewExecutionDelay(_executionDelay); 64: } ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L52-L56), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L59-L62) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 22 function setPendingGovernor(address _newPendingGovernor) external onlyGovernor { 23 // Save previous value into the stack to put it into the event later 24 address oldPendingGovernor = s.pendingGovernor; 25 // Change pending governor 26 s.pendingGovernor = _newPendingGovernor; 27 emit NewPendingGovernor(oldPendingGovernor, _newPendingGovernor); 28: } 46 function setPendingAdmin(address _newPendingAdmin) external onlyGovernorOrAdmin { 47 // Save previous value into the stack to put it into the event later 48 address oldPendingAdmin = s.pendingAdmin; 49 // Change pending admin 50 s.pendingAdmin = _newPendingAdmin; 51 emit NewPendingGovernor(oldPendingAdmin, _newPendingAdmin); 52: } 70 function setValidator(address _validator, bool _active) external onlyGovernorOrAdmin { 71 s.validators[_validator] = _active; 72 emit ValidatorStatusUpdate(_validator, _active); 73: } 77 function setPorterAvailability(bool _zkPorterIsAvailable) external onlyGovernor { 78 // Change the porter availability 79 s.zkPorterIsAvailable = _zkPorterIsAvailable; 80 emit IsPorterAvailableStatusUpdate(_zkPorterIsAvailable); 81: } 85 function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external onlyGovernor { 86 require(_newPriorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "n5"); 87 88 uint256 oldPriorityTxMaxGasLimit = s.priorityTxMaxGasLimit; 89 s.priorityTxMaxGasLimit = _newPriorityTxMaxGasLimit; 90 emit NewPriorityTxMaxGasLimit(oldPriorityTxMaxGasLimit, _newPriorityTxMaxGasLimit); 91: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L20-L26), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L44-L50), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L68-L71), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L75-L79), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L83-L89) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 64 function updateAccountVersion(AccountAbstractionVersion _version) external onlySystemCall { 65 accountInfo[msg.sender].supportedAAVersion = _version; 66 67 emit AccountVersionUpdated(msg.sender, _version); 68: } ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L62-L66) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 84 function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 85 IContractDeployer.AccountInfo memory accountInfo = DEPLOYER_SYSTEM_CONTRACT.getAccountInfo(msg.sender); 86 87 require(_value != 0, "Nonce value cannot be set to 0"); 88 // If an account has sequential nonce ordering, we enforce that the previous 89 // nonce has already been used. 90 if (accountInfo.nonceOrdering == IContractDeployer.AccountNonceOrdering.Sequential && _key != 0) { 91 require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 92 } 93 94 uint256 addressAsKey = uint256(uint160(msg.sender)); 95 96 nonceValues[addressAsKey][_key] = _value; 97 98 emit ValueSetUnderNonce(msg.sender, _key, _value); 99: } ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82-L97) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89 function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 90 origin = _newOrigin; 91: } 95 function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 96 gasPrice = _gasPrice; 97: } 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423 ) external onlyCallFromBootloader { 424 (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = getBatchNumberAndTimestamp(); 425 require(_newTimestamp > previousBatchTimestamp, "Timestamps should be incremental"); 426 require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); 427 428 _ensureBatchConsistentWithL2Block(_newTimestamp); 429 430 batchHash[previousBatchNumber] = _prevBatchHash; 431 432 // Setting new block number and timestamp 433 BlockInfo memory newBlockInfo = BlockInfo({number: previousBatchNumber + 1, timestamp: _newTimestamp}); 434 435 currentBatchInfo = newBlockInfo; 436 437 baseFee = _baseFee; 438 439 // The correctness of this block hash: 440 SystemContractHelper.toL1(false, bytes32(uint256(SystemLogKey.PREV_BATCH_HASH_KEY)), _prevBatchHash); 441: } ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87-L89), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93-L95), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L439)
### [N‑81] Style guide: `mapping` definitions do not follow the Solidity Style Guide See the [mappings](https://docs.soliditylang.org/en/latest/style-guide.html#mappings) section of the Solidity Style Guide *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 21: /// @dev mapping (contract address) => (index of immutable variable) => value ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L19) ### [N‑82] Style guide: Contract does not follow the Solidity style guide's suggested layout ordering The [style guide](https://docs.soliditylang.org/en/v0.8.16/style-guide.html#order-of-layout) says that, within a contract, the ordering should be 1) Type declarations, 2) State variables, 3) Events, 4) Modifiers, and 5) Functions, but the contract(s) below do not follow this ordering *There are 16 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit event EthReceived came earlier 46: address payable public immutable l1WethAddress; ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L44) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol /// @audit function _initializeReentrancyGuard came earlier 70 modifier nonReentrant() { 71 uint256 _status; 72 assembly { 73 _status := sload(LOCK_FLAG_ADDRESS) 74 } 75 76 // On the first call to nonReentrant, _notEntered will be true 77 require(_status == _NOT_ENTERED, "r1"); 78 79 // Any calls to nonReentrant after this point will fail 80 assembly { 81 sstore(LOCK_FLAG_ADDRESS, _ENTERED) 82 } 83 84 _; 85 86 // By storing the original value once again, a refund is triggered (see 87 // https://eips.ethereum.org/EIPS/eip-2200) 88 assembly { 89 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 90 } 91: } ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L68-L89) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol /// @audit event UpdateCallPermission came earlier 22 enum AccessMode { 23 Closed, 24 SpecialAccessOnly, 25 Public 26: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L20-L24) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit function constructor came earlier 60 modifier onlySelf() { 61 require(msg.sender == address(this), "Only governance contract itself allowed to call this function"); 62 _; 63: } ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L58-L61) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol /// @audit function updateSecurityCouncil came earlier 67: event TransparentOperationScheduled(bytes32 indexed _id, uint256 delay, Operation _operation); ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L65) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit event NewValidator came earlier 35: address public immutable zkSyncContract; /// @audit function setExecutionDelay came earlier 67 modifier onlyValidator() { 68 require(msg.sender == validator, "8h"); 69 _; 70: } ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L33), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L65-L68) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol /// @audit function unfreezeDiamond came earlier 33: event IsPorterAvailableStatusUpdate(bool isPorterAvailable); ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol /// @audit function revertBatches came earlier 96: event BlockCommit(uint256 indexed batchNumber, bytes32 indexed batchHash, bytes32 indexed commitment); ``` *GitHub*: [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L94) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol /// @audit function l2TransactionBaseCost came earlier 144 event NewPriorityRequest( 145 uint256 txId, 146 bytes32 txHash, 147 uint64 expirationTimestamp, 148 L2CanonicalTransaction transaction, 149 bytes[] factoryDeps 150: ); ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L142-L148) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol /// @audit event DiamondCut came earlier 81 enum Action { 82 Add, 83 Replace, 84 Remove 85: } ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L79-L83) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit function bridgeInitialize came earlier 102 modifier onlyBridge() { 103 require(msg.sender == l2Bridge, "xnt"); // Only L2 bridge can call this method 104 _; 105: } ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L100-L103) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol /// @audit function initializeV2 came earlier 61 modifier onlyBridge() { 62 require(msg.sender == l2Bridge, "permission denied"); // Only L2 bridge can call this method 63 _; 64: } ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L59-L62) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit event EthReceived came earlier 28: address public override l1Bridge; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L26) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit function keccakGasCost came earlier 65: uint256 internal constant SHA256_ROUND_GAS_COST = 7; ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L63) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol /// @audit function withdrawWithMessage came earlier 26: event Mint(address indexed account, uint256 amount); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L24)
### [N‑83] Style guide: Function names should use lowerCamelCase According to the Solidity [style guide](https://docs.soliditylang.org/en/latest/style-guide.html#function-names) function names should be in `mixedCase` (lowerCamelCase) *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 247 function _loadFarCallABIIntoActivePtr( 248 uint256 _gas, 249 bytes calldata _data, 250 bool _isConstructor, 251 bool _isSystem 252: ) private view { ``` *GitHub*: [247](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L245-L250) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 252 function getFarCallABIWithEmptyFatPointer( 253 uint32 gasPassed, 254 uint8 shardId, 255 CalldataForwardingMode forwardingMode, 256 bool isConstructorCall, 257 bool isSystemCall 258: ) internal pure returns (uint256 farCallAbiWithEmptyFatPtr) { ``` *GitHub*: [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L250-L256) ### [N‑84] Style guide: Function ordering does not follow the Solidity style guide According to the [Solidity style guide](https://docs.soliditylang.org/en/v0.8.17/style-guide.html#order-of-functions), functions should be laid out in the following order :`constructor()`, `receive()`, `fallback()`, `external`, `public`, `internal`, `private`, but the cases below do not follow this pattern *There are 46 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit _getERC20Getters() came earlier 257 function claimFailedDeposit( 258 address _depositSender, 259 address _l1Token, 260 bytes32 _l2TxHash, 261 uint256 _l2BatchNumber, 262 uint256 _l2MessageIndex, 263 uint16 _l2TxNumberInBatch, 264 bytes32[] calldata _merkleProof 265: ) external nonReentrant senderCanCallFunction(allowList) { /// @audit _verifyDepositLimit() came earlier 355: function l2TokenAddress(address _l1Token) public view returns (address) { ``` *GitHub*: [257](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L255-L263), [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L353) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit _getDepositL2Calldata() came earlier 216 function claimFailedDeposit( 217 address, // _depositSender, 218 address, // _l1Token, 219 bytes32, // _l2TxHash 220 uint256, // _l2BatchNumber, 221 uint256, // _l2MessageIndex, 222 uint16, // _l2TxNumberInBatch, 223: bytes32[] calldata // _merkleProof /// @audit _parseL2EthWithdrawalMessage() came earlier 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { /// @audit l2TokenAddress() came earlier 309 receive() external payable { 310 // Expected to receive ether in two cases: 311 // 1. l1 WETH sends ether on `withdraw` 312 // 2. zkSync contract withdraw funds in `finalizeEthWithdrawal` 313: require(msg.sender == l1WethAddress || msg.sender == address(zkSync), "pn"); ``` *GitHub*: [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L214-L221), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L302), [309](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L307-L311) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol /// @audit _setAccessMode() came earlier 85 function setBatchPermissionToCall( 86 address[] calldata _callers, 87 address[] calldata _targets, 88 bytes4[] calldata _functionSigs, 89 bool[] calldata _enables 90: ) external onlyOwner { /// @audit _setPermissionToCall() came earlier 131: function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { ``` *GitHub*: [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L83-L88), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol /// @audit _bytecodeLen() came earlier 62 function computeCreate2Address( 63 address _sender, 64 bytes32 _salt, 65 bytes32 _bytecodeHash, 66 bytes32 _constructorInputHash 67: ) internal pure returns (address) { ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L60-L65) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit getOperationState() came earlier 131: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external onlyOwner { /// @audit _checkPredecessorDone() came earlier 251: function updateDelay(uint256 _newDelay) external onlySelf { /// @audit updateSecurityCouncil() came earlier 264: receive() external payable {} ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L129), [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L249), [264](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L262) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit _setVerifierParams() came earlier 146: function _upgradeVerifier(address _newVerifier, VerifierParams calldata _verifierParams) internal { /// @audit _verifyFactoryDeps() came earlier 216: function _setNewProtocolVersion(uint256 _newProtocolVersion) internal { ``` *GitHub*: [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L144), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L214) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol /// @audit _postUpgrade() came earlier 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit _processL2Logs() came earlier 179 function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 180 external 181 override 182 nonReentrant 183: onlyValidator /// @audit _executeOneBatch() came earlier 293: function executeBatches(StoredBatchInfo[] calldata _batchesData) external nonReentrant onlyValidator { /// @audit _getBatchProofPublicInput() came earlier 391: function revertBatches(uint256 _newLastBatch) external nonReentrant onlyValidator { ``` *GitHub*: [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L177-L181), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L291), [391](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L389) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit proveL2MessageInclusion() came earlier 66 function proveL2LogInclusion( 67 uint256 _batchNumber, 68 uint256 _index, 69 L2Log memory _log, 70 bytes32[] calldata _proof 71: ) external view returns (bool) { /// @audit _L2MessageToLog() came earlier 168 function l2TransactionBaseCost( 169 uint256 _gasPrice, 170 uint256 _l2GasLimit, 171 uint256 _l2GasPerPubdataByteLimit 172: ) public pure returns (uint256) { /// @audit _deriveL2GasPrice() came earlier 194 function finalizeEthWithdrawal( 195 uint256 _l2BatchNumber, 196 uint256 _l2MessageIndex, 197 uint16 _l2TxNumberInBatch, 198 bytes calldata _message, 199 bytes32[] calldata _merkleProof 200: ) external override nonReentrant senderCanCallFunction(s.allowList) { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L64-L69), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L166-L170), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L192-L198) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit _deployL2Token() came earlier 107 function withdraw( 108 address _l1Receiver, 109 address _l2Token, 110: uint256 _amount /// @audit _getL1WithdrawMessage() came earlier 133: function l2TokenAddress(address _l1Token) public view override returns (address) { ``` *GitHub*: [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L105-L108), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit decimals() came earlier 144: function decodeString(bytes memory _input) external pure returns (string memory result) { ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L142) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol /// @audit withdrawTo() came earlier 113 receive() external payable { 114: depositTo(msg.sender); ``` *GitHub*: [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L111-L112) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit l2TokenAddress() came earlier 121 receive() external payable { 122: require(msg.sender == l2WethAddress, "pd"); ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L119-L120) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol /// @audit _storeCodeHash() came earlier 80: function getRawCodeHash(address _address) public view override returns (bytes32 codeHash) { /// @audit getRawCodeHash() came earlier 91: function getCodeHash(uint256 _input) external view override returns (bytes32) { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L78), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L89) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit _storeAccountInfo() came earlier 64: function updateAccountVersion(AccountAbstractionVersion _version) external onlySystemCall { /// @audit getNewAddressCreate() came earlier 132 function create2( 133 bytes32 _salt, 134 bytes32 _bytecodeHash, 135 bytes calldata _input 136: ) external payable override returns (address) { /// @audit createAccount() came earlier 216: function forceDeployOnAddress(ForceDeployment calldata _deployment, address _sender) external payable onlySelf { ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L62), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L130-L134), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L214) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit _validateTransaction() came earlier 116 function executeTransaction( 117 bytes32, // _txHash 118 bytes32, // _suggestedSignedHash 119 Transaction calldata _transaction 120: ) external payable override ignoreNonBootloader ignoreInDelegateCall { /// @audit _isValidSignature() came earlier 200 function payForTransaction( 201 bytes32, // _txHash 202 bytes32, // _suggestedSignedHash 203 Transaction calldata _transaction 204: ) external payable ignoreNonBootloader ignoreInDelegateCall { /// @audit prepareForPaymaster() came earlier 224 fallback() external payable { 225 // fallback of default account shouldn't be called by bootloader under no circumstances 226: assert(msg.sender != BOOTLOADER_FORMAL_ADDRESS); /// @audit fallback() came earlier 231 receive() external payable { 232 // If the contract is called directly, behave like an EOA 233: } ``` *GitHub*: [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L114-L118), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L198-L202), [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L222-L224), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L229-L231) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol /// @audit fallback() came earlier 16: receive() external payable {} ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L14) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit _markBytecodeAsPublished() came earlier 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L66) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit sha256GasCost() came earlier 77 function sendL2ToL1Log( 78 bool _isService, 79 bytes32 _key, 80 bytes32 _value 81: ) external onlyCallFromSystemContract returns (uint256 logIdInMerkleTree) { /// @audit _processL2ToL1Log() came earlier 121: function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L75-L79), [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L119) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit _getExtendedWithdrawMessage() came earlier 130: function name() external pure override returns (string memory) { ``` *GitHub*: [130](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L128) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit _getAbiParams() came earlier 37: fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit getValueUnderNonce() came earlier 112: function incrementMinNonceIfEquals(uint256 _expectedNonce) external onlySystemCall { /// @audit isNonceUsed() came earlier 161: function validateNonceUsage(address _address, uint256 _key, bool _shouldBeUsed) external view { ``` *GitHub*: [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L110), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L159) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit _setNewL2BlockData() came earlier 314 function setL2Block( 315 uint128 _l2BlockNumber, 316 uint128 _l2BlockTimestamp, 317 bytes32 _expectedPrevL2BlockHash, 318 bool _isFirstInBatch, 319 uint128 _maxVirtualBlocksToCreate 320: ) external onlyCallFromBootloader { /// @audit _ensureBatchConsistentWithL2Block() came earlier 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423: ) external onlyCallFromBootloader { ``` *GitHub*: [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L312-L318), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L421) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol /// @audit _verifyCallResult() came earlier 234 function propagateRevert() internal pure { 235: assembly { ``` *GitHub*: [234](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L232-L233) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit _encodeHashEIP1559Transaction() came earlier 364: function processPaymasterInput(Transaction calldata _transaction) internal { ``` *GitHub*: [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L362)
### [N‑85] Style guide: Lines are too long Usually lines in source code are limited to [80](https://softwareengineering.stackexchange.com/questions/148677/why-is-80-characters-the-standard-limit-for-code-width) characters. Today's screens are much larger so it's reasonable to stretch this in some cases. The solidity style guide recommends a maximumum line length of [120 characters](https://docs.soliditylang.org/en/v0.8.17/style-guide.html#maximum-line-length), so the lines below should be split when they reach that length. *There are 121 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 34: // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/566a774222707e424896c0c390a84dc3c13bdcb2/contracts/security/ReentrancyGuard.sol ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L32) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 20: /// @param SpecialAccessOnly Any address with granted special access can interact with a contract (see `hasSpecialAccessToCall`) ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L18) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 11: * @dev Each of the functions accepts the `bytes memory` and the offset where data should be read and returns a value of a certain type. ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L9) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 15: import {L2_TO_L1_LOG_SERIALIZE_SIZE, EMPTY_STRING_KECCAK, DEFAULT_L2_LOGS_TREE_ROOT_HASH, L2_TX_MAX_GAS_LIMIT} from "./Config.sol"; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L13) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 33: require(msg.sender == pendingGovernor, "n4"); // Only proposed by current governor address can claim the governor rights ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 8: import {COMMIT_TIMESTAMP_NOT_OLDER, COMMIT_TIMESTAMP_APPROXIMATION_DELTA, EMPTY_STRING_KECCAK, L2_TO_L1_LOG_SERIALIZE_SIZE, INPUT_MASK, MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, PACKED_L2_BLOCK_TIMESTAMP_MASK} from "../Config.sol"; 9: import {IExecutor, L2_LOG_ADDRESS_OFFSET, L2_LOG_KEY_OFFSET, L2_LOG_VALUE_OFFSET, SystemLogKey} from "../interfaces/IExecutor.sol"; 15: import {L2_BOOTLOADER_ADDRESS, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR} from "../../common/L2ContractAddresses.sol"; 73: /// @param _packedBatchAndL2BlockTimestamp - packed batch and L2 block timestamp in a format of batchTimestamp * 2**128 + l2BatchTimestamp 95: require(block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER <= batchTimestamp, "h1"); // New batch timestamp is too small 96: require(lastL2BlockTimestamp <= block.timestamp + COMMIT_TIMESTAMP_APPROXIMATION_DELTA, "h2"); // The last L2 block timestamp is too big 186: require(s.storedBatchHashes[s.totalBatchesCommitted] == _hashStoredBatchInfo(_lastCommittedBatchData), "i"); // incorrect previous batch data 236: // While the logic of the contract ensures that the s.l2SystemContractsUpgradeBatchNumber is 0 when this function is called, 284: require(priorityOperationsHash == _storedBatch.priorityOperationsHash, "x"); // priority operations hash does not match to expected 302: require(newTotalBatchesExecuted <= s.totalBatchesVerified, "n"); // Can't execute batches more than committed and proven currently. ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L7), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L13), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L71), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L94), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L184), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L234), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L282), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L300) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 57: /// @return The total number of priority operations that were added to the priority queue, including all processed ones ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L55) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 48: /// @param _message Information about the sent message: sender address, the message itself, tx index in the L2 batch where the message was sent 83: /// NOTE: It may return `false` for incorrect proof, but it doesn't mean that the L1 -> L2 transaction has an opposite status! 100: // - l2ShardId = 0 (means that L1 -> L2 transaction was processed in a rollup shard, other shards are not available yet anyway) 166: /// @param _l2GasPerPubdataByteLimit The maximum amount of L2 gas that the operator may charge the user for a single byte of pubdata. 225: /// @param _l2GasPerPubdataByteLimit The maximum amount L2 gas that the operator may charge the user for single byte of pubdata. 229: /// Please note, the contract may change the refund recipient's address to eliminate sending funds to addresses out of control. 231: /// - If `_refundRecipient` is set to `address(0)` and the sender has NO deployed bytecode on L1, the refund will be sent to the `msg.sender` address. 232: /// - If `_refundRecipient` is set to `address(0)` and the sender has deployed bytecode on L1, the refund will be sent to the aliased `msg.sender` address. 233: /// @dev The address aliasing of L1 contracts as refund recipient on L2 is necessary to guarantee that the funds are controllable, 235: /// Without address aliasing for L1 contracts as refund recipients they would not be able to make proper L2 tx requests 237: /// @return canonicalTxHash The hash of the requested L2 transaction. This hash can be used to follow the transaction status 248: // Please note, currently zkSync address derivation is different from Ethereum one, but it may be changed in the future. 256: // VERY IMPORTANT: nobody should rely on this constant to be fixed and every contract should give their users the ability to provide the 278: IAllowList.Deposit memory limitData = IAllowList(s.allowList).getTokenDepositLimitData(address(0)); // address(0) denotes the ETH 416: // It should be equal to the length of the bytes4 function signature + address l1Receiver + uint256 amount = 4 + 20 + 32 = 56 (bytes). ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L46), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L81), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L98), [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L164), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L223), [229](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L227), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L229), [232](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L230), [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L231), [235](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L233), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L235), [248](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L246), [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L254), [278](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L276), [416](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L414) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 27: /// @dev Offset used to pull Value From Log. Equal to 4 (bytes for isService) + 20 (bytes for address) + 32 (bytes for key) 34: /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 54: /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 58: /// @param bootloaderHeapInitialContentsHash Hash of the initial contents of the bootloader heap. In practice it serves as the commitment to the transactions in the batch. 59: /// @param eventsQueueStateHash Hash of the events queue state. In practice it serves as the commitment to the events in the batch. 61: /// @param totalL2ToL1Pubdata Total pubdata committed to as part of bootloader run. Contents are: l2Tol1Logs <> l2Tol1Messages <> publishedBytecodes <> stateDiffs 99: /// @dev It has the name "BlocksVerification" and not "BatchesVerification" due to backward compatibility considerations ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L25), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L32), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L52), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L57), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L59), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L97) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 20: /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx 22: /// @param from The sender's address. `uint256` type for possible address format changes and maintaining backward compatibility 23: /// @param to The recipient's address. `uint256` type for possible address format changes and maintaining backward compatibility 25: /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata (every piece of data that will be stored on L1 as calldata) 26: /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get the transaction included in a batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions 27: /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator to incentivize them to include the transaction in a batch. Analog to the EIP-1559 `maxPriorityFeePerGas` on an L1 transactions 28: /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 143: /// @param factoryDeps An array of bytecodes that were shown in the L1 public data. Will be marked as known bytecodes in L2 ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L18), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L20), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L21), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L23), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L26), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L141) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 18: /// @dev Used to distinguish calls to contracts that were supposed to be used as diamond initializer from other contracts. 23: bytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b; // keccak256("diamond.standard.diamond.storage") - 1; 164: require(oldFacet.facetAddress != address(0), "L"); // it is impossible to replace the facet with zero address ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L16), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L21), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L162) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 64: // shifted to its proper position. The XOR operation will effectively replace the old value with the new value. ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L62) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 15: /// NOTE: When using this function, check that the _path length is equal to the tree height to prevent shorter/longer paths attack ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L13) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 41: /// @return The total number of priority operations that were added to the priority queue, including all processed ones ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L39) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 70: /// Note: The calculation includes the main cost of the priority transaction, however, in reality, the operator can spend a little more gas on overheads. 109: /// and the L2 gas needed to process the transaction itself (i.e. the actual l2GasLimit that will be used for the transaction). 132: /// and the L2 gas needed to process the transaction itself (i.e. the actual gasLimit that will be used for the transaction). 133: /// @param _gasPricePerPubdata The maximum amount of L2 gas that the operator may charge the user for a single byte of pubdata. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L68), [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L107), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L130), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 147: /// @dev This function uses raw call to ContractDeployer to make sure that exactly `l2TokenProxyBytecodeHash` is used ``` *GitHub*: [147](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L145) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 17: /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method. ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L15) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 22: /// But for now, when the Rollup has instant upgradability, we leave the possibility of upgrading to improve the contract if needed. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L20) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 18: /// @dev This contract works in conjunction with the L1WethBridge to streamline the process of bridging WETH tokens between L1 and L2. 20: /// @dev For withdrawals, it processes the user's WETH tokens by unwrapping them and transferring the equivalent Ether to the L1 Bridge. 21: /// @dev This custom bridge differs from the standard ERC20 bridge by handling the conversion between Ether and WETH directly, 22: /// eliminating the need for users to perform additional wrapping and unwrapping transactions on both L1 and L2 networks. 61: /// @notice Initiate the withdrawal of WETH from L2 to L1 by sending a message to L1 and calling withdraw on L2EthToken contract ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L16), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L20), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L59) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 16: * the second byte denotes whether the contract is constructed, and the next two bytes denote the length in 32-byte words. 19: * @dev The length of each bytecode MUST be odd. It's internal code format requirements, due to padding of SHA256 function. ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L14), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L17) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 23: /// @return txHash and signedTxHash of the transaction, i.e. the transaction hash to be used in the explorer and commits to all ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L21) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 13: * @notice Upgrader which should be used to perform complex multistep upgrades on L2. In case some custom logic for an upgrade is needed ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L11) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 7: import {ICompressor, OPERATION_BITMASK, LENGTH_BITS_OFFSET, MAX_ENUMERATION_INDEX_SIZE} from "./interfaces/ICompressor.sol"; 31: * @dev Every deployed bytecode/published state diffs in zkEVM should be publicly restorable from the L1 data availability. 54: /// @dev Currently, the method may be called only from the bootloader because the server is not ready to publish bytecodes 91: /// @dev We don't verify that the size of {_stateDiffs} is equivalent to {_numberOfStateDiffs} * STATE_DIFF_ENTRY_SIZE since that check is 94: /// @dev This check assumes that the ordering of state diffs are sorted by (address, key) for the encoded state diffs and 96: /// @dev state diff: [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value] 149: require(derivedKey == _compressedStateDiffs.readBytes32(stateDiffPtr), "iw: initial key mismatch"); 177: uint256 compressedEnumIndex = _sliceToUint256(_compressedStateDiffs[stateDiffPtr:stateDiffPtr + _enumerationIndexSize]); 215: /// @notice Verify value compression was done correct given initial value, final value, operation, and compressed value 220: /// value or difference between initial and final value. It should be of arbitrary length less than or equal to 32 bytes. 221: /// @dev It is the responsibility of the caller of this function to ensure that the `_compressedValue` has length no longer than 32 bytes. 239: require(_initialValue + convertedValue == _finalValue, "add: initial plus converted not equal to final"); 241: require(_initialValue - convertedValue == _finalValue, "sub: initial minus converted not equal to final"); ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L5), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L29), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L52), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L89), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L92), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L94), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L147), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L175), [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L213), [220](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L218), [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L219), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L237), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L239) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 84: /// @dev Each state diff consists of 156 bytes of actual data and 116 bytes of unused padding, needed for circuit efficiency. ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L82) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 9: import {CREATE2_PREFIX, CREATE_PREFIX, NONCE_HOLDER_SYSTEM_CONTRACT, ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT, FORCE_DEPLOYER, MAX_SYSTEM_CONTRACT_ADDRESS, KNOWN_CODE_STORAGE_CONTRACT, ETH_TOKEN_SYSTEM_CONTRACT, IMMUTABLE_SIMULATOR_SYSTEM_CONTRACT, COMPLEX_UPGRADER_CONTRACT} from "./Constants.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 11: import {BOOTLOADER_FORMAL_ADDRESS, NONCE_HOLDER_SYSTEM_CONTRACT, DEPLOYER_SYSTEM_CONTRACT, INonceHolder} from "./Constants.sol"; ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L9) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 18: * the second byte denotes whether the contract is constructed, and the next two bytes denote the length in 32-byte words. ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L16) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 7: import {IL1Messenger, L2ToL1Log, L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, L2_TO_L1_LOG_SERIALIZE_SIZE, STATE_DIFF_COMPRESSION_VERSION_NUMBER} from "./interfaces/IL1Messenger.sol"; 194: /// processed in the current L1 Batch. Pubdata consists of L2 to L1 Logs, messages, deployed bytecode, and state diffs. 197: /// @dev The data passed in also contains the encoded state diffs to be checked again, however this is aux data that is not 283: /// header (1 byte version, 2 bytes total len of compressed, 1 byte enumeration index size, 2 bytes number of initial writes) 284: /// body (N bytes of initial writes [32 byte derived key || compressed value], M bytes repeated writes [enumeration index || compressed value]) 285: /// encoded state diffs: [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value] ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L5), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L192), [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L195), [283](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L281), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L282), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L283) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 9: import {MSG_VALUE_SYSTEM_CONTRACT, DEPLOYER_SYSTEM_CONTRACT, BOOTLOADER_FORMAL_ADDRESS, L1_MESSENGER_CONTRACT} from "./Constants.sol"; 16: * @dev It does NOT provide interfaces for personal interaction with tokens like `transfer`, `approve`, and `transferFrom`. 84: /// @notice Initiate the ETH withdrawal, with the sent message. The funds will be available to claim on L1 `finalizeEthWithdrawal` method. ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L7), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L14), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L82) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 26: * @dev The behavior of some of the methods depends on the nonce ordering of the account. Nonce ordering is a mere suggestion and all the checks that are present ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L24) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 23: /// - Store the latest 256 hashes (and strictly rely that we do not accidentally override the hash of the block 256 blocks ago) 67: /// of the miniblocks cheaper, we only store the previous MINIBLOCK_HASHES_TO_STORE ones. Since whenever we need to publish a state 69: /// By having this data in a cyclic array of MINIBLOCK_HASHES_TO_STORE blocks, we bring the costs down by 40% (i.e. 40 bytes per miniblock instead of 64 bytes). 71: /// @dev Hashes of the blocks older than the ones which are stored here can be calculated as _calculateLegacyL2BlockHash(blockNumber). 76: /// - Their number will start from being equal to the number of the batch and it will increase until it reaches the L2 block number. 81: /// @notice The information about the virtual blocks upgrade, which tracks when the migration to the L2 blocks has started and finished. 112: // 2. If the block was created before the upgrade for the virtual blocks (i.e. there we used to use hashes of the batches), 115: // all the information which is returned for users should be for L2 blocks, we return the hash of the corresponding L2 block. 129: // Important: we do not want this number to ever collide with the L2 block hash (either new or old one) and so 130: // that's why the legacy L2 blocks' hashes are keccak256(abi.encodePacked(uint32(_block))), while these are equivalent to 254: // Note, that when setting the virtual block number we use the batch number to make a smoother upgrade from batch number to 272: // We do not use a `require` here, since the virtual blocks are a temporary solution to let the Solidity's `block.number` 313: /// @dev It is also enforced that the number of the current virtual L2 block can not exceed the number of the L2 block. ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L21), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L65), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L67), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L69), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L74), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L79), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L110), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L113), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L127), [130](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L128), [254](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L252), [272](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L270), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L311) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 8: /// @param l2ShardId The shard identifier, 0 - rollup, 1 - porter. All other values are not used but are reserved for the future 26: /// @dev Equal to the bytes size of the tuple - (uint8 ShardId, bool isService, uint16 txNumberInBlock, address sender, bytes32 key, bytes32 value) ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L6), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L24) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 26: /// all the information returned to users for block.timestamp/number, etc should be the information about the L2 blocks and ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L24) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 9: * @notice The interface with deprecated functions of the SystemContext contract. It is aimed for backward compatibility. ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L7) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 18: * In turn, zkEVM operates over a fat pointer, which is a set of (memory page, offset, start, length) in the memory/calldata/returndata. 27: * 3. `ptr.pack` - Do the concatenation between the lowest 128 bits of the pointer itself and the highest 128 bits of `_value`. It is typically used to prepare the ABI for external calls. ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L16), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L25) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 134: /// @dev Transforms `ACTIVE_PTR.length` into `ACTIVE_PTR.length - u32(_shrink)`. If underflow happens then it panics. ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L132) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 88: "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 293: // H(0x02 || RLP(chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, destination, amount, data, access_list)) ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L86), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L291) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 11: * @dev Each of the functions accepts the `bytes calldata` and the offset where data should be read and returns a value of a certain type. ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L9) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 57: /// @notice Denotes whether bytecode hash corresponds to a contract that is on constructor or has already been constructed ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L55) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 60: * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. 84: * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L58), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L82)
### [N‑86] Style guide: Non-`external`/`public` function names should begin with an underscore According to the Solidity Style Guide, non-`external`/`public` function names should begin with an [underscore](https://docs.soliditylang.org/en/latest/style-guide.html#underscore-prefix-for-non-external-functions-and-variables) *There are 5 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 46: function encodeLegacyTransactionHash(Transaction calldata _transaction) internal view returns (bytes32 txHash) { 141: function encodeEIP2930TransactionHash(Transaction calldata _transaction) internal view returns (bytes32) { 231: function encodeEIP1559TransactionHash(Transaction calldata _transaction) internal view returns (bytes32) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L44-L44), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L139-L139), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L229-L229) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 60: function keccakGasCost(uint256 _length) internal pure returns (uint256) { 71: function sha256GasCost(uint256 _length) internal pure returns (uint256) { ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L58-L58), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L69-L69) ### [N‑87] Style guide: Non-`external`/`public` variable names should begin with an underscore According to the Solidity Style Guide, non-`external`/`public` variable names should begin with an [underscore](https://docs.soliditylang.org/en/latest/style-guide.html#underscore-prefix-for-non-external-functions-and-variables) *There are 44 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 34: IAllowList internal immutable allowList; 37: IZkSync internal immutable zkSync; 45: mapping(address => mapping(address => mapping(bytes32 => uint256))) internal depositAmount; ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L32-L32), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L35-L35), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L43-L43) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 20: uint256 constant DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT = 10000000; 23: uint256 constant REQUIRED_L2_GAS_PRICE_PER_PUBDATA = 800; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L18-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 31: uint256 private constant LOCK_FLAG_ADDRESS = 0x8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4; ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L29-L29) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 14: bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2"); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L12-L12) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 24: uint256 internal constant EXECUTED_PROPOSAL_TIMESTAMP = uint256(1); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 24: uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 38: LibMap.Uint32Map internal committedBatchTimestamp; ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L36-L36) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 17: AppStorage internal s; ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 19 bytes32 constant DIAMOND_INIT_SUCCESS_RETURN_VALUE = 20: 0x33774e659306e47509050e97cb651e731180a42d458212294d30751925c551a2; // keccak256("diamond.zksync.init") - 1 23: bytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b; // keccak256("diamond.standard.diamond.storage") - 1; ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L17-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 31: bytes32 internal l2TokenProxyBytecodeHash; ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L29-L29) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 24: ERC20Getters availableGetters; 29: uint8 private decimals_; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L22-L22), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L27-L27) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 25: bytes32 constant EMPTY_STRING_KECCAK = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L23-L23) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 28: mapping(address => AccountInfo) internal accountInfo; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L26-L26) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 23: mapping(uint256 => mapping(uint256 => bytes32)) internal immutableDataStorage; ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 38: bytes32 internal chainedLogsHash; 42: uint256 internal numberOfLogsToProcess; 46: bytes32 internal chainedMessagesHash; 51: bytes32 internal chainedL1BytecodesRevealDataHash; 54: uint256 internal constant KECCAK_ROUND_GAS_COST = 40; 57: uint256 internal constant KECCAK_ROUND_NUMBER_OF_BYTES = 136; 65: uint256 internal constant SHA256_ROUND_GAS_COST = 7; 68: uint256 internal constant SHA256_ROUND_NUMBER_OF_BYTES = 64; ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L36-L36), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L40-L40), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L44-L44), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L49-L49), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L52-L52), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L55-L55), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L63-L63), [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L66-L66) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 22: mapping(address => uint256) internal balance; ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L20-L20) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 30: uint256 constant DEPLOY_NONCE_MULTIPLIER = 2 ** 128; 33: uint256 constant MAXIMAL_MIN_NONCE_INCREMENT = 2 ** 32; 38: mapping(uint256 => uint256) internal rawNonces; 43: mapping(uint256 => mapping(uint256 => uint256)) internal nonceValues; ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L28-L28), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L31-L31), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L36-L36), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 25: uint256 internal constant MINIBLOCK_HASHES_TO_STORE = 257; 53: BlockInfo internal currentBatchInfo; 57: mapping(uint256 => bytes32) internal batchHash; 60: BlockInfo internal currentL2BlockInfo; 63: bytes32 internal currentL2BlockTxsRollingHash; 72: bytes32[MINIBLOCK_HASHES_TO_STORE] internal l2BlockHash; 79: BlockInfo internal currentVirtualL2BlockInfo; 82: VirtualBlockUpgradeInfo internal virtualBlockUpgradeInfo; ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L23-L23), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L51-L51), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L55-L55), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L58-L58), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L61-L61), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L70-L70), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L77-L77), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L80-L80) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 84: bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId)"); 86 bytes32 constant EIP712_TRANSACTION_TYPE_HASH = 87 keccak256( 88 "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 89: ); ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L82-L82), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L84-L87) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 15 bytes32 constant IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK = 16: 0x00ff000000000000000000000000000000000000000000000000000000000000; 19 bytes32 constant SET_IS_CONSTRUCTOR_MARKER_BIT_MASK = 20: 0x0001000000000000000000000000000000000000000000000000000000000000; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L13-L14), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L17-L18)
### [N‑88] Style guide: State and local variables should be named using lowerCamelCase The Solidity style guide [says](https://docs.soliditylang.org/en/latest/style-guide.html#local-and-state-variable-names) to use mixedCase for local and state variable names. Note that while OpenZeppelin may not follow this advice, it still is the recommended way of naming variables. *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 56: mapping(address => uint256) public __DEPRECATED_lastWithdrawalLimitReset; 59: mapping(address => uint256) public __DEPRECATED_withdrawnAmountInWindow; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L54-L54), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L57-L57) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 83: uint256[7] __DEPRECATED_diamondCutStorage; 124: UpgradeStorage __DEPRECATED_upgrades; 131: uint256 __DEPRECATED_lastWithdrawalLimitReset; 133: uint256 __DEPRECATED_withdrawnAmountInWindow; ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L81-L81), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L122-L122), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L129-L129), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L131-L131) ### [N‑89] Style guide: Strings should use double quotes rather than single quotes See the Solidity Style [Guide](https://docs.soliditylang.org/en/v0.8.20/style-guide.html#other-recommendations) *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 26: // So, '(_index & 7) * 32' is done to find the bit position of the uint32 in that storage slot. 51: // So, '(_index & 7) * 32' is done to find the bit position of the uint32 in that storage slot. ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L24), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L49) ### [N‑90] Style guide: Top-level declarations should be separated by at least two lines And functions within contracts should be separate by a [single](https://docs.soliditylang.org/en/latest/style-guide.html#blank-lines) line *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 10 } 11 12: interface IImmutableSimulator { ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L8-L10) ### [N‑91] Style guide: Variable names for `constant`s are improperly named According to the [Style guide](https://docs.soliditylang.org/en/latest/style-guide.html#constants), for `constant` variable names, each word should use all capital letters, with underscores separating each word (CONSTANT_CASE) *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 24: uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 26: string public constant override getName = "ValidatorTimelock"; ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L24-L24) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 17: string public constant override getName = "AdminFacet"; ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 24: string public constant override getName = "ExecutorFacet"; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 21: string public constant override getName = "GettersFacet"; ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L19-L19) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 43: string public constant override getName = "MailboxFacet"; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L41-L41) ### [N‑92] Style guide: Variable names for `immutable`s should use CONSTANT_CASE For `immutable` variable names, each word should use all capital letters, with underscores separating each word (CONSTANT_CASE) *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 34: IAllowList internal immutable allowList; 37: IZkSync internal immutable zkSync; ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L32-L32), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L35-L35) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 46: address payable public immutable l1WethAddress; 49: IAllowList public immutable allowList; 52: IZkSync public immutable zkSync; ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L44-L44), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L47-L47), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 35: address public immutable zkSyncContract; ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L33-L33) ### [N‑93] Typos *There are 20 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol /// @audit formam 39: /// @dev The function reverts on invalid bytecode hash formam. ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L37) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit hanges 50: /// @notice Сhanges to the bytecode that is used in L2 as a bootloader (start program) /// @audit hanges 53: /// @notice Сhanges to the bytecode that is used in L2 as a default account /// @audit occured 71: // of the L1 block at which the upgrade occured. This means that using timestamp as a signifier of "upgraded" /// @audit commited 116: // Batches committed expecting the old verifier will fail. Ensure all commited batches are finalized before the ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L48), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L51), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L69), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L114) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit encure /// @audit noticable 237: // this check is added just in case. Since it is a hot read, it does not encure noticable gas cost. ``` *GitHub*: [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L235), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L235) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol /// @audit dependenies 87: // Taking into the account the additional costs of providing new factory dependenies /// @audit auxilary 96: // Adding the intrinsic cost for the transaction, i.e. auxilary prices which cannot be easily accounted for /// @audit dependenies 99: // Taking into the account the additional costs of providing new factory dependenies ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L85), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L94), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L97) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol /// @audit deriived 123: /// @dev The offset of the deriived key in a storage diff. ``` *GitHub*: [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L121) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit paramter 67: /// @dev Besides the params above, it also accepts unused first paramter "_txHash", which /// @audit signaure 162: /// @return EIP1271_SUCCESS_RETURN_VALUE if the signaure is correct. It reverts otherwise. ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L65), [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L160) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit retreiving 110: // Due to virtual blocks upgrade, we'll have to use the following logic for retreiving the blockhash: /// @audit Reseting 294: // Reseting the rolling hash ``` *GitHub*: [110](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L108), [294](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L292) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol /// @audit amout 42: /// @param _maxRefundedGas, the upper bound on the amout of gas that could be refunded to the paymaster. ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L40) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol /// @audit implementated 11: * @notice This is NOT an interface to be implementated ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L9) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit auxilary 263: /// of the auxilary heap in bytes. /// @audit auxilary 265: /// @return auxHeapSize The size of the auxilary memory in bytes byte. /// @audit auxilary 266: /// @dev You can read more on auxilary memory in the VM1.2 documentation. ``` *GitHub*: [263](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L261), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L263), [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L264)
### [N‑94] Unnecessary cast The variable is being cast to its own type *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit allowList 343: IAllowList.Deposit memory limitData = IAllowList(allowList).getTokenDepositLimitData(_l1Token); /// @audit l2TokenBeacon 356: bytes32 constructorInputHash = keccak256(abi.encode(address(l2TokenBeacon), "")); ``` *GitHub*: [343](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L341-L341), [356](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L354-L354) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit allowList 278: IAllowList.Deposit memory limitData = IAllowList(s.allowList).getTokenDepositLimitData(address(0)); // address(0) denotes the ETH /// @audit l2GasPrice 342: maxFeePerGas: uint256(_priorityOpParams.l2GasPrice), /// @audit txId 346: nonce: uint256(_priorityOpParams.txId), ``` *GitHub*: [278](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L276-L276), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L340-L340), [346](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L344-L344) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit MAX_SYSTEM_CONTRACT_ADDRESS 357: return uint160(_address) <= uint160(MAX_SYSTEM_CONTRACT_ADDRESS); ``` *GitHub*: [357](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L355-L355) ### [N‑95] Unused `event` definition Note that there may be cases where an event superficially appears to be used, but this is only because there are multiple definitions of the event in different files. In such cases, the event definition should be moved into a separate file. The instances below are the unused definitions. *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 8: event BridgeMint(address indexed _account, uint256 _amount); 10: event BridgeBurn(address indexed _account, uint256 _amount); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L8-L8) ### [N‑96] Unused `public` contract variable Note that there may be cases where a variable superficially appears to be used, but this is only because there are multiple definitions of the variable in different files. In such cases, the variable definition should be moved into a separate file. The instances below are the unused variables. *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 56: mapping(address => uint256) public __DEPRECATED_lastWithdrawalLimitReset; 59: mapping(address => uint256) public __DEPRECATED_withdrawnAmountInWindow; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L54-L54), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L57-L57) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 28: uint256 public chainId; 39: uint256 public blockGasLimit = type(uint32).max; 43: address public coinbase = BOOTLOADER_FORMAL_ADDRESS; 46: uint256 public difficulty = 2500000000000000; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L26-L26), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L37-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L41-L41), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L44-L44) ### [N‑97] Unused file The file is never imported by any other source file. If the file is needed for tests, it should be moved to a test directory *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L1) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 1: pragma solidity ^0.8.1; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L1) ### [N‑98] Unused function parameter Comment out the variable name to suppress compiler warnings *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol /// @audit _customCallDataForUpgrade 17: function _upgradeL1Contract(bytes calldata _customCallDataForUpgrade) internal virtual {} /// @audit _customCallDataForUpgrade 23: function _postUpgrade(bytes calldata _customCallDataForUpgrade) internal virtual {} ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L15-L15), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit _transaction 129: function executeTransactionFromOutside(Transaction calldata _transaction) external payable override { ``` *GitHub*: [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L127-L127) ### [N‑99] Unused import The identifier is imported but never used within the file *There are 22 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol /// @audit Verifier 12: import {Verifier} from "./Verifier.sol"; ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES /// @audit MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES 8: import {COMMIT_TIMESTAMP_NOT_OLDER, COMMIT_TIMESTAMP_APPROXIMATION_DELTA, EMPTY_STRING_KECCAK, L2_TO_L1_LOG_SERIALIZE_SIZE, INPUT_MASK, MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, PACKED_L2_BLOCK_TIMESTAMP_MASK} from "../Config.sol"; /// @audit L2ContractHelper 13: import {L2ContractHelper} from "../../common/libraries/L2ContractHelper.sol"; /// @audit L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR 15: import {L2_BOOTLOADER_ADDRESS, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR} from "../../common/L2ContractAddresses.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L13-L13) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol /// @audit Diamond 9: import {Diamond} from "../libraries/Diamond.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol /// @audit UpgradeState 8: import {VerifierParams, UpgradeState} from "../Storage.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol /// @audit INITIAL_WRITE_STARTING_POSITION 14: INITIAL_WRITE_STARTING_POSITION, /// @audit COMPRESSED_INITIAL_WRITE_SIZE 15: COMPRESSED_INITIAL_WRITE_SIZE, /// @audit STATE_DIFF_ENUM_INDEX_OFFSET 17: STATE_DIFF_ENUM_INDEX_OFFSET, /// @audit STATE_DIFF_FINAL_VALUE_OFFSET 18: STATE_DIFF_FINAL_VALUE_OFFSET, /// @audit STATE_DIFF_DERIVED_KEY_OFFSET 19: STATE_DIFF_DERIVED_KEY_OFFSET, /// @audit DERIVED_KEY_LENGTH 20: DERIVED_KEY_LENGTH, /// @audit VALUE_LENGTH 21: VALUE_LENGTH, /// @audit ENUM_INDEX_LENGTH 22: ENUM_INDEX_LENGTH, ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L13-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L17-L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L18-L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L19-L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L20-L20) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit SystemContractHelper 10: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit SystemContractsCaller 10: SystemContractsCaller, /// @audit CalldataForwardingMode 11: CalldataForwardingMode, /// @audit MIMIC_CALL_BY_REF_CALL_ADDRESS 24: MIMIC_CALL_BY_REF_CALL_ADDRESS, /// @audit MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT 26: MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, /// @audit RAW_FAR_CALL_BY_REF_CALL_ADDRESS 31: RAW_FAR_CALL_BY_REF_CALL_ADDRESS, /// @audit SYSTEM_CALL_BY_REF_CALL_ADDRESS 34: SYSTEM_CALL_BY_REF_CALL_ADDRESS, ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L9-L9), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L22-L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L24-L24), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L29-L29), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L32-L32)
### [N‑00] Unusual loop variable The normal name for loop variables is `i`, and when there is a nested loop, to use `j`. Not following this convention may lead to some reviewer confusion *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 70: for (uint256 encodedDataPointer = 0; encodedDataPointer < encodedData.length; encodedDataPointer += 2) { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L68-L68) ### [N‑01] Use `bytes.concat()` on bytes instead of `abi.encodePacked()` for clearer semantic meaning Starting with version 0.8.4, Solidity has the `bytes.concat()` function, which allows one to concatenate a list of bytes/strings, without extra padding. Using this function rather than `abi.encodePacked()` makes the intended operation more clear, leading to less reviewer confusion. *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 377 abi.encodePacked( 378 _prevBatchCommitment, 379 _currentBatchCommitment, 380 _verifierParams.recursionNodeLevelVkHash, 381 _verifierParams.recursionLeafLevelVkHash 382: ) ``` *GitHub*: [377](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L375-L380) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 144: return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L142-L142) ### [N‑02] Use bit shifts in an imutable variable rather than long bit masks of a single bit, for readability *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 20: 0x0001000000000000000000000000000000000000000000000000000000000000; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L18) ### [N‑03] Use of `override` is unnecessary Starting with Solidity version [0.8.8](https://docs.soliditylang.org/en/v0.8.20/contracts.html#function-overriding), using the `override` keyword when the function solely overrides an interface function, and the function doesn't exist in multiple base contracts, is unnecessary. *There are 52 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L302-L302) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 179 function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 180 external 181 override 182 nonReentrant 183 onlyValidator 184: { ``` *GitHub*: [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L177-L182) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 84 function proveL1ToL2TransactionStatus( 85 bytes32 _l2TxHash, 86 uint256 _l2BatchNumber, 87 uint256 _l2MessageIndex, 88 uint16 _l2TxNumberInBatch, 89 bytes32[] calldata _merkleProof, 90 TxStatus _status 91: ) public view override returns (bool) { 194 function finalizeEthWithdrawal( 195 uint256 _l2BatchNumber, 196 uint256 _l2MessageIndex, 197 uint16 _l2TxNumberInBatch, 198 bytes calldata _message, 199 bytes32[] calldata _merkleProof 200: ) external override nonReentrant senderCanCallFunction(s.allowList) { ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L82-L89), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L192-L198) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 65 function finalizeDeposit( 66 address _l1Sender, 67 address _l2Receiver, 68 address _l1Token, 69 uint256 _amount, 70 bytes calldata _data 71: ) external payable override { 107 function withdraw( 108 address _l1Receiver, 109 address _l2Token, 110 uint256 _amount 111: ) external override { 133: function l2TokenAddress(address _l1Token) public view override returns (address) { ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L63-L69), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L105-L109), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L131-L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 111: function bridgeMint(address _to, uint256 _amount) external override onlyBridge { 120: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 125: function name() public view override returns (string memory) { 131: function symbol() public view override returns (string memory) { 137: function decimals() public view override returns (uint8) { ``` *GitHub*: [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L109-L109), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L118-L118), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L123-L123), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L129-L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135-L135) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 69 function bridgeMint( 70 address, // _account 71 uint256 // _amount 72: ) external view override { 80: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 90: function deposit() external payable override { 95: function withdraw(uint256 _amount) external override { 100: function depositTo(address _to) public payable override { 106: function withdrawTo(address _to, uint256 _amount) public override { ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L67-L70), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L78-L78), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L88-L88), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L93-L93), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L98-L98), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L104-L104) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 65 function withdraw( 66 address _l1Receiver, 67 address _l2Token, 68 uint256 _amount 69: ) external override { 90 function finalizeDeposit( 91 address _l1Sender, 92 address _l2Receiver, 93 address _l1Token, 94 uint256 _amount, 95 bytes calldata // _data 96: ) external payable override { 112: function l1TokenAddress(address _l2Token) public view override returns (address l1Token) { 117: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L63-L67), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L88-L94), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L110-L110), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L115-L115) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 37: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 48: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 56: function markAccountCodeHashAsConstructed(address _address) external override onlyDeployer { 80: function getRawCodeHash(address _address) public view override returns (bytes32 codeHash) { 91: function getCodeHash(uint256 _input) external view override returns (bytes32) { 119: function getCodeSize(uint256 _input) external view override returns (uint256 codeSize) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L35-L35), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L46-L46), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L54-L54), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L78-L78), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L89-L89), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L117-L117) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 26 function getTransactionHashes( 27 Transaction calldata _transaction 28: ) external view override returns (bytes32 txHash, bytes32 signedTxHash) { ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L24-L26) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 94 function getNewAddressCreate2( 95 address _sender, 96 bytes32 _bytecodeHash, 97 bytes32 _salt, 98 bytes calldata _input 99: ) public view override returns (address newAddress) { 114 function getNewAddressCreate( 115 address _sender, 116 uint256 _senderNonce 117: ) public pure override returns (address newAddress) { 132 function create2( 133 bytes32 _salt, 134 bytes32 _bytecodeHash, 135 bytes calldata _input 136: ) external payable override returns (address) { 148 function create( 149 bytes32 _salt, 150 bytes32 _bytecodeHash, 151 bytes calldata _input 152: ) external payable override returns (address) { 164 function create2Account( 165 bytes32 _salt, 166 bytes32 _bytecodeHash, 167 bytes calldata _input, 168 AccountAbstractionVersion _aaVersion 169: ) public payable override onlySystemCall returns (address) { 185 function createAccount( 186 bytes32, // salt 187 bytes32 _bytecodeHash, 188 bytes calldata _input, 189 AccountAbstractionVersion _aaVersion 190: ) public payable override onlySystemCall returns (address) { ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L92-L97), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L112-L115), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L130-L134), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L146-L150), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L162-L167), [185](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L183-L188) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 69 function validateTransaction( 70 bytes32, // _txHash 71 bytes32 _suggestedSignedHash, 72 Transaction calldata _transaction 73: ) external payable override ignoreNonBootloader ignoreInDelegateCall returns (bytes4 magic) { 116 function executeTransaction( 117 bytes32, // _txHash 118 bytes32, // _suggestedSignedHash 119 Transaction calldata _transaction 120: ) external payable override ignoreNonBootloader ignoreInDelegateCall { 129 function executeTransactionFromOutside(Transaction calldata _transaction) external payable override { 130 // Behave the same as for fallback/receive, just execute nothing, returns nothing 131: } ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L67-L71), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L114-L118), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L127-L129) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 29: function getImmutable(address _dest, uint256 _index) external view override returns (bytes32) { 36: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external override { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L27-L27), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L34-L34) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L66-L66) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 121: function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { 167 function requestBytecodeL1Publication( 168 bytes32 _bytecodeHash 169: ) external override onlyCallFrom(address(KNOWN_CODE_STORAGE_CONTRACT)) { ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L119-L119), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L165-L167) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 34: function transferFromTo(address _from, address _to, uint256 _amount) external override { 58: function balanceOf(uint256 _account) external view override returns (uint256) { 66: function mint(address _account, uint256 _amount) external override onlyCallFromBootloader { 74: function withdraw(address _l1Receiver) external payable override { 87: function withdrawWithMessage(address _l1Receiver, bytes memory _additionalData) external payable override { 130: function name() external pure override returns (string memory) { 136: function symbol() external pure override returns (string memory) { 142: function decimals() external pure override returns (uint8) { ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L32-L32), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L56-L56), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L64-L64), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L72-L72), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L85-L85), [130](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L128-L128), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L134-L134), [142](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L140-L140)
### [N‑04] Use OpenZeppelin's `MerkleProof` rather than rolling your own Use [MerkleProof](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/8b2ed0f5706fe1a7ab6ade84b27bf875dc611fda/contracts/utils/cryptography/MerkleProof.sol#L6-L20) for handling Merkle tree proofs, since the general advice is "don't roll your own crypto" *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 20 function calculateRoot( 21 bytes32[] calldata _path, 22 uint256 _index, 23 bytes32 _itemHash 24: ) internal pure returns (bytes32) { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L18-L22) ### [N‑05] Use the latest solidity (prior to 0.8.20 if on L2s) for deployment ``` When deploying contracts, you should use the latest released version of Solidity. Apart from exceptional cases, only the latest version receives security fixes. ``` https://docs.soliditylang.org/en/v0.8.20/ Since deployed contracts should not use floating pragmas, I've flagged all instances where a version prior to 0.8.19 is allowed by the version pragma *There are 35 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L1-L1)
### [N‑06] Using `>`/`>=` without specifying an upper bound is unsafe There _will_ be breaking changes in future versions of solidity, and at that point your code will no longer be compatable. While you may have the specific version to use in a configuration file, others that include your source files may not. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 1: pragma solidity >=0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L1) ### [N‑07] Variables need not be initialized to zero The default value for variables is zero, so initializing them to zero is superfluous. *There are 36 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 64: for (uint256 i = 0; i < targetsLength; i = i.uncheckedInc()) { 98: for (uint256 i = 0; i < callersLength; i = i.uncheckedInc()) { ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L62-L62), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L96-L96) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 227: for (uint256 i = 0; i < _calls.length; ++i) { ``` *GitHub*: [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L225-L225) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 206: for (uint256 i = 0; i < _factoryDeps.length; ++i) { ``` *GitHub*: [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L204-L204) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 48: uint256 constant PRIORITY_EXPIRATION = 0 days; 53: uint256 constant UPGRADE_NOTICE_PERIOD = 0; ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L46-L46), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L51-L51) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 87: for (uint256 i = 0; i < _newBatchesData.length; ++i) { 118: for (uint256 i = 0; i < _newBatchesData.length; ++i) { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L85-L85), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L116-L116) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 125: for (uint256 i = 0; i < emittedL2Logs.length; i = i.uncheckedAdd(L2_TO_L1_LOG_SERIALIZE_SIZE)) { 211: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 243: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 265: for (uint256 i = 0; i < _nPriorityOps; i = i.uncheckedInc()) { 295: for (uint256 i = 0; i < nBatches; i = i.uncheckedInc()) { 332: for (uint256 i = 0; i < committedBatchesLength; i = i.uncheckedInc()) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L123-L123), [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L209-L209), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L241-L241), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L263-L263), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L293-L293), [332](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L330-L330) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 184: for (uint256 i = 0; i < facetsLen; i = i.uncheckedInc()) { ``` *GitHub*: [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L182-L182) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 397: for (uint256 i = 0; i < factoryDepsLen; i = i.uncheckedInc()) { ``` *GitHub*: [397](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L395-L395) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 102: for (uint256 i = 0; i < facetCutsLength; i = i.uncheckedInc()) { 140: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 161: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 181: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L100-L100), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L138-L138), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L159-L159), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L179-L179) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 94: uint256 costForPubdata = 0; ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L92-L92) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 70: for (uint256 encodedDataPointer = 0; encodedDataPointer < encodedData.length; encodedDataPointer += 2) { 133: uint256 numInitialWritesProcessed = 0; 136: for (uint256 i = 0; i < _numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; i += STATE_DIFF_ENTRY_SIZE) { 168: for (uint256 i = 0; i < _numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; i += STATE_DIFF_ENTRY_SIZE) { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L68-L68), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L131-L131), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L134-L134), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L166-L166) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 249: uint256 sumOfValues = 0; 250: for (uint256 i = 0; i < deploymentsLength; ++i) { 255: for (uint256 i = 0; i < deploymentsLength; ++i) { ``` *GitHub*: [249](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L247-L247), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L248-L248), [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L253-L253) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 40: for (uint256 i = 0; i < immutablesLength; ++i) { ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L38-L38) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 33: for (uint256 i = 0; i < hashesLen; ++i) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L31-L31) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 204: uint256 calldataPtr = 0; 213: for (uint256 i = 0; i < numberOfL2ToL1Logs; ++i) { 231: for (uint256 i = 0; i < nodesOnCurrentLevel; ++i) { 243: for (uint256 i = 0; i < numberOfMessages; ++i) { 261: for (uint256 i = 0; i < numberOfBytecodes; ++i) { ``` *GitHub*: [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L202-L202), [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L211-L211), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L229-L229), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L241-L241), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L259-L259) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 20: uint8 constant LEGACY_TX_TYPE = 0x0; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L18-L18)
### [N‑08] Visibility should be set explicitly rather than defaulting to `internal` *There are 14 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 20: uint256 constant DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT = 10000000; 23: uint256 constant REQUIRED_L2_GAS_PRICE_PER_PUBDATA = 800; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L21) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 14: bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2"); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L12) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 24: uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L22) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 19 bytes32 constant DIAMOND_INIT_SUCCESS_RETURN_VALUE = 20: 0x33774e659306e47509050e97cb651e731180a42d458212294d30751925c551a2; // keccak256("diamond.zksync.init") - 1 23: bytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b; // keccak256("diamond.standard.diamond.storage") - 1; ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L17-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L21) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 24: ERC20Getters availableGetters; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L22) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 25: bytes32 constant EMPTY_STRING_KECCAK = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L23) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 30: uint256 constant DEPLOY_NONCE_MULTIPLIER = 2 ** 128; 33: uint256 constant MAXIMAL_MIN_NONCE_INCREMENT = 2 ** 32; ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L28), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L31) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 84: bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId)"); 86 bytes32 constant EIP712_TRANSACTION_TYPE_HASH = 87 keccak256( 88 "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 89: ); ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L82), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L84-L87) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 15 bytes32 constant IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK = 16: 0x00ff000000000000000000000000000000000000000000000000000000000000; 19 bytes32 constant SET_IS_CONSTRUCTOR_MARKER_BIT_MASK = 20: 0x0001000000000000000000000000000000000000000000000000000000000000; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L13-L14), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L17-L18)
### [N‑09] Vulnerable versions of packages are being used This project's specific package versions are vulnerable to the specific CVEs listed below. While the CVEs may involve code not in use by your project, consider switching to more recent versions of these packages that don't have these vulnerabilities, to avoid reviewers wasting time trying to determine whether there is vulnerable code from these packages in use. *There is one instance of this issue:* ```solidity File: Various Files /// @audit Vulnerabilities: /// ``` - [CVE-2023-40014](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-40014) - **MEDIUM** - (`@openzeppelin/contracts >=4.0.0 <4.9.3`): OpenZeppelin Contracts is a library for secure smart contract development. Starting in version 4.0.0 and prior to version 4.9.3, contracts using `ERC2771Context` along with a custom trusted forwarder may see `_msgSender` return `address(0)` in calls that originate from the forwarder with calldata shorter than 20 bytes. This combination of circumstances does not appear to be common, in particular it is not the case for `MinimalForwarder` from OpenZeppelin Contracts, or any deployed forwarder the team is aware of, given that the signer address is appended to all calls that originate from these forwarders. The problem has been patched in v4.9.3. ``` ``` ## Gas Optimizations ### [G‑01] `require()` or `revert()` statements that check input arguments should be at the top of the function Checks that involve constants should come before checks that involve state variables, function calls, and calculations. By doing these checks first, the function is able to revert before wasting a Gcoldsload (**2100 gas***) in a function that may ultimately revert in the unhappy case. *There are 8 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit expensive op on line 250 259: require(_l2GasPerPubdataByteLimit == REQUIRED_L2_GAS_PRICE_PER_PUBDATA, "qp"); ``` *GitHub*: [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L257) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol /// @audit expensive op on line 132 134: require(_facet != address(0), "G"); // facet with zero address cannot be added /// @audit expensive op on line 156 158: require(_facet != address(0), "K"); // cannot replace facet with zero address /// @audit expensive op on line 176 178: require(_facet == address(0), "a1"); // facet address must be zero ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L132), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L156), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L176) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol /// @audit expensive op on line 25 28: require(_index < (1 << pathLength), "px"); ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L26) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit expensive op on line 85 87: require(_value != 0, "Nonce value cannot be set to 0"); ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L85) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit expensive op on line 215 218: require(_l2BlockNumber > 0, "L2 block number is never expected to be zero"); /// @audit expensive op on line 424 426: require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); ``` *GitHub*: [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L216), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L424) ### [G‑02] Enable IR-based code generation By using `--via-ir` or `{"viaIR": true}`, the compiler is able to use more advanced [multi-function optimizations](https://docs.soliditylang.org/en/v0.8.17/ir-breaking-changes.html#solidity-ir-based-codegen-changes), for extra gas savings. *There is one instance of this issue:* ```solidity File: Various Files ``` ### [G‑03] Inline `modifier`s that are only used once, to save gas *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 66 modifier onlySecurityCouncil() { 67 require(msg.sender == securityCouncil, "Only security council allowed to call this function"); 68 _; 69: } ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L64-L67) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 61 modifier onlyBridge() { 62 require(msg.sender == l2Bridge, "permission denied"); // Only L2 bridge can call this method 63 _; 64: } ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L59-L62) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 30 modifier onlySelf() { 31 require(msg.sender == address(this), "Callable only by self"); 32 _; 33: } ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L28-L31) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 22 modifier onlyCompressor() { 23 require(msg.sender == address(COMPRESSOR_CONTRACT), "Callable only by the compressor"); 24 _; 25: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L20-L23) ### [G‑04] Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, where appropriate Saves a storage slot for the mapping. Depending on the circumstances and sizes of types, can avoid a Gsset (**20000 gas**) per mapping combined. Reads and subsequent writes can also be cheaper when a function requires both values and they both fit in the same storage slot. Finally, if both fields are accessed in the same function, can save **~42 gas per access** due to [not having to recalculate the key's keccak256 hash](https://gist.github.com/IllIllI000/ec23a57daa30a8f8ca8b9681c8ccefb0) (Gkeccak256 - 30 gas) and that calculation's associated stack operations. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 38 mapping(uint256 => uint256) internal rawNonces; 39 40 /// Mapping of values under nonces for accounts. 41 /// The main key of the mapping is the 256-bit address of the account, while the 42 /// inner mapping is a mapping from a nonce to the value stored there. 43: mapping(uint256 => mapping(uint256 => uint256)) internal nonceValues; ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L36-L41) ### [G‑05] Reduce gas usage by moving to Solidity 0.8.19 or later See [this](https://blog.soliditylang.org/2023/02/22/solidity-0.8.19-release-announcement/#preventing-dead-code-in-runtime-bytecode) link for the full details *There are 94 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/L2ContractAddresses.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 1: pragma solidity ^0.8; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 1: pragma solidity >=0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 1: pragma solidity ^0.8.1; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L1-L1)
### [G‑06] Use `uint256(1)`/`uint256(2)` instead of `true`/`false` to save gas for changes Avoids a Gsset (**20000 gas**) when changing from `false` to `true`, after having been `true` in the past. Since most of the bools aren't changed twice in one transaction, I've counted the amount of gas as half of the full amount, for each variable *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 41: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L39-L39) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 62: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L60-L60) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 28: mapping(address => mapping(address => mapping(bytes4 => bool))) public hasSpecialAccessToCall; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L26-L26) ### [G‑07] Using `storage` instead of `memory` for state variables saves gas When fetching data from a storage location, assigning the data to a `memory` variable causes all fields of the struct/array to be read from storage, which incurs a Gcoldsload (**2100 gas**) for *each* field of the struct/array. If the fields are read from the new memory variable, they incur an additional `MLOAD` rather than a cheap stack read. Instead of declaring the variable with the `memory` keyword, declaring the variable with the `storage` keyword and caching any fields that need to be re-read in stack variables, will be much cheaper, only incurring the Gcoldsload for the fields actually read. The only time it makes sense to read the whole struct/array into a `memory` variable, is if the full struct/array is being returned by the function, is being passed to a function that requires `memory`, or if the array/struct is being read from another `memory` array/struct *There are 13 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 138: VerifierParams memory oldVerifierParams = s.verifierParams; ``` *GitHub*: [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L136-L136) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 29: Diamond.SelectorToFacet memory facet = diamondStorage.selectorToFacet[msg.sig]; ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L27-L27) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 323: VerifierParams memory verifierParams = s.verifierParams; ``` *GitHub*: [323](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L321-L321) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 186: Diamond.FacetToSelectors memory facetToSelectors = ds.facetToSelectors[facetAddr]; ``` *GitHub*: [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L184-L184) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 142: SelectorToFacet memory oldFacet = ds.selectorToFacet[selector]; 163: SelectorToFacet memory oldFacet = ds.selectorToFacet[selector]; 183: SelectorToFacet memory oldFacet = ds.selectorToFacet[selector]; ``` *GitHub*: [142](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L140-L140), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L161-L161), [183](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L181-L181) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 43: AccountInfo memory info = accountInfo[_address]; 74: AccountInfo memory currentInfo = accountInfo[msg.sender]; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L41-L41), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L72-L72) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 108: VirtualBlockUpgradeInfo memory currentVirtualBlockUpgradeInfo = virtualBlockUpgradeInfo; 146: BlockInfo memory batchInfo = currentBatchInfo; 154: BlockInfo memory blockInfo = currentL2BlockInfo; 248: BlockInfo memory virtualBlockInfo = currentVirtualL2BlockInfo; ``` *GitHub*: [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L106-L106), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L144-L144), [154](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L152-L152), [248](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L246-L246)
### [G‑08] State variables only set in their definitions should be declared `constant` Avoids a Gsset (**20000 gas**) at deployment, and replaces the first access in each transaction (Gcoldsload - **2100 gas**) and each access thereafter (Gwarmacces - **100 gas**) with a `PUSH32` (**3 gas**). *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 39: uint256 public blockGasLimit = type(uint32).max; 43: address public coinbase = BOOTLOADER_FORMAL_ADDRESS; 46: uint256 public difficulty = 2500000000000000; ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L37-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L41-L41), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L44-L44) ### [G‑09] State variables only set in the constructor should be declared `immutable` Avoids a Gsset (**20000 gas**) in the constructor, and replaces the first access in each transaction (Gcoldsload - **2100 gas**) and each access thereafter (Gwarmacces - **100 gas**) with a `PUSH32` (**3 gas**). While `string`s are not value types, and therefore cannot be `immutable`/`constant` if not hard-coded outside of the constructor, the same behavior can be achieved by making the current contract `abstract` with `virtual` functions for the `string` accessors, and having a child contract override the functions with the hard-coded implementation-specific values. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 28: uint256 public chainId; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L26-L26) ### [G‑10] Structs can be packed into fewer storage slots Each slot saved can avoid an extra Gsset (**20000 gas**) for the first setting of the struct. Subsequent reads as well as writes have smaller gas savings *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol /// @audit Variable ordering with 10 slots instead of the current 12: /// bytes32(32):genesisBatchHash, bytes32(32):genesisBatchCommitment, user-defined(32):verifierParams, bytes32(32):l2BootloaderBytecodeHash, bytes32(32):l2DefaultAccountBytecodeHash, uint256(32):priorityTxMaxGasLimit, user-defined(20):verifier, uint64(8):genesisIndexRepeatedStorageChanges, bool(1):zkPorterIsAvailable, address(20):governor, address(20):admin, user-defined(20):allowList 36 struct InitializeData { 37 IVerifier verifier; 38 address governor; 39 address admin; 40 bytes32 genesisBatchHash; 41 uint64 genesisIndexRepeatedStorageChanges; 42 bytes32 genesisBatchCommitment; 43 IAllowList allowList; 44 VerifierParams verifierParams; 45 bool zkPorterIsAvailable; 46 bytes32 l2BootloaderBytecodeHash; 47 bytes32 l2DefaultAccountBytecodeHash; 48 uint256 priorityTxMaxGasLimit; 49: } ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L34-L47) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol /// @audit Variable ordering with 26 slots instead of the current 27: /// uint256[7](32):__DEPRECATED_diamondCutStorage, mapping(32):validators, uint256(32):totalBatchesExecuted, uint256(32):totalBatchesVerified, uint256(32):totalBatchesCommitted, mapping(32):storedBatchHashes, mapping(32):l2LogsRootHashes, user-defined(32):verifierParams, bytes32(32):l2BootloaderBytecodeHash, bytes32(32):l2DefaultAccountBytecodeHash, uint256(32):priorityTxMaxGasLimit, user-defined(32):__DEPRECATED_upgrades, mapping(32):isEthWithdrawalFinalized, uint256(32):__DEPRECATED_lastWithdrawalLimitReset, uint256(32):__DEPRECATED_withdrawnAmountInWindow, mapping(32):totalDepositedAmountPerUser, uint256(32):protocolVersion, bytes32(32):l2SystemContractsUpgradeTxHash, uint256(32):l2SystemContractsUpgradeBatchNumber, address(20):governor, bool(1):zkPorterIsAvailable, address(20):pendingGovernor, user-defined(20):verifier, user-defined(20):priorityQueue, user-defined(20):allowList, address(20):admin, address(20):pendingAdmin 81 struct AppStorage { 82 /// @dev Storage of variables needed for deprecated diamond cut facet 83 uint256[7] __DEPRECATED_diamondCutStorage; 84 /// @notice Address which will exercise critical changes to the Diamond Proxy (upgrades, freezing & unfreezing) 85 address governor; 86 /// @notice Address that the governor proposed as one that will replace it 87 address pendingGovernor; 88 /// @notice List of permitted validators 89 mapping(address => bool) validators; 90 /// @dev Verifier contract. Used to verify aggregated proof for batches 91 IVerifier verifier; 92 /// @notice Total number of executed batches i.e. batches[totalBatchesExecuted] points at the latest executed batch 93 /// (batch 0 is genesis) 94 uint256 totalBatchesExecuted; 95 /// @notice Total number of proved batches i.e. batches[totalBatchesProved] points at the latest proved batch 96 uint256 totalBatchesVerified; 97 /// @notice Total number of committed batches i.e. batches[totalBatchesCommitted] points at the latest committed 98 /// batch 99 uint256 totalBatchesCommitted; 100 /// @dev Stored hashed StoredBatch for batch number 101 mapping(uint256 => bytes32) storedBatchHashes; 102 /// @dev Stored root hashes of L2 -> L1 logs 103 mapping(uint256 => bytes32) l2LogsRootHashes; 104 /// @dev Container that stores transactions requested from L1 105 PriorityQueue.Queue priorityQueue; 106 /// @dev The smart contract that manages the list with permission to call contract functions 107 IAllowList allowList; 108 /// @notice Part of the configuration parameters of ZKP circuits. Used as an input for the verifier smart contract 109 VerifierParams verifierParams; 110 /// @notice Bytecode hash of bootloader program. 111 /// @dev Used as an input to zkp-circuit. 112 bytes32 l2BootloaderBytecodeHash; 113 /// @notice Bytecode hash of default account (bytecode for EOA). 114 /// @dev Used as an input to zkp-circuit. 115 bytes32 l2DefaultAccountBytecodeHash; 116 /// @dev Indicates that the porter may be touched on L2 transactions. 117 /// @dev Used as an input to zkp-circuit. 118 bool zkPorterIsAvailable; 119 /// @dev The maximum number of the L2 gas that a user can request for L1 -> L2 transactions 120 /// @dev This is the maximum number of L2 gas that is available for the "body" of the transaction, i.e. 121 /// without overhead for proving the batch. 122 uint256 priorityTxMaxGasLimit; 123 /// @dev Storage of variables needed for upgrade facet 124 UpgradeStorage __DEPRECATED_upgrades; 125 /// @dev A mapping L2 batch number => message number => flag. 126 /// @dev The L2 -> L1 log is sent for every withdrawal, so this mapping is serving as 127 /// a flag to indicate that the message was already processed. 128 /// @dev Used to indicate that eth withdrawal was already processed 129 mapping(uint256 => mapping(uint256 => bool)) isEthWithdrawalFinalized; 130 /// @dev The most recent withdrawal time and amount reset 131 uint256 __DEPRECATED_lastWithdrawalLimitReset; 132 /// @dev The accumulated withdrawn amount during the withdrawal limit window 133 uint256 __DEPRECATED_withdrawnAmountInWindow; 134 /// @dev A mapping user address => the total deposited amount by the user 135 mapping(address => uint256) totalDepositedAmountPerUser; 136 /// @dev Stores the protocol version. Note, that the protocol version may not only encompass changes to the 137 /// smart contracts, but also to the node behavior. 138 uint256 protocolVersion; 139 /// @dev Hash of the system contract upgrade transaction. If 0, then no upgrade transaction needs to be done. 140 bytes32 l2SystemContractsUpgradeTxHash; 141 /// @dev Batch number where the upgrade transaction has happened. If 0, then no upgrade transaction has happened 142 /// yet. 143 uint256 l2SystemContractsUpgradeBatchNumber; 144 /// @dev Address which will exercise non-critical changes to the Diamond Proxy (changing validator set & unfreezing) 145 address admin; 146 /// @notice Address that the governor or admin proposed as one that will replace admin role 147 address pendingAdmin; 148: } ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L79-L146) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol /// @audit Variable ordering with 7 slots instead of the current 8: /// bytes32(32):batchHash, uint256(32):numberOfLayer1Txs, bytes32(32):priorityOperationsHash, bytes32(32):l2LogsTreeRoot, uint256(32):timestamp, bytes32(32):commitment, uint64(8):batchNumber, uint64(8):indexRepeatedStorageChanges 40 struct StoredBatchInfo { 41 uint64 batchNumber; 42 bytes32 batchHash; 43 uint64 indexRepeatedStorageChanges; 44 uint256 numberOfLayer1Txs; 45 bytes32 priorityOperationsHash; 46 bytes32 l2LogsTreeRoot; 47 uint256 timestamp; 48 bytes32 commitment; 49: } ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L38-L47) ### [G‑11] Structs can be packed into fewer storage slots by truncating timestamp bytes By using a `uint32` rather than a larger type for variables that track timestamps, one can save gas by using fewer storage slots per struct, at the expense of the protocol breaking after the year 2106 (when `uint32` wraps). If this is an acceptable tradeoff, each slot saved can avoid an extra Gsset (**20000 gas**) for the first setting of the struct. Subsequent reads as well as writes have smaller gas savings *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit Variable ordering with 10 slots instead of the current 11: /// bytes[](32):factoryDeps, bytes32(32):bootloaderHash, bytes32(32):defaultAccountHash, user-defined(32):verifierParams, bytes(32):l1ContractsUpgradeCalldata, bytes(32):postUpgradeCalldata, uint256(32):newProtocolVersion, user-defined(20):l2ProtocolUpgradeTx, uint32(4):upgradeTimestamp, address(20):verifier, address(20):newAllowList 33 struct ProposedUpgrade { 34 IMailbox.L2CanonicalTransaction l2ProtocolUpgradeTx; 35 bytes[] factoryDeps; 36 bytes32 bootloaderHash; 37 bytes32 defaultAccountHash; 38 address verifier; 39 VerifierParams verifierParams; 40 bytes l1ContractsUpgradeCalldata; 41 bytes postUpgradeCalldata; 42 uint256 upgradeTimestamp; 43 uint256 newProtocolVersion; 44 address newAllowList; 45: } ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L31-L43) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol /// @audit Variable ordering with 10 slots instead of the current 12: /// bytes32(32):genesisBatchHash, bytes32(32):genesisBatchCommitment, user-defined(32):verifierParams, bytes32(32):l2BootloaderBytecodeHash, bytes32(32):l2DefaultAccountBytecodeHash, uint256(32):priorityTxMaxGasLimit, user-defined(20):verifier, uint32(4):genesisIndexRepeatedStorageChanges, bool(1):zkPorterIsAvailable, address(20):governor, address(20):admin, user-defined(20):allowList 36 struct InitializeData { 37 IVerifier verifier; 38 address governor; 39 address admin; 40 bytes32 genesisBatchHash; 41 uint64 genesisIndexRepeatedStorageChanges; 42 bytes32 genesisBatchCommitment; 43 IAllowList allowList; 44 VerifierParams verifierParams; 45 bool zkPorterIsAvailable; 46 bytes32 l2BootloaderBytecodeHash; 47 bytes32 l2DefaultAccountBytecodeHash; 48 uint256 priorityTxMaxGasLimit; 49: } ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L34-L47) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol /// @audit Variable ordering with 6 slots instead of the current 8: /// bytes32(32):batchHash, uint256(32):numberOfLayer1Txs, bytes32(32):priorityOperationsHash, bytes32(32):l2LogsTreeRoot, bytes32(32):commitment, uint64(8):batchNumber, uint64(8):indexRepeatedStorageChanges, uint32(4):timestamp 40 struct StoredBatchInfo { 41 uint64 batchNumber; 42 bytes32 batchHash; 43 uint64 indexRepeatedStorageChanges; 44 uint256 numberOfLayer1Txs; 45 bytes32 priorityOperationsHash; 46 bytes32 l2LogsTreeRoot; 47 uint256 timestamp; 48 bytes32 commitment; 49: } ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L38-L47) ### [G‑12] State variables can be packed into fewer storage slots by truncating timestamp bytes By using a `uint32` rather than a larger type for variables that track timestamps, one can save gas by using fewer storage slots per struct, at the expense of the protocol breaking after the year 2106 (when `uint32` wraps). If this is an acceptable tradeoff, if variables occupying the same slot are both written the same function or by the constructor, avoids a separate Gsset (**20000 gas**). Reads of the variables can also be cheaper *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit Variable ordering with 2 slots instead of the current 3: /// mapping(32):timestamps, address(20):securityCouncil, uint32(4):minDelay 28: address public securityCouncil; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L26) ### [G‑13] State variables can be packed into fewer storage slots If variables occupying the same slot are both written the same function or by the constructor, avoids a separate Gsset (**20000 gas**). Reads of the variables can also be cheaper *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit Variable ordering with 14 slots instead of the current 15: /// uint256(32):chainId, uint256(32):gasPrice, uint256(32):blockGasLimit, uint256(32):difficulty, uint256(32):baseFee, user-defined(32):currentBatchInfo, mapping(32):batchHash, user-defined(32):currentL2BlockInfo, bytes32(32):currentL2BlockTxsRollingHash, bytes32[NaN](32):l2BlockHash, user-defined(32):currentVirtualL2BlockInfo, user-defined(32):virtualBlockUpgradeInfo, address(20):origin, uint16(2):txNumberInBlock, address(20):coinbase 28: uint256 public chainId; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L26) ### [G‑14] Avoid updating storage when the value hasn't changed If the old value is equal to the new value, not re-storing the value will avoid a Gsreset (**2900 gas**), potentially at the expense of a Gcoldsload (**2100 gas**) or a Gwarmaccess (**100 gas**) *There are 15 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 131 function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { 132 tokenDeposit[_l1Token].depositLimitation = _depositLimitation; 133 tokenDeposit[_l1Token].depositCap = _depositCap; 134: } ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129-L132) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 251 function updateDelay(uint256 _newDelay) external onlySelf { 252 emit ChangeMinDelay(minDelay, _newDelay); 253 minDelay = _newDelay; 254: } 258 function updateSecurityCouncil(address _newSecurityCouncil) external onlySelf { 259 emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); 260 securityCouncil = _newSecurityCouncil; 261: } ``` *GitHub*: [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L249-L252), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L256-L259) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 54 function setValidator(address _newValidator) external onlyOwner { 55 address oldValidator = validator; 56 validator = _newValidator; 57 emit NewValidator(oldValidator, _newValidator); 58: } 61 function setExecutionDelay(uint32 _executionDelay) external onlyOwner { 62 executionDelay = _executionDelay; 63 emit NewExecutionDelay(_executionDelay); 64: } ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L52-L56), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L59-L62) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 22 function setPendingGovernor(address _newPendingGovernor) external onlyGovernor { 23 // Save previous value into the stack to put it into the event later 24 address oldPendingGovernor = s.pendingGovernor; 25 // Change pending governor 26 s.pendingGovernor = _newPendingGovernor; 27 emit NewPendingGovernor(oldPendingGovernor, _newPendingGovernor); 28: } 46 function setPendingAdmin(address _newPendingAdmin) external onlyGovernorOrAdmin { 47 // Save previous value into the stack to put it into the event later 48 address oldPendingAdmin = s.pendingAdmin; 49 // Change pending admin 50 s.pendingAdmin = _newPendingAdmin; 51 emit NewPendingGovernor(oldPendingAdmin, _newPendingAdmin); 52: } 70 function setValidator(address _validator, bool _active) external onlyGovernorOrAdmin { 71 s.validators[_validator] = _active; 72 emit ValidatorStatusUpdate(_validator, _active); 73: } 77 function setPorterAvailability(bool _zkPorterIsAvailable) external onlyGovernor { 78 // Change the porter availability 79 s.zkPorterIsAvailable = _zkPorterIsAvailable; 80 emit IsPorterAvailableStatusUpdate(_zkPorterIsAvailable); 81: } 85 function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external onlyGovernor { 86 require(_newPriorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "n5"); 87 88 uint256 oldPriorityTxMaxGasLimit = s.priorityTxMaxGasLimit; 89 s.priorityTxMaxGasLimit = _newPriorityTxMaxGasLimit; 90 emit NewPriorityTxMaxGasLimit(oldPriorityTxMaxGasLimit, _newPriorityTxMaxGasLimit); 91: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L20-L26), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L44-L50), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L68-L71), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L75-L79), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L83-L89) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 64 function updateAccountVersion(AccountAbstractionVersion _version) external onlySystemCall { 65 accountInfo[msg.sender].supportedAAVersion = _version; 66 67 emit AccountVersionUpdated(msg.sender, _version); 68: } ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L62-L66) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 84 function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 85 IContractDeployer.AccountInfo memory accountInfo = DEPLOYER_SYSTEM_CONTRACT.getAccountInfo(msg.sender); 86 87 require(_value != 0, "Nonce value cannot be set to 0"); 88 // If an account has sequential nonce ordering, we enforce that the previous 89 // nonce has already been used. 90 if (accountInfo.nonceOrdering == IContractDeployer.AccountNonceOrdering.Sequential && _key != 0) { 91 require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 92 } 93 94 uint256 addressAsKey = uint256(uint160(msg.sender)); 95 96 nonceValues[addressAsKey][_key] = _value; 97 98 emit ValueSetUnderNonce(msg.sender, _key, _value); 99: } ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82-L97) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89 function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 90 origin = _newOrigin; 91: } 95 function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 96 gasPrice = _gasPrice; 97: } 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423 ) external onlyCallFromBootloader { 424 (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = getBatchNumberAndTimestamp(); 425 require(_newTimestamp > previousBatchTimestamp, "Timestamps should be incremental"); 426 require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); 427 428 _ensureBatchConsistentWithL2Block(_newTimestamp); 429 430 batchHash[previousBatchNumber] = _prevBatchHash; 431 432 // Setting new block number and timestamp 433 BlockInfo memory newBlockInfo = BlockInfo({number: previousBatchNumber + 1, timestamp: _newTimestamp}); 434 435 currentBatchInfo = newBlockInfo; 436 437 baseFee = _baseFee; 438 439 // The correctness of this block hash: 440 SystemContractHelper.toL1(false, bytes32(uint256(SystemLogKey.PREV_BATCH_HASH_KEY)), _prevBatchHash); 441: } ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87-L89), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93-L95), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L439)
### [G‑15] Events should be emitted outside of loops Emitting an event has an overhead of **375 gas**, which will be incurred on every iteration of the loop. It is cheaper to `emit` only [once](https://github.com/ethereum/EIPs/blob/adad5968fd6de29902174e0cb51c8fc3dceb9ab5/EIPS/eip-1155.md?plain=1#L68) after the loop has finished. *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 215 emit BlockCommit( 216 _lastCommittedBatchData.batchNumber, 217 _lastCommittedBatchData.batchHash, 218 _lastCommittedBatchData.commitment 219: ); 253 emit BlockCommit( 254 _lastCommittedBatchData.batchNumber, 255 _lastCommittedBatchData.batchHash, 256 _lastCommittedBatchData.commitment 257: ); 297: emit BlockExecution(_batchesData[i].batchNumber, _batchesData[i].batchHash, _batchesData[i].commitment); ``` *GitHub*: [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L213-L217), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L251-L255), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L295-L295) ### [G‑16] `""` has the same value as `new bytes(0)` but costs less gas *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 209: (_l1Sender, _l2Receiver, _l1Token, _amount, new bytes(0)) ``` *GitHub*: [209](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L207-L207) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 350: signature: new bytes(0), 352: paymasterInput: new bytes(0), 353: reservedDynamic: new bytes(0) ``` *GitHub*: [350](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L348-L348), [352](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L350-L350), [353](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L351-L351) ### [G‑17] Avoid fetching a low-level call's return data by using assembly Even if you don't assign the call's second return value, it still gets copied to memory. Use assembly instead to prevent this and save **159 [gas](https://gist.github.com/IllIllI000/0e18a40f3afb0b83f9a347b10ee89ad2)**: `(bool success,) = payable(receiver).call{gas: gas, value: value}("");` -> `bool success; assembly { success := call(gas, receiver, value, 0, 0, 0, 0) }` *There are 4 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 83: (bool success, ) = msg.sender.call{value: _amount}(""); 108: (bool success, ) = _to.call{value: _amount}(""); ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L81-L81), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L106-L106) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 44: (bool success, ) = address(ETH_TOKEN_SYSTEM_CONTRACT).call( ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L42-L42) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 68: (bool success, ) = recipient.call{value: amount}(""); ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L66-L66) ### [G‑18] Using `calldata` instead of `memory` for read-only arguments in `external` functions saves gas When a function with a `memory` array is called externally, the `abi.decode()` step has to copy read each index of the `calldata` to `memory`. **Each copy costs at least 60 gas** (i.e. `60 * .length`). Using `calldata` directly, obviates the need for copies of words of the struct/array not being read. Note that even if an interface defines a function as having `memory` arguments, it's still valid for implementation contracts to use `calldata` arguments instead. If the array is passed to an `internal` function which passes the array to another internal function where the array is modified and therefore `memory` is used in the `external` call, it's still more gass-efficient to use `calldata` when the `external` function uses modifiers, since the modifiers may prevent the internal functions from being called. Structs have the same overhead as an array of length one Note that I've also flagged instances where the function is `public` but can be marked as `external` since it's not called by the contract, and cases where a constructor is involved *There are 12 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol /// @audit (_diamondCut) 13: constructor(uint256 _chainId, Diamond.DiamondCutData memory _diamondCut) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit commitBatches(_lastCommittedBatchData) 179: function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) ``` *GitHub*: [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L177-L177) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit proveL2MessageInclusion(_message) 54: L2Message memory _message, /// @audit proveL2LogInclusion(_log) 69: L2Log memory _log, ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L52-L52), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L67-L67) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol /// @audit proveL2LogInclusion(_log) 101: L2Log memory _log, ``` *GitHub*: [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L99-L99) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit bridgeInitialize(_data) 48: function bridgeInitialize(address _l1Address, bytes memory _data) external initializer { /// @audit decodeString(_input) 144: function decodeString(bytes memory _input) external pure returns (string memory result) { /// @audit decodeUint8(_input) 149: function decodeUint8(bytes memory _input) external pure returns (uint8 result) { ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L46-L46), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L142-L142), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol /// @audit initialize(name_) /// @audit initialize(symbol_) 41: function initialize(string memory name_, string memory symbol_) external initializer { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L39-L39), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L39-L39) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit withdrawWithMessage(_additionalData) 87: function withdrawWithMessage(address _l1Receiver, bytes memory _additionalData) external payable override { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L85-L85) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol /// @audit sendToL1(_message) 46: function sendToL1(bytes memory _message) external returns (bytes32); ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L44-L44)
### [G‑19] Using `bool`s for storage incurs overhead ```solidity // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. ``` https://github.com/OpenZeppelin/openzeppelin-contracts/blob/58f635312aa21f947cae5f8578638a85aa2519f5/contracts/security/ReentrancyGuard.sol#L23-L27 Use `uint256(0)` and `uint256(1)` for true/false to avoid a Gwarmaccess (**[100 gas](https://gist.github.com/IllIllI000/1b70014db712f8572a72378321250058)**) for the extra SLOAD *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 41: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L39-L39) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 62: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L60-L60) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 28: mapping(address => mapping(address => mapping(bytes4 => bool))) public hasSpecialAccessToCall; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L26-L26) ### [G‑20] Avoid transferring amounts of zero in order to save gas Skipping the external call when nothing will be transferred, will save at least **100 gas** *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 220: _token.safeTransferFrom(_from, address(this), _amount); 319: IERC20(l1Token).safeTransfer(l1Receiver, amount); ``` *GitHub*: [220](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L218-L218), [319](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L317-L317) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 265: IERC20(l1WethAddress).safeTransfer(l1WethWithdrawReceiver, amount); ``` *GitHub*: [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L263-L263) ### [G‑21] Using `this` to access functions results in an external call, wasting gas External calls have an overhead of **100 gas**, which can be avoided by not referencing the function using `this`. Contracts [are allowed](https://docs.soliditylang.org/en/latest/contracts.html#function-overriding) to override their parents' functions and change the visibility from `external` to `public`, so make this change if it's required in order to call the function internally. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 256: this.forceDeployOnAddress{value: _deployments[i].value}(_deployments[i], msg.sender); ``` *GitHub*: [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L254-L254) ### [G‑22] State variables should be cached in stack variables rather than re-reading them from storage The instances below point to the second+ access of a state variable within a function. Caching of a state variable replaces each Gwarmaccess (**100 gas**) with a much cheaper stack read. Other less obvious fixes/optimizations include having local memory caches of state variable structs, or having local caches of state variable contracts/addresses. *There are 76 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit l2TokenProxyBytecodeHash on line 98 119: (address(this), l2TokenProxyBytecodeHash, _governor) ``` *GitHub*: [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L117) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit s on line 87 90: s.l2DefaultAccountBytecodeHash = _l2DefaultAccountBytecodeHash; /// @audit s on line 104 107: s.l2BootloaderBytecodeHash = _l2BootloaderBytecodeHash; /// @audit s on line 122 123: s.verifier = _newVerifier; /// @audit s on line 138 139: s.verifierParams = _newVerifierParams; /// @audit s on line 180 195: s.l2SystemContractsUpgradeTxHash = l2ProtocolUpgradeTxHash; /// @audit s on line 217 224: require(s.l2SystemContractsUpgradeTxHash == bytes32(0), "Previous upgrade has not been finalized"); /// @audit s on line 224 226: s.l2SystemContractsUpgradeBatchNumber == 0, /// @audit s on line 226 230: s.protocolVersion = _newProtocolVersion; /// @audit s on line 241 242: s.allowList = _newAllowList; ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L88), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L105), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L121), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L137), [195](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L193), [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L222), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L224), [230](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L228), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L240) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol /// @audit s on line 63 64: s.governor = _initalizeData.governor; /// @audit s on line 64 65: s.admin = _initalizeData.admin; /// @audit s on line 65 79: s.storedBatchHashes[0] = keccak256(abi.encode(storedBatchZero)); /// @audit s on line 79 80: s.allowList = _initalizeData.allowList; /// @audit s on line 80 81: s.verifierParams = _initalizeData.verifierParams; /// @audit s on line 81 82: s.zkPorterIsAvailable = _initalizeData.zkPorterIsAvailable; /// @audit s on line 82 83: s.l2BootloaderBytecodeHash = _initalizeData.l2BootloaderBytecodeHash; /// @audit s on line 83 84: s.l2DefaultAccountBytecodeHash = _initalizeData.l2DefaultAccountBytecodeHash; /// @audit s on line 84 85: s.priorityTxMaxGasLimit = _initalizeData.priorityTxMaxGasLimit; ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L62), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L63), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L77), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L78), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L79), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L80), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L81), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L82), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L83) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol /// @audit s on line 24 26: s.pendingGovernor = _newPendingGovernor; /// @audit s on line 32 35: address previousGovernor = s.governor; /// @audit s on line 35 36: s.governor = pendingGovernor; /// @audit s on line 36 37: delete s.pendingGovernor; /// @audit s on line 48 50: s.pendingAdmin = _newPendingAdmin; /// @audit s on line 56 59: address previousAdmin = s.admin; /// @audit s on line 59 60: s.admin = pendingAdmin; /// @audit s on line 60 61: delete s.pendingAdmin; /// @audit s on line 88 89: s.priorityTxMaxGasLimit = _newPriorityTxMaxGasLimit; ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L24), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L33), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L34), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L35), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L48), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L59), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L87) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit s on line 186 186: require(s.storedBatchHashes[s.totalBatchesCommitted] == _hashStoredBatchInfo(_lastCommittedBatchData), "i"); // incorrect previous batch data /// @audit s on line 186 189: bytes32 systemContractsUpgradeTxHash = s.l2SystemContractsUpgradeTxHash; /// @audit s on line 189 191: if (systemContractsUpgradeTxHash == bytes32(0) || s.l2SystemContractsUpgradeBatchNumber != 0) { /// @audit s on line 191 /// @audit s on line 201 201: s.totalBatchesCommitted = s.totalBatchesCommitted + _newBatchesData.length; /// @audit s on line 238 241: s.l2SystemContractsUpgradeBatchNumber = _newBatchesData[0].batchNumber; /// @audit s on line 241 252: s.storedBatchHashes[_lastCommittedBatchData.batchNumber] = _hashStoredBatchInfo(_lastCommittedBatchData); /// @audit s on line 277 279: _hashStoredBatchInfo(_storedBatch) == s.storedBatchHashes[currentBatchNumber], /// @audit s on line 279 287: s.l2LogsRootHashes[currentBatchNumber] = _storedBatch.l2LogsTreeRoot; /// @audit s on line 300 301: s.totalBatchesExecuted = newTotalBatchesExecuted; /// @audit s on line 301 302: require(newTotalBatchesExecuted <= s.totalBatchesVerified, "n"); // Can't execute batches more than committed and proven currently. /// @audit s on line 302 304: uint256 batchWhenUpgradeHappened = s.l2SystemContractsUpgradeBatchNumber; /// @audit s on line 304 306: delete s.l2SystemContractsUpgradeTxHash; /// @audit s on line 306 307: delete s.l2SystemContractsUpgradeBatchNumber; /// @audit s on line 319 323: VerifierParams memory verifierParams = s.verifierParams; /// @audit s on line 323 329: require(_hashStoredBatchInfo(_prevBatch) == s.storedBatchHashes[currentTotalBatchesVerified], "t1"); /// @audit s on line 329 335: _hashStoredBatchInfo(_committedBatches[i]) == s.storedBatchHashes[currentTotalBatchesVerified], /// @audit s on line 335 348: require(currentTotalBatchesVerified <= s.totalBatchesCommitted, "q"); /// @audit s on line 348 356: bool successVerifyProof = s.verifier.verify( /// @audit s on line 356 364: emit BlocksVerification(s.totalBatchesVerified, currentTotalBatchesVerified); /// @audit s on line 364 365: s.totalBatchesVerified = currentTotalBatchesVerified; /// @audit s on line 392 393: require(_newLastBatch >= s.totalBatchesExecuted, "v2"); // Already executed batches cannot be reverted /// @audit s on line 393 395: if (_newLastBatch < s.totalBatchesVerified) { /// @audit s on line 395 396: s.totalBatchesVerified = _newLastBatch; /// @audit s on line 396 398: s.totalBatchesCommitted = _newLastBatch; /// @audit s on line 398 402: if (s.l2SystemContractsUpgradeBatchNumber > _newLastBatch) { /// @audit s on line 402 403: delete s.l2SystemContractsUpgradeBatchNumber; /// @audit s on line 403 /// @audit s on line 406 /// @audit s on line 406 406: emit BlocksRevert(s.totalBatchesCommitted, s.totalBatchesVerified, s.totalBatchesExecuted); /// @audit s on line 438 /// @audit s on line 438 438: return abi.encodePacked(s.zkPorterIsAvailable, s.l2BootloaderBytecodeHash, s.l2DefaultAccountBytecodeHash); ``` *GitHub*: [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L184), [189](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L187), [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L189), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L199), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L199), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L239), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L250), [279](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L277), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L285), [301](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L299), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L300), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L302), [306](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L304), [307](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L305), [323](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L321), [329](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L327), [335](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L333), [348](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L346), [356](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L354), [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L362), [365](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L363), [393](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L391), [395](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L393), [396](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L394), [398](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L396), [402](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L400), [403](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L401), [406](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L404), [406](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L404), [406](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L404), [438](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L436), [438](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L436) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit s on line 131 145: bytes32 actualRootHash = s.l2LogsRootHashes[_batchNumber]; /// @audit s on line 201 214: s.isEthWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex] = true; /// @audit s on line 214 200: ) external override nonReentrant senderCanCallFunction(s.allowList) { /// @audit s on line 278 281: require(s.totalDepositedAmountPerUser[_depositor] + _amount <= limitData.depositCap, "d2"); /// @audit s on line 281 282: s.totalDepositedAmountPerUser[_depositor] += _amount; /// @audit s on line 367 371: s.priorityQueue.pushBack( ``` *GitHub*: [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L143), [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L212), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L198), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L279), [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L280), [371](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L369) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit l2TokenBeacon on line 55 56: l2TokenBeacon.transferOwnership(_governor); ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L54) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit decimals_ on line 93 99: emit BridgeInitialize(_l1Address, decodedName, decodedSymbol, decimals_); ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L97) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit l2WethAddress on line 70 74: IL2StandardToken(l2WethAddress).bridgeBurn(msg.sender, _amount); /// @audit l2WethAddress on line 74 82: emit WithdrawalInitiated(msg.sender, _l1Receiver, l2WethAddress, _amount); /// @audit l2WethAddress on line 106 108: emit FinalizeDeposit(_l1Sender, _l2Receiver, l2WethAddress, _amount); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L72), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L80), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L106) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit numberOfLogsToProcess on line 114 115: numberOfLogsToProcess++; ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L113) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit currentVirtualL2BlockInfo on line 244 248: BlockInfo memory virtualBlockInfo = currentVirtualL2BlockInfo; /// @audit currentVirtualL2BlockInfo on line 248 250: if (currentVirtualL2BlockInfo.number == 0 && virtualBlockInfo.timestamp == 0) { /// @audit virtualBlockUpgradeInfo on line 241 258: virtualBlockUpgradeInfo.virtualBlockStartBatch = currentBatchNumber; /// @audit virtualBlockUpgradeInfo on line 258 276: virtualBlockUpgradeInfo.virtualBlockFinishL2Block = _l2BlockNumber; ``` *GitHub*: [248](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L246), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L248), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L256), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L274)
### [G‑23] Use local variables for emitting Use the function/modifier's local copy of the state variable, rather than incurring an extra Gwarmaccess (**100 gas**). In the unlikely event that the state variable hasn't already been used by the function/modifier, consider whether it is really necessary to include it in the event, given the fact that it incurs a Gcoldsload (**2100 gas**), or whether it can be passed in to or back out of the functions that _do_ use it *There are 7 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit minDelay 252: emit ChangeMinDelay(minDelay, _newDelay); /// @audit securityCouncil 259: emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); ``` *GitHub*: [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L250-L250), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L257-L257) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit s 364: emit BlocksVerification(s.totalBatchesVerified, currentTotalBatchesVerified); /// @audit s 406: emit BlocksRevert(s.totalBatchesCommitted, s.totalBatchesVerified, s.totalBatchesExecuted); ``` *GitHub*: [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L362-L362), [406](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L404-L404) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit decimals_ 99: emit BridgeInitialize(_l1Address, decodedName, decodedSymbol, decimals_); ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L97-L97) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit l2WethAddress 82: emit WithdrawalInitiated(msg.sender, _l1Receiver, l2WethAddress, _amount); /// @audit l2WethAddress 108: emit FinalizeDeposit(_l1Sender, _l2Receiver, l2WethAddress, _amount); ``` *GitHub*: [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L80-L80), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L106-L106) ### [G‑24] Storage re-read via storage pointer The instances below point to the second+ access of a state variable, via a storage pointer, within a function. Caching the value replaces each Gwarmaccess (**100 gas**) with a much cheaper stack read. *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol /// @audit diamondStorage.isFrozen above 125: require(diamondStorage.isFrozen, "a7"); // diamond proxy is not frozen ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L123-L123) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol /// @audit ds.facetToSelectors above 240: uint256 lastSelectorPosition = ds.facetToSelectors[_facet].selectors.length - 1; /// @audit ds.selectorToFacet above 247: ds.selectorToFacet[lastSelector].selectorPosition = selectorPosition.toUint16(); /// @audit ds.facets above 269: uint256 lastFacetPosition = ds.facets.length - 1; ``` *GitHub*: [240](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L238-L238), [247](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L245-L245), [269](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L267-L267) ### [G‑25] State variable read in a loop The state variable should be cached in and read from a local variable, or accumulated in a local variable then written to storage once outside of the loop, rather than reading/updating it on every iteration of the loop, which will replace each Gwarmaccess (**100 gas**) with a much cheaper stack read. *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit committedBatchTimestamp 88: committedBatchTimestamp.set(_newBatchesData[i].batchNumber, timestamp); /// @audit committedBatchTimestamp 119: uint256 commitBatchTimestamp = committedBatchTimestamp.get(_newBatchesData[i].batchNumber); ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L86-L86), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L117-L117) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit s 266: PriorityOperation memory priorityOp = s.priorityQueue.popFront(); ``` *GitHub*: [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L264-L264) ### [G‑26] Use the inputs/results of assignments rather than re-reading state variables When a state variable is assigned, it saves gas to use the value being assigned, later in the function, rather than re-reading the state variable itself. If needed, it can also be stored to a local variable, and be used in that way. Both options avoid a Gwarmaccess (**100 gas**). Note that if the operation is, say `+=`, the assignment also results in a value which can be used. The instances below point to the first reference after the assignment, since later references are already covered by issues describing the caching of state variable values. *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit use result of assignment of l2TokenProxyBytecodeHash, here 119: (address(this), l2TokenProxyBytecodeHash, _governor) ``` *GitHub*: [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L117-L117) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit use result of assignment of l2TokenBeacon, here 56: l2TokenBeacon.transferOwnership(_governor); ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L54-L54) ### [G‑27] Use assembly for small keccak256 hashes, in order to save gas If the arguments to the encode call can fit into the scratch space (two words or fewer), then it's more efficient to use assembly to generate the hash (**80 gas**): `keccak256(abi.encodePacked(x, y))` -> `assembly {mstore(0x00, a); mstore(0x20, b); let hash := keccak256(0x00, 0x40); }` *There are 20 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 356: bytes32 constructorInputHash = keccak256(abi.encode(address(l2TokenBeacon), "")); ``` *GitHub*: [356](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L354-L354) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 207: return keccak256(abi.encode(_operation)); ``` *GitHub*: [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L205-L205) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 79: s.storedBatchHashes[0] = keccak256(abi.encode(storedBatchZero)); ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L77-L77) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 267: concatHash = keccak256(abi.encode(concatHash, priorityOp.canonicalTxHash)); 461: return keccak256(abi.encode(_storedBatchInfo)); ``` *GitHub*: [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L265-L265), [461](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L459-L459) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 134: bytes32 constructorInputHash = keccak256(abi.encode(address(l2TokenBeacon), "")); ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L132-L132) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 112: chainedLogsHash = keccak256(abi.encode(chainedLogsHash, hashedLog)); 127: chainedMessagesHash = keccak256(abi.encode(chainedMessagesHash, hash)); 170: chainedL1BytecodesRevealDataHash = keccak256(abi.encode(chainedL1BytecodesRevealDataHash, _bytecodeHash)); 219: reconstructedChainedLogsHash = keccak256(abi.encode(reconstructedChainedLogsHash, hashedLog)); 232 l2ToL1LogsTreeArray[i] = keccak256( 233 abi.encode(l2ToL1LogsTreeArray[2 * i], l2ToL1LogsTreeArray[2 * i + 1]) 234: ); 250: reconstructedChainedMessagesHash = keccak256(abi.encode(reconstructedChainedMessagesHash, hashedMessage)); 266 reconstructedChainedL1BytecodesRevealDataHash = keccak256( 267 abi.encode( 268 reconstructedChainedL1BytecodesRevealDataHash, 269 Utils.hashL2Bytecode( 270 _totalL2ToL1PubdataAndStateDiffs[calldataPtr:calldataPtr + currentBytecodeLength] 271 ) 272 ) 273: ); ``` *GitHub*: [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L110-L110), [127](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L125-L125), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L168-L168), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L217-L217), [232](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L230-L232), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L248-L248), [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L264-L271) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 132: hash = keccak256(abi.encode(_block)); 207: return keccak256(abi.encodePacked(uint32(_blockNumber))); 376: currentL2BlockTxsRollingHash = keccak256(abi.encode(currentL2BlockTxsRollingHash, _txHash)); ``` *GitHub*: [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L130-L130), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L205-L205), [376](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L374-L374) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 121 bytes32 structHash = keccak256( 122 abi.encode( 123 EIP712_TRANSACTION_TYPE_HASH, 124 _transaction.txType, 125 _transaction.from, 126 _transaction.to, 127 _transaction.gasLimit, 128 _transaction.gasPerPubdataByteLimit, 129 _transaction.maxFeePerGas, 130 _transaction.maxPriorityFeePerGas, 131 _transaction.paymaster, 132 _transaction.nonce, 133 _transaction.value, 134 EfficientCall.keccak(_transaction.data), 135 keccak256(abi.encodePacked(_transaction.factoryDeps)), 136 EfficientCall.keccak(_transaction.paymasterInput) 137 ) 138: ); 135: keccak256(abi.encodePacked(_transaction.factoryDeps)), 141: abi.encode(EIP712_DOMAIN_TYPEHASH, keccak256("zkSync"), keccak256("2"), block.chainid) ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L119-L136), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L133-L133), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L139-L139), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L139-L139)
### [G‑28] `++i`/`i++` should be `unchecked{++i}`/`unchecked{i++}` when it is not possible for them to overflow, as is the case when used in `for`- and `while`-loops The `unchecked` keyword is new in solidity version 0.8.0, so this only applies to that version or higher, which these instances are. This saves **30-40 gas [per loop](https://gist.github.com/hrkrshnn/ee8fabd532058307229d65dcd5836ddc#the-increment-in-for-loop-post-condition-can-be-made-unchecked)** *There are 9 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 227: for (uint256 i = 0; i < _calls.length; ++i) { ``` *GitHub*: [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L225) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 206: for (uint256 i = 0; i < _factoryDeps.length; ++i) { ``` *GitHub*: [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L204) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 250: for (uint256 i = 0; i < deploymentsLength; ++i) { 255: for (uint256 i = 0; i < deploymentsLength; ++i) { ``` *GitHub*: [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L248), [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L253) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 213: for (uint256 i = 0; i < numberOfL2ToL1Logs; ++i) { 225: for (uint256 i = numberOfL2ToL1Logs; i < L2_TO_L1_LOGS_MERKLE_TREE_LEAVES; ++i) { 231: for (uint256 i = 0; i < nodesOnCurrentLevel; ++i) { 243: for (uint256 i = 0; i < numberOfMessages; ++i) { 261: for (uint256 i = 0; i < numberOfBytecodes; ++i) { ``` *GitHub*: [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L211), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L223), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L229), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L241), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L259) ### [G‑29] `internal` functions not called by the contract should be removed to save deployment gas If the functions are required by an interface, the contract should inherit from that interface and use the `override` keyword *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 410: function _maxU256(uint256 a, uint256 b) internal pure returns (uint256) { ``` *GitHub*: [410](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L408-L408) ### [G‑30] Avoid contract existence checks by using low-level calls Prior to 0.8.10 the compiler inserted extra code, including `EXTCODESIZE` (**100 gas**), to check for contract existence for external function calls. In more recent solidity versions, the compiler will not insert these checks if the external call has a return value. Similar behavior can be achieved in earlier versions by using low-level calls, since low-level calls never check for contract existence *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit call() 44: (bool success, ) = address(ETH_TOKEN_SYSTEM_CONTRACT).call( ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L42) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit allowance() 379: uint256 currentAllowance = IERC20(token).allowance(address(this), paymaster); ``` *GitHub*: [379](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L377) ### [G‑31] `keccak256()` should only need to be called on a specific string literal once It should be saved to an immutable variable, and the variable used instead. If the hash is being used as a part of a function selector, the cast to `bytes4` should also only be done once *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 14: bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2"); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 84: bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId)"); 87 keccak256( 88 "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 89: ); 141: abi.encode(EIP712_DOMAIN_TYPEHASH, keccak256("zkSync"), keccak256("2"), block.chainid) ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L82-L82), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L85-L87), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L139-L139), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L139-L139) ### [G‑32] Assigning state variables directly with named struct constructors wastes gas Using named arguments for struct means that the compiler needs to organize the fields in memory before doing the assignment, which wastes gas. Set each field directly in storage (use dot-notation), or use the unnamed version of the constructor. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 289: currentL2BlockInfo = BlockInfo({number: _l2BlockNumber, timestamp: _l2BlockTimestamp}); ``` *GitHub*: [289](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L287-L287) ### [G‑33] Initializers can be marked `payable` Payable functions cost less gas to execute, since the compiler does not have to add extra checks to ensure that a payment wasn't provided. An initializer can safely be marked as payable, since only the deployer would be able to pass funds, and the project itself would not pass any funds. *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 42 function initialize( 43 address _l1Bridge, 44 bytes32 _l2TokenProxyBytecodeHash, 45 address _governor 46: ) external initializer { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L40-L44) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 41: function initialize(string memory name_, string memory symbol_) external initializer { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L39-L39) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 47 function initialize( 48 address _l1Bridge, 49 address _l1WethAddress, 50 address _l2WethAddress 51: ) external initializer { ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L45-L49) ### [G‑34] Multiple accesses of a mapping/array should use a local variable cache The instances below point to the second+ access of a value inside a mapping/array, within a function. Caching a mapping's value in a local `storage` or `calldata` variable when the value is accessed [multiple times](https://gist.github.com/IllIllI000/ec23a57daa30a8f8ca8b9681c8ccefb0), saves **~42 gas per access** due to not having to recalculate the key's keccak256 hash (Gkeccak256 - **30 gas**) and that calculation's associated stack operations. Caching an array's struct avoids recalculating the array offsets into memory/calldata *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol /// @audit tokenDeposit[_l1Token] on line 132 133: tokenDeposit[_l1Token].depositCap = _depositCap; ``` *GitHub*: [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L131) ### [G‑35] Remove or replace unused state variables Saves a storage slot. If the variable is assigned a non-zero value, saves Gsset (**20000 gas**). If it's assigned a zero value, saves Gsreset (**2900 gas**). If the variable remains unassigned, there is no gas savings unless the variable is `public`, in which case the compiler-generated non-payable getter deployment cost is saved. If the state variable is overriding an interface's public function, mark the variable as `constant` or `immutable` so that it does not use a storage slot *There are 4 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 28: uint256 public chainId; 39: uint256 public blockGasLimit = type(uint32).max; 43: address public coinbase = BOOTLOADER_FORMAL_ADDRESS; 46: uint256 public difficulty = 2500000000000000; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L26), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L41), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L44) ### [G‑36] Same cast is done multiple times It's cheaper to do it once, and store the result to a variable. The examples below are the second+ instance of a given cast of the variable *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 271: ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getCodeHash(uint256(uint160(_newAddress))) == 0x0, ``` *GitHub*: [271](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L269-L269) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 74: uint256 shiftedVal = uint256(_len) << (lbs * 8); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L72-L72) ### [G‑37] Use assembly to emit events, in order to save gas Using the [scratch space](https://github.com/Vectorized/solady/blob/30558f5402f02351b96eeb6eaf32bcea29773841/src/tokens/ERC1155.sol#L501-L504) for event arguments (two words or fewer) will save gas over needing Solidity's full abi memory expansion used for emitting normally. *There are 39 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 314: emit EthReceived(msg.value); ``` *GitHub*: [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L312-L312) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 49: emit ChangeSecurityCouncil(address(0), _securityCouncil); 52: emit ChangeMinDelay(0, _minDelay); 146: emit ShadowOperationScheduled(_id, _delay); 159: emit OperationCancelled(_id); 182: emit OperationExecuted(id); 201: emit OperationExecuted(id); 252: emit ChangeMinDelay(minDelay, _newDelay); 259: emit ChangeSecurityCouncil(securityCouncil, _newSecurityCouncil); ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L47-L47), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L50-L50), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L144-L144), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L157-L157), [182](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L180-L180), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L199-L199), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L250-L250), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L257-L257) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 91: emit NewL2DefaultAccountBytecodeHash(previousDefaultAccountBytecodeHash, _l2DefaultAccountBytecodeHash); 108: emit NewL2BootloaderBytecodeHash(previousBootloaderBytecodeHash, _l2BootloaderBytecodeHash); 124: emit NewVerifier(address(oldVerifier), address(_newVerifier)); 140: emit NewVerifierParams(oldVerifierParams, _newVerifierParams); 231: emit NewProtocolVersion(previousProtocolVersion, _newProtocolVersion); 243: emit NewAllowList(address(oldAllowList), address(_newAllowList)); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L89-L89), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L106-L106), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L122-L122), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L138-L138), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L229-L229), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L241-L241) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 57: emit NewValidator(oldValidator, _newValidator); 63: emit NewExecutionDelay(_executionDelay); ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L55-L55), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L61-L61) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 27: emit NewPendingGovernor(oldPendingGovernor, _newPendingGovernor); 39: emit NewPendingGovernor(pendingGovernor, address(0)); 40: emit NewGovernor(previousGovernor, pendingGovernor); 51: emit NewPendingGovernor(oldPendingAdmin, _newPendingAdmin); 63: emit NewPendingAdmin(pendingAdmin, address(0)); 64: emit NewAdmin(previousAdmin, pendingAdmin); 72: emit ValidatorStatusUpdate(_validator, _active); 80: emit IsPorterAvailableStatusUpdate(_zkPorterIsAvailable); 90: emit NewPriorityTxMaxGasLimit(oldPriorityTxMaxGasLimit, _newPriorityTxMaxGasLimit); 102: emit ExecuteUpgrade(_diamondCut); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L25-L25), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L37-L37), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L38-L38), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L49-L49), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L61-L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L62-L62), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L70-L70), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L78-L78), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L88-L88), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L100-L100) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 364: emit BlocksVerification(s.totalBatchesVerified, currentTotalBatchesVerified); ``` *GitHub*: [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L362-L362) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 217: emit EthWithdrawalFinalized(_l1WithdrawReceiver, _amount); ``` *GitHub*: [217](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L215-L215) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 113: emit BridgeMint(_to, _amount); 122: emit BridgeBurn(_from, _amount); ``` *GitHub*: [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L111-L111), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 86: emit BridgeBurn(_from, _amount); ``` *GitHub*: [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L84-L84) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 123: emit EthReceived(msg.value); ``` *GitHub*: [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L121-L121) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 67: emit AccountVersionUpdated(msg.sender, _version); 85: emit AccountNonceOrderingUpdated(msg.sender, _nonceOrdering); ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L65-L65), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L83-L83) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 62: emit MarkedAsKnown(_bytecodeHash, _shouldSendToL1); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L60-L60) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 117: emit L2ToL1LogSent(_l2ToL1Log); 188: emit BytecodeL1PublicationRequested(_bytecodeHash); ``` *GitHub*: [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L115-L115), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L186-L186) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 69: emit Mint(_account, _amount); ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L67-L67)
### [G‑38] Add `unchecked {}` for subtractions where the operands cannot underflow because of a previous `require()` or `if`-statement `require(a <= b); x = b - a` => `require(a <= b); unchecked { x = b - a }` *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol /// @audit check on line 119 122: txBodyGasLimit = _totalGasLimit - overhead; ``` *GitHub*: [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L120) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit check on line 43 45: balance[_from] = fromBalance - _amount; ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L43) ### [G‑39] Optimize names to save gas `public`/`external` function names and `public` member variable names can be optimized to save gas. See [this](https://gist.github.com/IllIllI000/a5d8b486a8259f9f77891a919febd1a9) link for an example of how it works. Below are the interfaces/abstract contracts that can be optimized so that the most frequently-called functions use the least amount of gas possible during method lookup. Method IDs that have two leading zero bytes can save **128 gas** each during deployment, and renaming functions to have lower method IDs will save **22 gas** per call, [per sorted position shifted](https://medium.com/joyso/solidity-how-does-function-name-affect-gas-consumption-in-smart-contract-47d270d8ac92) *There are 44 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol /// @audit initialize(), deposit(), deposit(), claimFailedDeposit(), finalizeWithdrawal(), l2TokenAddress() 30: contract L1ERC20Bridge is IL1Bridge, IL1BridgeLegacy, AllowListed, ReentrancyGuard { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit initialize(), deposit(), claimFailedDeposit(), finalizeWithdrawal() 39: contract L1WethBridge is IL1Bridge, AllowListed, ReentrancyGuard { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L37) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol /// @audit isWithdrawalFinalized(), deposit(), claimFailedDeposit(), finalizeWithdrawal(), l2TokenAddress(), l2Bridge() 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol /// @audit finalizeDeposit(), withdraw(), l1TokenAddress(), l2TokenAddress(), l1Bridge() 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L6) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol /// @audit canCall(), setAccessMode(), setBatchAccessMode(), setBatchPermissionToCall(), setPermissionToCall(), setDepositLimit(), getTokenDepositLimitData() 20: contract AllowList is IAllowList, Ownable2Step { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L18) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol /// @audit getAccessMode(), hasSpecialAccessToCall(), canCall(), getTokenDepositLimitData(), setBatchAccessMode(), setAccessMode(), setBatchPermissionToCall(), setPermissionToCall(), setDepositLimit() 7: interface IAllowList { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol /// @audit forceDeployOnAddresses(), create2() 11: interface IL2ContractDeployer { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L9) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit isOperation(), isOperationPending(), isOperationReady(), isOperationDone(), getOperationState(), scheduleTransparent(), scheduleShadow(), cancel(), execute(), executeInstant(), hashOperation(), updateDelay(), updateSecurityCouncil() 22: contract Governance is IGovernance, Ownable2Step { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L20) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol /// @audit isOperation(), isOperationPending(), isOperationReady(), isOperationDone(), getOperationState(), scheduleTransparent(), scheduleShadow(), cancel(), execute(), executeInstant(), hashOperation(), updateDelay(), updateSecurityCouncil() 7: interface IGovernance { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit setValidator(), setExecutionDelay(), getCommittedBatchTimestamp(), commitBatches(), revertBatches(), proveBatches(), executeBatches() 22: contract ValidatorTimelock is IExecutor, Ownable2Step { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L20) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol /// @audit setPendingGovernor(), acceptGovernor(), setPendingAdmin(), acceptAdmin(), setValidator(), setPorterAvailability(), setPriorityTxMaxGasLimit(), executeUpgrade(), freezeDiamond(), unfreezeDiamond() 16: contract AdminFacet is Base, IAdmin { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit executeBatches(), proveBatches(), revertBatches() 20: contract ExecutorFacet is Base, IExecutor { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L18) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol /// @audit getVerifier(), getGovernor(), getPendingGovernor(), getTotalBatchesCommitted(), getTotalBatchesVerified(), getTotalBatchesExecuted(), getTotalPriorityTxs(), getFirstUnprocessedPriorityTx(), getPriorityQueueSize(), priorityQueueFrontOperation(), isValidator(), l2LogsRootHash(), storedBatchHash(), getL2BootloaderBytecodeHash(), getL2DefaultAccountBytecodeHash(), getVerifierParams(), getProtocolVersion(), getL2SystemContractsUpgradeTxHash(), getL2SystemContractsUpgradeBatchNumber(), isDiamondStorageFrozen(), isFacetFreezable(), getPriorityTxMaxGasLimit(), getAllowList(), isFunctionFreezable(), isEthWithdrawalFinalized(), facets(), facetFunctionSelectors(), facetAddresses(), facetAddress(), getTotalBlocksCommitted(), getTotalBlocksVerified(), getTotalBlocksExecuted(), storedBlockHash(), getL2SystemContractsUpgradeBlockNumber() 17: contract GettersFacet is Base, IGetters, ILegacyGetters { ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit proveL2MessageInclusion(), proveL2LogInclusion(), l2TransactionBaseCost(), requestL2Transaction() 39: contract MailboxFacet is Base, IMailbox { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol /// @audit setPendingGovernor(), acceptGovernor(), setPendingAdmin(), acceptAdmin(), setValidator(), setPorterAvailability(), setPriorityTxMaxGasLimit(), executeUpgrade(), freezeDiamond(), unfreezeDiamond() 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol /// @audit commitBatches(), proveBatches(), executeBatches(), revertBatches() 30: interface IExecutor is IBase { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L28) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol /// @audit getVerifier(), getGovernor(), getPendingGovernor(), getTotalBatchesCommitted(), getTotalBatchesVerified(), getTotalBatchesExecuted(), getTotalPriorityTxs(), getFirstUnprocessedPriorityTx(), getPriorityQueueSize(), priorityQueueFrontOperation(), isValidator(), l2LogsRootHash(), storedBatchHash(), getL2BootloaderBytecodeHash(), getL2DefaultAccountBytecodeHash(), getVerifierParams(), isDiamondStorageFrozen(), getProtocolVersion(), getL2SystemContractsUpgradeTxHash(), getL2SystemContractsUpgradeBatchNumber(), getPriorityTxMaxGasLimit(), getAllowList(), isEthWithdrawalFinalized(), facets(), facetFunctionSelectors(), facetAddresses(), facetAddress(), isFunctionFreezable(), isFacetFreezable() 11: interface IGetters is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol /// @audit getTotalBlocksCommitted(), getTotalBlocksVerified(), getTotalBlocksExecuted(), storedBlockHash(), getL2SystemContractsUpgradeBlockNumber() 13: interface ILegacyGetters is IBase { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L11) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol /// @audit proveL2MessageInclusion(), proveL2LogInclusion(), proveL1ToL2TransactionStatus(), finalizeEthWithdrawal(), requestL2Transaction(), l2TransactionBaseCost() 18: interface IMailbox is IBase { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit bridgeInitialize(), decodeString(), decodeUint8() 13: contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol /// @audit finalizeDeposit(), withdraw(), l1TokenAddress(), l2TokenAddress(), l1Bridge() 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol /// @audit bridgeMint(), bridgeBurn(), l1Address(), l2Bridge() 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol /// @audit depositTo(), withdrawTo() 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol /// @audit publishCompressedBytecode(), verifyCompressedStateDiffs() 36: contract Compressor is ICompressor, ISystemContract { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L34) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit getAccountInfo(), extendedAccountVersion(), updateAccountVersion(), updateNonceOrdering(), forceDeployOnAddress(), forceDeployOnAddresses() 25: contract ContractDeployer is IContractDeployer, ISystemContract { ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L23) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit payForTransaction(), prepareForPaymaster() 21: contract DefaultAccount is IAccount { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L19) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit markFactoryDeps(), markBytecodeAsPublished() 21: contract KnownCodesStorage is IKnownCodesStorage, ISystemContract { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L19) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit sendL2ToL1Log(), publishPubdataAndClearState() 35: contract L1Messenger is IL1Messenger, ISystemContract { ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L33) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit getMinNonce(), getRawNonce(), increaseMinNonce(), setValueUnderNonce(), getValueUnderNonce(), incrementMinNonceIfEquals(), getDeploymentNonce(), incrementDeploymentNonce(), isNonceUsed(), validateNonceUsage() 29: contract NonceHolder is INonceHolder, ISystemContract { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L27) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit setTxOrigin(), setGasPrice(), getBlockHashEVM(), getBatchHash(), getBatchNumberAndTimestamp(), getL2BlockNumberAndTimestamp(), getBlockNumber(), getBlockTimestamp(), setL2Block(), appendTransactionToCurrentL2Block(), publishTimestampDataToL1(), setNewBatch(), unsafeOverrideBatch(), incrementTxNumberInBatch(), resetTxNumberInBatch(), currentBlockInfo(), getBlockNumberAndTimestamp(), blockHash() 19: contract SystemContext is ISystemContext, ISystemContextDeprecated, ISystemContract { ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L17) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol /// @audit validateTransaction(), executeTransaction(), executeTransactionFromOutside(), payForTransaction(), prepareForPaymaster() 11: interface IAccount { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol /// @audit storeAccountConstructingCodeHash(), storeAccountConstructedCodeHash(), markAccountCodeHashAsConstructed(), getRawCodeHash(), getCodeHash(), getCodeSize() 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol /// @audit publishCompressedBytecode(), verifyCompressedStateDiffs() 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol /// @audit getNewAddressCreate2(), getNewAddressCreate(), create2(), create2Account(), create(), createAccount(), getAccountInfo(), updateAccountVersion(), updateNonceOrdering() 7: interface IContractDeployer { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol /// @audit balanceOf(), transferFromTo(), withdraw(), withdrawWithMessage() 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol /// @audit getImmutable(), setImmutables() 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol /// @audit markFactoryDeps(), markBytecodeAsPublished(), getMarker() 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol /// @audit sendToL1(), sendL2ToL1Log(), requestBytecodeL1Publication() 37: interface IL1Messenger { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol /// @audit bridgeMint(), bridgeBurn(), l1Address(), l2Bridge() 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol /// @audit getMinNonce(), getRawNonce(), increaseMinNonce(), setValueUnderNonce(), getValueUnderNonce(), incrementMinNonceIfEquals(), getDeploymentNonce(), incrementDeploymentNonce(), validateNonceUsage(), isNonceUsed() 15: interface INonceHolder { ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol /// @audit validateAndPayForPaymasterTransaction(), postTransaction() 16: interface IPaymaster { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol /// @audit general(), approvalBased() 14: interface IPaymasterFlow { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol /// @audit chainId(), origin(), gasPrice(), blockGasLimit(), coinbase(), difficulty(), baseFee(), txNumberInBlock(), getBlockHashEVM(), getBatchHash(), getBlockNumber(), getBlockTimestamp(), getBatchNumberAndTimestamp(), getL2BlockNumberAndTimestamp() 12: interface ISystemContext { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol /// @audit currentBlockInfo(), getBlockNumberAndTimestamp(), blockHash() 11: interface ISystemContextDeprecated { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L9)
### [G‑40] Usage of `uints`/`ints` smaller than 32 bytes (256 bits) incurs overhead > When using elements that are smaller than 32 bytes, your contract’s gas usage may be higher. This is because the EVM operates on 32 bytes at a time. Therefore, if the element is smaller than that, the EVM must use more operations in order to reduce the size of the element from 32 bytes to the desired size. https://docs.soliditylang.org/en/v0.8.11/internals/layout_in_storage.html Each operation involving a `uint8` costs an extra [**22-28 gas**](https://gist.github.com/IllIllI000/9388d20c70f9a4632eb3ca7836f54977) (depending on whether the other operand is also a variable of type `uint8`) as compared to ones involving `uint256`, due to the compiler having to clear the higher bits of the memory word before operating on the `uint8`, as well as the associated stack operations of doing so. Use a larger size then downcast where needed *There are 14 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol /// @audit uint32 result 30: result = uint32(mapValue >> bitOffset); ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L28) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit uint128 batchNumber 147: batchNumber = batchInfo.number; /// @audit uint128 batchTimestamp 148: batchTimestamp = batchInfo.timestamp; /// @audit uint128 blockNumber 155: blockNumber = blockInfo.number; /// @audit uint128 blockTimestamp 156: blockTimestamp = blockInfo.timestamp; /// @audit uint128 _maxVirtualBlocksToCreate 261: _maxVirtualBlocksToCreate -= 1; /// @audit uint16 txNumberInBlock 457: txNumberInBlock += 1; /// @audit uint16 txNumberInBlock 461: txNumberInBlock = 0; ``` *GitHub*: [147](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L145), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L146), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L153), [156](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L154), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L259), [457](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L455), [461](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L459) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit uint32 gasPerPubdataByte 249: gasPerPubdataByte = uint32(extractNumberFromMeta(meta, META_GAS_PER_PUBDATA_BYTE_OFFSET, 32)); /// @audit uint32 heapSize 259: heapSize = uint32(extractNumberFromMeta(meta, META_HEAP_SIZE_OFFSET, 32)); /// @audit uint32 auxHeapSize 268: auxHeapSize = uint32(extractNumberFromMeta(meta, META_AUX_HEAP_SIZE_OFFSET, 32)); /// @audit uint8 shardId 276: shardId = uint8(extractNumberFromMeta(meta, META_SHARD_ID_OFFSET, 8)); /// @audit uint8 callerShardId 285: callerShardId = uint8(extractNumberFromMeta(meta, META_CALLER_SHARD_ID_OFFSET, 8)); /// @audit uint8 codeShardId 294: codeShardId = uint8(extractNumberFromMeta(meta, META_CODE_SHARD_ID_OFFSET, 8)); ``` *GitHub*: [249](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L247), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L257), [268](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L266), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L274), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L283), [294](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L292) ### [G‑41] Functions guaranteed to revert when called by normal users can be marked `payable` If a function modifier such as `onlyOwner` is used, the function will revert if a normal user tries to pay the function. Marking the function as `payable` will lower the gas cost for legitimate callers because the compiler will not include checks for whether a payment was provided. The extra opcodes avoided are `CALLVALUE`(2),`DUP1`(3),`ISZERO`(3),`PUSH2`(3),`JUMPI`(10),`PUSH1`(3),`DUP1`(3),`REVERT`(0),`JUMPDEST`(1),`POP`(2), which costs an average of about **21 gas per call** to the function, in addition to the extra deployment cost *There are 58 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 51: function setAccessMode(address _target, AccessMode _accessMode) external onlyOwner { 60: function setBatchAccessMode(address[] calldata _targets, AccessMode[] calldata _accessModes) external onlyOwner { 85 function setBatchPermissionToCall( 86 address[] calldata _callers, 87 address[] calldata _targets, 88 bytes4[] calldata _functionSigs, 89 bool[] calldata _enables 90: ) external onlyOwner { 108 function setPermissionToCall( 109 address _caller, 110 address _target, 111 bytes4 _functionSig, 112 bool _enable 113: ) external onlyOwner { 131: function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L49), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L58), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L83-L88), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L106-L111), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 131: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external onlyOwner { 144: function scheduleShadow(bytes32 _id, uint256 _delay) external onlyOwner { 156: function cancel(bytes32 _id) external onlyOwnerOrSecurityCouncil { 169: function execute(Operation calldata _operation) external onlyOwnerOrSecurityCouncil { 188: function executeInstant(Operation calldata _operation) external onlySecurityCouncil { 251: function updateDelay(uint256 _newDelay) external onlySelf { 258: function updateSecurityCouncil(address _newSecurityCouncil) external onlySelf { ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L129), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L142), [156](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L154), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L167), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L186), [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L249), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L256) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 54: function setValidator(address _newValidator) external onlyOwner { 61: function setExecutionDelay(uint32 _executionDelay) external onlyOwner { 79 function commitBatches( 80 StoredBatchInfo calldata, 81 CommitBatchInfo[] calldata _newBatchesData 82: ) external onlyValidator { 98: function revertBatches(uint256) external onlyValidator { 105 function proveBatches( 106 StoredBatchInfo calldata, 107 StoredBatchInfo[] calldata, 108 ProofInput calldata 109: ) external onlyValidator { 115: function executeBatches(StoredBatchInfo[] calldata _newBatchesData) external onlyValidator { ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L52), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L59), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L77-L80), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L96), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L103-L107), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L113) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 22: function setPendingGovernor(address _newPendingGovernor) external onlyGovernor { 46: function setPendingAdmin(address _newPendingAdmin) external onlyGovernorOrAdmin { 70: function setValidator(address _validator, bool _active) external onlyGovernorOrAdmin { 77: function setPorterAvailability(bool _zkPorterIsAvailable) external onlyGovernor { 85: function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external onlyGovernor { 100: function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external onlyGovernor { 111: function freezeDiamond() external onlyGovernor { 122: function unfreezeDiamond() external onlyGovernorOrAdmin { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L20), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L44), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L68), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L75), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L83), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L98), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L109), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L120) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 179 function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 180 external 181 override 182 nonReentrant 183: onlyValidator 293: function executeBatches(StoredBatchInfo[] calldata _batchesData) external nonReentrant onlyValidator { 313 function proveBatches( 314 StoredBatchInfo calldata _prevBatch, 315 StoredBatchInfo[] calldata _committedBatches, 316 ProofInput calldata _proof 317: ) external nonReentrant onlyValidator { 391: function revertBatches(uint256 _newLastBatch) external nonReentrant onlyValidator { ``` *GitHub*: [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L177-L181), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L291), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L311-L315), [391](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L389) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 111: function bridgeMint(address _to, uint256 _amount) external override onlyBridge { 120: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { ``` *GitHub*: [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L109), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L118) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 80: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L78) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 37: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 48: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 56: function markAccountCodeHashAsConstructed(address _address) external override onlyDeployer { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L35), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L46), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L54) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 64: function updateAccountVersion(AccountAbstractionVersion _version) external onlySystemCall { 73: function updateNonceOrdering(AccountNonceOrdering _nonceOrdering) external onlySystemCall { ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L62), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L71) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 30: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external onlyCallFromBootloader { 42: function markBytecodeAsPublished(bytes32 _bytecodeHash) external onlyCompressor { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L28), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L40) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 77 function sendL2ToL1Log( 78 bool _isService, 79 bytes32 _key, 80 bytes32 _value 81: ) external onlyCallFromSystemContract returns (uint256 logIdInMerkleTree) { 167 function requestBytecodeL1Publication( 168 bytes32 _bytecodeHash 169: ) external override onlyCallFrom(address(KNOWN_CODE_STORAGE_CONTRACT)) { 201 function publishPubdataAndClearState( 202 bytes calldata _totalL2ToL1PubdataAndStateDiffs 203: ) external onlyCallFromBootloader { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L75-L79), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L165-L167), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L199-L201) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 66: function mint(address _account, uint256 _amount) external override onlyCallFromBootloader { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L64) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 37: fallback(bytes calldata _data) external onlySystemCall returns (bytes memory) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 67: function increaseMinNonce(uint256 _value) public onlySystemCall returns (uint256 oldMinNonce) { 84: function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 112: function incrementMinNonceIfEquals(uint256 _expectedNonce) external onlySystemCall { 137: function incrementDeploymentNonce(address _address) external onlySystemCall returns (uint256 prevDeploymentNonce) { ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L65), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L110), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L135) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89: function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 95: function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 314 function setL2Block( 315 uint128 _l2BlockNumber, 316 uint128 _l2BlockTimestamp, 317 bytes32 _expectedPrevL2BlockHash, 318 bool _isFirstInBatch, 319 uint128 _maxVirtualBlocksToCreate 320: ) external onlyCallFromBootloader { 375: function appendTransactionToCurrentL2Block(bytes32 _txHash) external onlyCallFromBootloader { 381: function publishTimestampDataToL1() external onlyCallFromBootloader { 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423: ) external onlyCallFromBootloader { 445 function unsafeOverrideBatch( 446 uint256 _newTimestamp, 447 uint256 _number, 448 uint256 _baseFee 449: ) external onlyCallFromBootloader { 456: function incrementTxNumberInBatch() external onlyCallFromBootloader { 460: function resetTxNumberInBatch() external onlyCallFromBootloader { ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L312-L318), [375](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L373), [381](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L379), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L421), [445](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L443-L447), [456](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L454), [460](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L458)
### [G‑42] Constructors can be marked `payable` Payable functions cost less gas to execute, since the compiler does not have to add extra checks to ensure that a payment wasn't provided. A constructor can safely be marked as payable, since only the deployer would be able to pass funds, and the project itself would not pass any funds. *There are 11 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 67: constructor(IZkSync _zkSync, IAllowList _allowList) reentrancyGuardInitializer { ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L65) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 66: constructor(address payable _l1WethAddress, IZkSync _zkSync, IAllowList _allowList) reentrancyGuardInitializer { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L64) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 33: constructor(address _initialOwner) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L31) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 43: constructor(address _admin, address _securityCouncil, uint256 _minDelay) { ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L41) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 52: constructor() reentrancyGuardInitializer {} ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L50) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 13: constructor(uint256 _chainId, Diamond.DiamondCutData memory _diamondCut) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L11) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 46: constructor(address _initialOwner, address _zkSyncContract, uint32 _executionDelay, address _validator) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L44) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 38 constructor() { 39: _disableInitializers(); ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L36-L37) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 38 constructor() { 39 // Disable initialization to prevent Parity hack. 40: _disableInitializers(); ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L36-L38) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 31 constructor() { 32 // Disable initialization to prevent Parity hack. 33: _disableInitializers(); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L29-L31) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 38 constructor() { 39: _disableInitializers(); ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L36-L37)
### [G‑43] `internal`/`private` functions only called once can be inlined to save gas Not inlining costs **20 to 40 gas** because of two extra `JUMP` instructions and additional stack operations needed for function calls. *There are 60 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 218: function _depositFunds(address _from, IERC20 _token, uint256 _amount) internal returns (uint256) { 227 function _getDepositL2Calldata( 228 address _l1Sender, 229 address _l2Receiver, 230 address _l1Token, 231 uint256 _amount 232: ) internal view returns (bytes memory txCalldata) { 242: function _getERC20Getters(address _token) internal view returns (bytes memory data) { 325 function _parseL2WithdrawalMessage( 326 bytes memory _l2ToL1message 327: ) internal pure returns (address l1Receiver, address l1Token, uint256 amount) { ``` *GitHub*: [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L216-L216), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L225-L230), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L240-L240), [325](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L323-L325) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 201 function _getDepositL2Calldata( 202 address _l1Sender, 203 address _l2Receiver, 204 address _l1Token, 205 uint256 _amount 206: ) internal pure returns (bytes memory txCalldata) { 274 function _parseL2EthWithdrawalMessage( 275 bytes memory _message 276: ) internal view returns (address l1WethReceiver, uint256 ethAmount) { ``` *GitHub*: [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L199-L204), [274](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L272-L274) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 48: function _initializeReentrancyGuard() private { ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L46-L46) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 79: function _setL2DefaultAccountBytecodeHash(bytes32 _l2DefaultAccountBytecodeHash) private { 96: function _setL2BootloaderBytecodeHash(bytes32 _l2BootloaderBytecodeHash) private { 113: function _setVerifier(IVerifier _newVerifier) private { 129: function _setVerifierParams(VerifierParams calldata _newVerifierParams) private { 146: function _upgradeVerifier(address _newVerifier, VerifierParams calldata _verifierParams) internal { 154: function _setBaseSystemContracts(bytes32 _bootloaderHash, bytes32 _defaultAccountHash) internal { 163 function _setL2SystemContractUpgrade( 164 IMailbox.L2CanonicalTransaction calldata _l2ProtocolUpgradeTx, 165 bytes[] calldata _factoryDeps, 166 uint256 _newProtocolVersion 167: ) internal returns (bytes32) { 202: function _verifyFactoryDeps(bytes[] calldata _factoryDeps, uint256[] calldata _expectedHashes) private pure { 216: function _setNewProtocolVersion(uint256 _newProtocolVersion) internal { 236: function _setAllowList(IAllowList _newAllowList) internal { ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L77-L77), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L94-L94), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L111-L111), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L127-L127), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L144-L144), [154](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L152-L152), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L161-L165), [202](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L200-L200), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L214-L214), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L234-L234) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 76 function _verifyBatchTimestamp( 77 uint256 _packedBatchAndL2BlockTimestamp, 78 uint256 _expectedBatchTimestamp, 79 uint256 _previousBatchTimestamp 80: ) internal view { 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109 bytes32 previousBatchHash, 110 bytes32 stateDiffHash, 111 bytes32 l2LogsTreeRoot, 112 uint256 packedBatchAndL2BlockTimestamp 113 ) 114: { 207 function _commitBatchesWithoutSystemContractsUpgrade( 208 StoredBatchInfo memory _lastCommittedBatchData, 209 CommitBatchInfo[] calldata _newBatchesData 210: ) internal { 227 function _commitBatchesWithSystemContractsUpgrade( 228 StoredBatchInfo memory _lastCommittedBatchData, 229 CommitBatchInfo[] calldata _newBatchesData, 230 bytes32 _systemContractUpgradeTxHash 231: ) internal { 262: function _collectOperationsFromPriorityQueue(uint256 _nPriorityOps) internal returns (bytes32 concatHash) { 275: function _executeOneBatch(StoredBatchInfo memory _storedBatch, uint256 _executedBatchIdx) internal { 369 function _getBatchProofPublicInput( 370 bytes32 _prevBatchCommitment, 371 bytes32 _currentBatchCommitment, 372 VerifierParams memory _verifierParams 373: ) internal pure returns (uint256) { 415 function _createBatchCommitment(CommitBatchInfo calldata _newBatchData, bytes32 _stateDiffHash) 416 internal 417 view 418 returns (bytes32) 419: { 427: function _batchPassThroughData(CommitBatchInfo calldata _batch) internal pure returns (bytes memory) { 437: function _batchMetaParameters() internal view returns (bytes memory) { 441 function _batchAuxiliaryOutput(CommitBatchInfo calldata _batch, bytes32 _stateDiffHash) 442 internal 443 pure 444 returns (bytes memory) 445: { 465: function _checkBit(uint256 _bitMap, uint8 _index) internal pure returns (bool) { 470: function _setBit(uint256 _bitMap, uint8 _index) internal pure returns (uint256) { ``` *GitHub*: [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L74-L78), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L101-L112), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L205-L208), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L225-L229), [262](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L260-L260), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L273-L273), [369](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L367-L371), [415](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L413-L417), [427](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L425-L425), [437](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L435-L435), [441](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L439-L443), [465](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L463-L463), [470](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L468-L468) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 115: function _withdrawFunds(address _to, uint256 _amount) internal { 151: function _L2MessageToLog(L2Message memory _message) internal pure returns (L2Log memory) { 277: function _verifyDepositLimit(address _depositor, uint256 _amount) internal { 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291 uint256 _l2GasPerPubdataByteLimit, 292 bytes[] calldata _factoryDeps, 293 bool _isFree, 294 address _refundRecipient 295: ) internal returns (bytes32 canonicalTxHash) { 331 function _serializeL2Transaction( 332 WritePriorityOpParams memory _priorityOpParams, 333 bytes calldata _calldata, 334 bytes[] calldata _factoryDeps 335: ) internal pure returns (L2CanonicalTransaction memory transaction) { 358 function _writePriorityOp( 359 WritePriorityOpParams memory _priorityOpParams, 360 bytes calldata _calldata, 361 bytes[] calldata _factoryDeps 362: ) internal returns (bytes32 canonicalTxHash) { 390 function _hashFactoryDeps(bytes[] calldata _factoryDeps) 391 internal 392 pure 393 returns (uint256[] memory hashedFactoryDeps) 394: { 408 function _parseL2WithdrawalMessage(bytes memory _message) 409 internal 410 pure 411 returns (address l1Receiver, uint256 amount) 412: { ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L113-L113), [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L149-L149), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L275-L275), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L293), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L329-L333), [358](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L356-L360), [390](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L388-L392), [408](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L406-L410) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 93: function _deployL2Token(address _l1Token, bytes calldata _data) internal returns (address) { 124 function _getL1WithdrawMessage( 125 address _to, 126 address _l1Token, 127 uint256 _amount 128: ) internal pure returns (bytes memory) { 149: function _deployBeaconProxy(bytes32 salt) internal returns (BeaconProxy proxy) { ``` *GitHub*: [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L91-L91), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L122-L126), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 46: function encodeLegacyTransactionHash(Transaction calldata _transaction) internal view returns (bytes32 txHash) { 141: function encodeEIP2930TransactionHash(Transaction calldata _transaction) internal view returns (bytes32) { 231: function encodeEIP1559TransactionHash(Transaction calldata _transaction) internal view returns (bytes32) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L44-L44), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L139-L139), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L229-L229) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 204 function _decodeRawBytecode( 205 bytes calldata _rawCompressedData 206: ) internal pure returns (bytes calldata dictionary, bytes calldata encodedData) { ``` *GitHub*: [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L202-L204) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 285 function _performDeployOnAddress( 286 bytes32 _bytecodeHash, 287 address _newAddress, 288 AccountAbstractionVersion _aaVersion, 289 bytes calldata _input 290: ) internal { 312: function _storeConstructingByteCodeHashOnAddress(address _newAddress, bytes32 _bytecodeHash) internal { ``` *GitHub*: [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L283-L288), [312](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L310-L310) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 80 function _validateTransaction( 81 bytes32 _suggestedSignedHash, 82 Transaction calldata _transaction 83: ) internal returns (bytes4 magic) { 135: function _execute(Transaction calldata _transaction) internal { 163: function _isValidSignature(bytes32 _hash, bytes memory _signature) internal view returns (bool) { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L78-L81), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L133-L133), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L161-L161) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 77: function _validateBytecode(bytes32 _bytecodeHash) internal pure { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L75-L75) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 71: function sha256GasCost(uint256 _length) internal pure returns (uint256) { ``` *GitHub*: [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L69-L69) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 114: function _getL1WithdrawMessage(address _to, uint256 _amount) internal pure returns (bytes memory) { 119 function _getExtendedWithdrawMessage( 120 address _to, 121 uint256 _amount, 122 address _sender, 123 bytes memory _additionalData 124: ) internal pure returns (bytes memory) { ``` *GitHub*: [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L112-L112), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L117-L122) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 27: function _getAbiParams() internal view returns (uint256 value, bool isSystemCall, address to) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L25-L25) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 194 function _calculateL2BlockHash( 195 uint128 _blockNumber, 196 uint128 _blockTimestamp, 197 bytes32 _prevL2BlockHash, 198 bytes32 _blockTxsRollingHash 199: ) internal pure returns (bytes32) { 206: function _calculateLegacyL2BlockHash(uint128 _blockNumber) internal pure returns (bytes32) { 214: function _upgradeL2Blocks(uint128 _l2BlockNumber, bytes32 _expectedPrevL2BlockHash, bool _isFirstInBatch) internal { 236 function _setVirtualBlock( 237 uint128 _l2BlockNumber, 238 uint128 _maxVirtualBlocksToCreate, 239 uint128 _newTimestamp 240: ) internal { 401: function _ensureBatchConsistentWithL2Block(uint128 _newTimestamp) internal view { ``` *GitHub*: [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L192-L197), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L204-L204), [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L212-L212), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L234-L238), [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L399-L399)
### [G‑44] `unchecked {}` can be used on the division of two `uint`s in order to save gas The division cannot overflow, since both the numerator and the denominator are non-negative *There are 7 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 90: uint256 constant BATCH_OVERHEAD_PUBDATA = BATCH_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE; ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L88-L88) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 183: uint256 minL2GasPriceETH = (pubdataPriceETH + _gasPricePerPubdata - 1) / _gasPricePerPubdata; ``` *GitHub*: [183](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L181-L181) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 34: require(l2GasForTxBody / _transaction.gasPerPubdataByteLimit <= PRIORITY_TX_MAX_PUBDATA, "uk"); 167: overheadForGas = (numerator - 1) / denominator; ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L32-L32), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L165-L165) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 61: return KECCAK_ROUND_GAS_COST * (_length / KECCAK_ROUND_NUMBER_OF_BYTES + 1); 72: return SHA256_ROUND_GAS_COST * ((_length + 8) / SHA256_ROUND_NUMBER_OF_BYTES + 1); ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L59-L59), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L70-L70) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 175: deploymentNonce = _rawMinNonce / DEPLOY_NONCE_MULTIPLIER; ``` *GitHub*: [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L173-L173) ### [G‑45] Division by powers of two should use bit shifting ` / 2` is the same as ` >> 1`. While the compiler uses the `SHR` opcode to accomplish both, the version that uses division incurs an overhead of [**20 gas**](https://gist.github.com/IllIllI000/ec0e4e6c4f52a6bca158f137a3afd4ff) due to `JUMP`s to and from a compiler utility function that introduces checks which can be avoided by using `unchecked {}` around the division by two. *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 27: uint256 bytecodeLenInWords = _bytecode.length / 32; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 23: uint256 mapValue = _map.map[_index / 8]; 47: uint256 mapIndex = _index / 8; ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L21-L21), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L45-L45) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 88: uint256 bytecodeLenInWords = _bytecode.length / 32; ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L86-L86) ### [G‑46] ` += ` costs more gas than ` = + ` for basic-typed state variables Using the addition operator instead of plus-equals saves **[10 gas](https://gist.github.com/IllIllI000/cbbfb267425b898e5be734d4008d4fe8)** because of extra `PUSH`es and `POP`s associated with the manipulation of the state variable when using `+=` for basic-typed state variables *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 67: totalSupply += _amount; 109: totalSupply -= amount; ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L65-L65), [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L107-L107) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 457: txNumberInBlock += 1; ``` *GitHub*: [457](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L455-L455) ### [G‑47] Simple checks for zero can be done using assembly to save gas *There are 14 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 197: if (_refundRecipient == address(0)) { ``` *GitHub*: [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L195-L195) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 184: if (_refundRecipient == address(0)) { ``` *GitHub*: [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L182-L182) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 80: if (_l2DefaultAccountBytecodeHash == bytes32(0)) { 97: if (_l2BootloaderBytecodeHash == bytes32(0)) { 118: if (_newVerifier == IVerifier(address(0))) { 169: if (_l2ProtocolUpgradeTx.txType == 0) { 237: if (_newAllowList == IAllowList(address(0))) { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L78-L78), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L95-L95), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L116-L116), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L167-L167), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L235-L235) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 197: if (selectorsLength == 0) { 257: if (lastSelectorPosition == 0) { ``` *GitHub*: [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L195-L195), [257](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L255-L255) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 171: if (enumIndex == 0) { ``` *GitHub*: [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L169-L169) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 49: if (ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getRawCodeHash(_address) == 0) { ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L47-L47) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 50: if (getMarker(_bytecodeHash) == 0) { ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L48-L48) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 262: } else if (_maxVirtualBlocksToCreate == 0) { ``` *GitHub*: [262](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L260-L260) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 265: if (returndata.length == 0) { ``` *GitHub*: [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L263-L263)
### [G‑48] Using `> 0` costs more gas than `!= 0` when used on a `uint` in a `require()` statement This change saves **[6 gas](https://aws1.discourse-cdn.com/business6/uploads/zeppelin/original/2X/3/363a367d6d68851f27d2679d10706cd16d788b96.png)** per instance. The optimization works until solidity version [0.8.13](https://gist.github.com/IllIllI000/bf2c3120f24a69e489f12b3213c06c94) where there is a regression in gas costs. *There are 6 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 71: require(_amount > 0, "Amount cannot be zero"); ``` *GitHub*: [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L69) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 306: require(knownCodeMarker > 0, "The code hash is not known"); ``` *GitHub*: [306](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L304) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 218: require(_l2BlockNumber > 0, "L2 block number is never expected to be zero"); 260: require(_maxVirtualBlocksToCreate > 0, "Can't initialize the first virtual block"); 328: require(_maxVirtualBlocksToCreate > 0, "There must be a virtual block created at the start of the batch"); 386: require(currentBatchNumber > 0, "The current batch number must be greater than 0"); ``` *GitHub*: [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L216), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L258), [328](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L326), [386](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L384) ### [G‑49] Nesting `if`-statements is cheaper than using `&&` Nesting `if`-statements avoids the stack operations of setting up and using an extra `jumpdest`, and saves **6 [gas](https://gist.github.com/IllIllI000/7f3b818abecfadbef93b894481ae7d19)** *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 305 if (batchWhenUpgradeHappened != 0 && batchWhenUpgradeHappened <= newTotalBatchesExecuted) { 306 delete s.l2SystemContractsUpgradeTxHash; 307 delete s.l2SystemContractsUpgradeBatchNumber; 308: } ``` *GitHub*: [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L303-L306) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 133 if ( 134 uint160(account) > CURRENT_MAX_PRECOMPILE_ADDRESS && 135 codeHash != 0x00 && 136 !Utils.isContractConstructing(codeHash) 137 ) { 138 codeSize = Utils.bytecodeLenInBytes(codeHash); 139: } ``` *GitHub*: [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L131-L137) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 143 if (to == address(DEPLOYER_SYSTEM_CONTRACT) && data.length >= 4) { 144 bytes4 selector = bytes4(data[:4]); 145 // Check that called function is the deployment method, 146 // the others deployer method is not supposed to be called from the default account. 147 isSystemCall = 148 selector == DEPLOYER_SYSTEM_CONTRACT.create.selector || 149 selector == DEPLOYER_SYSTEM_CONTRACT.create2.selector || 150 selector == DEPLOYER_SYSTEM_CONTRACT.createAccount.selector || 151 selector == DEPLOYER_SYSTEM_CONTRACT.create2Account.selector; 152: } ``` *GitHub*: [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L141-L150) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 90 if (accountInfo.nonceOrdering == IContractDeployer.AccountNonceOrdering.Sequential && _key != 0) { 91 require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 92: } 166 } else if (!isUsed && _shouldBeUsed) { 167 revert("The nonce was not set as used"); 168: } ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L88-L90), [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L164-L166) ### [G‑50] `++i` costs less gas than `i++`, especially when it's used in `for`-loops (`--i`/`i--` too) Saves **5 gas per loop** *There are 5 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 144: numInitialWritesProcessed++; 153: stateDiffPtr++; ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L142), [153](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L151) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 115: numberOfLogsToProcess++; 291: calldataPtr++; 297: calldataPtr++; ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L113), [291](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L289), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L295) ### [G‑51] `require()`/`revert()` strings longer than 32 bytes cost extra gas Each extra memory word of bytes past the original 32 [incurs an MSTORE](https://gist.github.com/hrkrshnn/ee8fabd532058307229d65dcd5836ddc#consider-having-short-revert-strings) which costs **3 gas** *There are 81 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 92: require(_factoryDeps.length == 2, "Invalid factory deps length provided"); 93 require( 94 msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, 95 "Miscalculated deploy transactions fees" 96: ); 225: revert("Method not supported. Failed deposit funds are sent to the L2 refund recipient address."); 281: require(_message.length == 96, "Incorrect ETH message with additional data length"); 284 require( 285 bytes4(functionSignature) == IMailbox.finalizeEthWithdrawal.selector, 286 "Incorrect ETH message function selector" 287: ); 297: require(l2Sender == l2Bridge, "The withdrawal was not initiated by L2 bridge"); ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L91-L94), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L223), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L282-L285), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L295) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 61: require(msg.sender == address(this), "Only governance contract itself allowed to call this function"); 67: require(msg.sender == securityCouncil, "Only security council allowed to call this function"); 73 require( 74 msg.sender == owner() || msg.sender == securityCouncil, 75 "Only the owner and security council are allowed to call this function" 76: ); 174: require(isOperationReady(id), "Operation must be ready before execution"); 179: require(isOperationReady(id), "Operation must be ready after execution"); 193: require(isOperationPending(id), "Operation must be pending before execution"); 198: require(isOperationPending(id), "Operation must be pending after execution"); 218: require(!isOperation(_id), "Operation with this proposal id already exists"); 219: require(_delay >= minDelay, "Proposed delay is less than minimum delay"); 242: require(_predecessorId == bytes32(0) || isOperationDone(_predecessorId), "Predecessor operation not completed"); ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L59), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L65), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L71-L74), [174](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L172), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L177), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L191), [198](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L196), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L216), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L217), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L240) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 173: require(_l2ProtocolUpgradeTx.txType == SYSTEM_UPGRADE_L2_TX_TYPE, "L2 system upgrade tx type is wrong"); 187 require( 188 _l2ProtocolUpgradeTx.nonce == _newProtocolVersion, 189 "The new protocol version should be included in the L2 system upgrade tx" 190: ); 218 require( 219 _newProtocolVersion > previousProtocolVersion, 220 "New protocol version is not greater than the current one" 221: ); 224: require(s.l2SystemContractsUpgradeTxHash == bytes32(0), "Previous upgrade has not been finalized"); 225 require( 226 s.l2SystemContractsUpgradeBatchNumber == 0, 227 "The batch number of the previous upgrade has not been cleaned" 228: ); ``` *GitHub*: [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L171), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L185-L188), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L216-L219), [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L222), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L223-L226) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 75: require(msg.value == 0, "Value should be 0 for ERC20 bridge"); ``` *GitHub*: [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L73) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 56: require(_l1Address != address(0), "L1 WETH token address cannot be zero"); 73: revert("bridgeMint is not implemented! Use deposit/depositTo methods instead."); ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L54), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L71) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 52: require(_l1Bridge != address(0), "L1 WETH bridge address cannot be zero"); 53: require(_l1WethAddress != address(0), "L1 WETH token address cannot be zero"); 54: require(_l2WethAddress != address(0), "L2 WETH token address cannot be zero"); 97 require( 98 AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, 99 "Only L1 WETH bridge can call this function" 100: ); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L52), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L95-L98) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 28: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); 39: require(Utils.isContractConstructing(_hash), "Code hash is not for a contract on constructor"); 50: require(Utils.isContractConstructed(_hash), "Code hash is not for a constructed contract"); 59: require(Utils.isContractConstructing(codeHash), "Code hash is not for a contract on constructor"); ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L26), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L37), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L48), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L57) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 24: require(msg.sender == FORCE_DEPLOYER, "Can only be called by FORCE_DEPLOYER"); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L22) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 63: require(dictionary.length % 8 == 0, "Dictionary length should be a multiple of 8"); 65 require( 66 encodedData.length * 4 == _bytecode.length, 67 "Encoded data length should be 4 times shorter than the original bytecode" 68: ); 72: require(indexOfEncodedChunk < dictionary.length, "Encoded chunk index is out of bounds"); 77: require(encodedChunk == realChunk, "Encoded chunk does not match the original bytecode"); 128: require(_enumerationIndexSize <= MAX_ENUMERATION_INDEX_SIZE, "enumeration index size is too large"); 165: require(numInitialWritesProcessed == numberOfInitialWrites, "Incorrect number of initial storage diffs"); 194: require(stateDiffPtr == _compressedStateDiffs.length, "Extra data in _compressedStateDiffs"); 237: require(convertedValue == _finalValue, "transform or no compression: compressed and final mismatch"); 239: require(_initialValue + convertedValue == _finalValue, "add: initial plus converted not equal to final"); 241: require(_initialValue - convertedValue == _finalValue, "sub: initial minus converted not equal to final"); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L61), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L63-L66), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L70), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L75), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L126), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L163), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L192), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L235), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L237), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L239) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 76 require( 77 _nonceOrdering == AccountNonceOrdering.Arbitrary && 78 currentInfo.nonceOrdering == AccountNonceOrdering.Sequential, 79 "It is only possible to change from sequential to arbitrary ordering" 80: ); 241 require( 242 msg.sender == FORCE_DEPLOYER || msg.sender == address(COMPLEX_UPGRADER_CONTRACT), 243 "Can only be called by FORCE_DEPLOYER or COMPLEX_UPGRADER_CONTRACT" 244: ); 253: require(msg.value == sumOfValues, "`value` provided is not equal to the combined `value`s of deployments"); 267: require(uint160(_newAddress) > MAX_SYSTEM_CONTRACT_ADDRESS, "Can not deploy contracts in kernel space"); 353: require(value == 0, "The value must be zero if we do not call the constructor"); ``` *GitHub*: [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L74-L78), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L239-L242), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L251), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L265), [353](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L351) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 102: require(totalRequiredBalance <= address(this).balance, "Not enough balance for fee + value"); 206: require(success, "Failed to pay the fee to the operator"); ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L100), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L204) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 37: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 79: require(version == 1 && _bytecodeHash[1] == bytes1(0), "Incorrectly formatted bytecodeHash"); ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L77) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 221 require( 222 reconstructedChainedLogsHash == chainedLogsHash, 223 "reconstructedChainedLogsHash is not equal to chainedLogsHash" 224: ); 252 require( 253 reconstructedChainedMessagesHash == chainedMessagesHash, 254 "reconstructedChainedMessagesHash is not equal to chainedMessagesHash" 255: ); 276 require( 277 reconstructedChainedL1BytecodesRevealDataHash == chainedL1BytecodesRevealDataHash, 278 "reconstructedChainedL1BytecodesRevealDataHash is not equal to chainedL1BytecodesRevealDataHash" 279: ); 286 require( 287 uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) == 288 STATE_DIFF_COMPRESSION_VERSION_NUMBER, 289 "state diff compression version mismatch" 290: ); 322: require(calldataPtr == _totalL2ToL1PubdataAndStateDiffs.length, "Extra data in the totalL2ToL1Pubdata array"); ``` *GitHub*: [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L219-L222), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L250-L253), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L274-L277), [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L284-L288), [322](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L320) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 35 require( 36 msg.sender == MSG_VALUE_SYSTEM_CONTRACT || 37 msg.sender == address(DEPLOYER_SYSTEM_CONTRACT) || 38 msg.sender == BOOTLOADER_FORMAL_ADDRESS, 39 "Only system contracts with special access can call this method" 40: ); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L33-L38) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 68: require(_value <= MAXIMAL_MIN_NONCE_INCREMENT, "The value for incrementing the nonce is too high"); ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L66) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 215: require(_isFirstInBatch, "Upgrade transaction must be first"); 218: require(_l2BlockNumber > 0, "L2 block number is never expected to be zero"); 222: require(correctPrevBlockHash == _expectedPrevL2BlockHash, "The previous L2 block hash is incorrect"); 260: require(_maxVirtualBlocksToCreate > 0, "Can't initialize the first virtual block"); 324 require( 325 _l2BlockTimestamp >= currentBatchTimestamp, 326 "The timestamp of the L2 block must be greater than or equal to the timestamp of the current batch" 327: ); 328: require(_maxVirtualBlocksToCreate > 0, "There must be a virtual block created at the start of the batch"); 340: require(!_isFirstInBatch, "Can not reuse L2 block number from the previous batch"); 341: require(currentL2BlockTimestamp == _l2BlockTimestamp, "The timestamp of the same L2 block must be same"); 342 require( 343 _expectedPrevL2BlockHash == _getLatest257L2blockHash(_l2BlockNumber - 1), 344 "The previous hash of the same L2 block must be same" 345: ); 346: require(_maxVirtualBlocksToCreate == 0, "Can not create virtual blocks in the middle of the miniblock"); 358: require(_expectedPrevL2BlockHash == pendingL2BlockHash, "The current L2 block hash is incorrect"); 359 require( 360 _l2BlockTimestamp > currentL2BlockTimestamp, 361 "The timestamp of the new L2 block must be greater than the timestamp of the previous L2 block" 362: ); 386: require(currentBatchNumber > 0, "The current batch number must be greater than 0"); 403 require( 404 _newTimestamp > currentBlockTimestamp, 405 "The timestamp of the batch must be greater than the timestamp of the previous block" 406: ); 426: require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); ``` *GitHub*: [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L213), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L216), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L220), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L258), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L322-L325), [328](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L326), [340](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L338), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L339), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L340-L343), [346](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L344), [358](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L356), [359](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L357-L360), [386](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L384), [403](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L401-L404), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L424) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 18 require( 19 SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender), 20 "This method require system call flag" 21: ); 28 require( 29 SystemContractHelper.isSystemContract(msg.sender), 30 "This method require the caller to be system contract" 31: ); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L16-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L26-L29) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 337: require(index < 10, "There are only 10 accessible registers"); ``` *GitHub*: [337](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L335) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 365: require(_transaction.paymasterInput.length >= 4, "The standard paymaster input must be at least 4 bytes long"); 369 require( 370 _transaction.paymasterInput.length >= 68, 371 "The approvalBased paymaster input must be at least 68 bytes long" 372: ); ``` *GitHub*: [365](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L363), [369](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L367-L370) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 69 require( 70 success, 71 "Address: unable to send value, recipient may have reverted" 72: ); 157 require( 158 address(this).balance >= value, 159 "Address: insufficient balance for call" 160: ); ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L67-L70), [157](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L155-L158)
### [G‑52] `>=` costs less gas than `>` The compiler uses opcodes `GT` and `ISZERO` for solidity code that uses `>`, but only requires `LT` for `>=`, [which saves **3 gas**](https://gist.github.com/IllIllI000/3dc79d25acccfa16dee4e83ffdc6ffde). If `<` is being used, the condition can be inverted. *There are 17 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 113: } else if (timestamp > block.timestamp) { ``` *GitHub*: [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L111-L111) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 355: if (_proof.serializedProof.length > 0) { 395: if (_newLastBatch < s.totalBatchesVerified) { 402: if (s.l2SystemContractsUpgradeBatchNumber > _newLastBatch) { ``` *GitHub*: [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L353-L353), [395](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L393-L393), [402](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L400-L400) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 314: if (refundRecipient.code.length > 0) { ``` *GitHub*: [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L312-L312) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 335: if (value > 0) { 342: if (value > 0) { ``` *GitHub*: [335](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L333-L333), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L340-L340) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 119: } else if (_block < currentVirtualBlockUpgradeInfo.virtualBlockStartBatch) { ``` *GitHub*: [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L117-L117) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 28: if (_val < 128) { 64: if (_len < 56) { 88: if (_number > type(uint128).max) { 92: if (_number > type(uint64).max) { 96: if (_number > type(uint32).max) { 100: if (_number > type(uint16).max) { 104: if (_number > type(uint8).max) { ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L26-L26), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L62-L62), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L86-L86), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L90-L90), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L94-L94), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L98-L98), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L102-L102) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 380: if (currentAllowance < minAllowance) { ``` *GitHub*: [380](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L378-L378) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 299: if (returndata.length > 0) { ``` *GitHub*: [299](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L297-L297)
### [G‑53] `.length` should not be looked up in every loop of a `for`-loop The overheads outlined below are _PER LOOP_, excluding the first loop * storage arrays incur a Gwarmaccess (**100 gas**) * memory arrays use `MLOAD` (**3 gas**) * calldata arrays use `CALLDATALOAD` (**3 gas**) Caching the length changes each of these to a `DUP` (**3 gas**), and gets rid of the extra `DUP` needed to store the stack offset *There are 8 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 227: for (uint256 i = 0; i < _calls.length; ++i) { ``` *GitHub*: [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L225) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 206: for (uint256 i = 0; i < _factoryDeps.length; ++i) { ``` *GitHub*: [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L204) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 87: for (uint256 i = 0; i < _newBatchesData.length; ++i) { 118: for (uint256 i = 0; i < _newBatchesData.length; ++i) { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L85), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L116) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 125: for (uint256 i = 0; i < emittedL2Logs.length; i = i.uncheckedAdd(L2_TO_L1_LOG_SERIALIZE_SIZE)) { 211: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 243: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L123), [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L209), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L241) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 70: for (uint256 encodedDataPointer = 0; encodedDataPointer < encodedData.length; encodedDataPointer += 2) { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L68) ### [G‑54] Remove unused local variable *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit prevBatchHash 387: bytes32 prevBatchHash = batchHash[currentBatchNumber - 1]; ``` *GitHub*: [387](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L385) ### [G‑55] Stack variable used as a cheaper cache for a state variable is only used once If the variable is only accessed once, it's cheaper to use the state variable directly that one time, and save the **3 gas** the extra stack assignment would spend *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 55: address oldValidator = validator; ``` *GitHub*: [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L53) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 323: uint128 currentBatchTimestamp = currentBatchInfo.timestamp; 402: uint128 currentBlockTimestamp = currentL2BlockInfo.timestamp; ``` *GitHub*: [323](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L321), [402](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L400) ### [G‑56] Splitting `require()` statements that use `&&` saves gas See [this issue](https://github.com/code-423n4/2022-01-xdefi-findings/issues/128) which describes the fact that there is a larger deployment gas cost, but with enough runtime calls, the change ends up being cheaper by **3 gas** *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 43: require(version == 1 && _bytecodeHash[1] == bytes1(0), "zf"); // Incorrectly formatted bytecodeHash ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 76 require( 77 _nonceOrdering == AccountNonceOrdering.Arbitrary && 78 currentInfo.nonceOrdering == AccountNonceOrdering.Sequential, 79 "It is only possible to change from sequential to arbitrary ordering" 80: ); ``` *GitHub*: [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L74-L78) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 79: require(version == 1 && _bytecodeHash[1] == bytes1(0), "Incorrectly formatted bytecodeHash"); ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L77-L77) ### [G‑57] Use custom errors rather than `revert()`/`require()` strings to save gas Custom errors are available from solidity version 0.8.4. Custom errors save [**~50 gas**](https://gist.github.com/IllIllI000/ad1bd0d29a0101b25e57c293b4b0c746) each time they're hit by [avoiding having to allocate and store the revert string](https://blog.soliditylang.org/2021/04/21/custom-errors/#errors-in-depth). Not defining the strings also save deployment gas *There are 272 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 92: require(_l2TokenBeacon != address(0), "nf"); 93: require(_governor != address(0), "nh"); 95: require(_factoryDeps.length == 3, "mk"); 97: require(msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, "fee"); 186: require(_amount != 0, "2T"); // empty deposit amount 188: require(amount == _amount, "1T"); // The token has non-standard transfer logic 274: require(proofValid, "yn"); 277: require(amount > 0, "y1"); 302: require(!isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "pw"); 314: require(success, "nq"); 331: require(_l2ToL1message.length == 76, "kk"); 334: require(bytes4(functionSignature) == this.finalizeWithdrawal.selector, "nt"); 349: require(totalDepositedAmountPerUser[_l1Token][_depositor] + _amount <= limitData.depositCap, "d1"); ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L91), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L93), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L95), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L184), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L186), [274](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L272), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L275), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L300), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L312), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L329), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L332), [349](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L347) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 90: require(_l2WethAddress != address(0), "L2 WETH address cannot be zero"); 91: require(_governor != address(0), "Governor address cannot be zero"); 92: require(_factoryDeps.length == 2, "Invalid factory deps length provided"); 93 require( 94 msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, 95 "Miscalculated deploy transactions fees" 96: ); 169: require(_l1Token == l1WethAddress, "Invalid L1 token address"); 170: require(_amount != 0, "Amount cannot be zero"); 242: require(!isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "Withdrawal is already finalized"); 256: require(success, "vq"); 281: require(_message.length == 96, "Incorrect ETH message with additional data length"); 284 require( 285 bytes4(functionSignature) == IMailbox.finalizeEthWithdrawal.selector, 286 "Incorrect ETH message function selector" 287: ); 291: require(l1EthReceiver == address(this), "Wrong L1 ETH withdraw receiver"); 297: require(l2Sender == l2Bridge, "The withdrawal was not initiated by L2 bridge"); 313: require(msg.sender == l1WethAddress || msg.sender == address(zkSync), "pn"); ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L88), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L89), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L91-L94), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L167), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L168), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L240), [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L254), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L282-L285), [291](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L289), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L295), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L311) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 62: require(targetsLength == _accessModes.length, "yg"); // The size of arrays should be equal 94: require(callersLength == _targets.length, "yw"); 95: require(callersLength == _functionSigs.length, "yx"); 96: require(callersLength == _enables.length, "yy"); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L60), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L92), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L94) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 15: require(_allowList.canCall(msg.sender, address(this), msg.sig), "nr"); ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L13) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 60: require(lockSlotOldValue == 0, "1B"); 77: require(_status == _NOT_ENTERED, "r1"); ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L58), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L75) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 25: require(_bytecode.length % 32 == 0, "pq"); 28: require(bytecodeLenInWords < 2**16, "pp"); // bytecode length must be less than 2^16 words 29: require(bytecodeLenInWords % 2 == 1, "ps"); // bytecode length in words must be odd 43: require(version == 1 && _bytecodeHash[1] == bytes1(0), "zf"); // Incorrectly formatted bytecodeHash 45: require(_bytecodeLen(_bytecodeHash) % 2 == 1, "uy"); // Code length in words must be odd ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L23), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L26), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L27), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L43) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 44: require(_admin != address(0), "Admin should be non zero address"); 61: require(msg.sender == address(this), "Only governance contract itself allowed to call this function"); 67: require(msg.sender == securityCouncil, "Only security council allowed to call this function"); 73 require( 74 msg.sender == owner() || msg.sender == securityCouncil, 75 "Only the owner and security council are allowed to call this function" 76: ); 157: require(isOperationPending(_id), "Operation must be pending"); 174: require(isOperationReady(id), "Operation must be ready before execution"); 179: require(isOperationReady(id), "Operation must be ready after execution"); 193: require(isOperationPending(id), "Operation must be pending before execution"); 198: require(isOperationPending(id), "Operation must be pending after execution"); 218: require(!isOperation(_id), "Operation with this proposal id already exists"); 219: require(_delay >= minDelay, "Proposed delay is less than minimum delay"); 242: require(_predecessorId == bytes32(0) || isOperationDone(_predecessorId), "Predecessor operation not completed"); ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L42), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L59), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L65), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L71-L74), [157](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L155), [174](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L172), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L177), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L191), [198](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L196), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L216), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L217), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L240) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 74: require(block.timestamp >= _proposedUpgrade.upgradeTimestamp, "Upgrade is not ready yet"); 173: require(_l2ProtocolUpgradeTx.txType == SYSTEM_UPGRADE_L2_TX_TYPE, "L2 system upgrade tx type is wrong"); 187 require( 188 _l2ProtocolUpgradeTx.nonce == _newProtocolVersion, 189 "The new protocol version should be included in the L2 system upgrade tx" 190: ); 203: require(_factoryDeps.length == _expectedHashes.length, "Wrong number of factory deps"); 204: require(_factoryDeps.length <= MAX_NEW_FACTORY_DEPS, "Factory deps can be at most 32"); 207 require( 208 L2ContractHelper.hashL2Bytecode(_factoryDeps[i]) == bytes32(_expectedHashes[i]), 209 "Wrong factory dep hash" 210: ); 218 require( 219 _newProtocolVersion > previousProtocolVersion, 220 "New protocol version is not greater than the current one" 221: ); 224: require(s.l2SystemContractsUpgradeTxHash == bytes32(0), "Previous upgrade has not been finalized"); 225 require( 226 s.l2SystemContractsUpgradeBatchNumber == 0, 227 "The batch number of the previous upgrade has not been cleaned" 228: ); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L72), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L171), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L185-L188), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L201), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L202), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L205-L208), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L216-L219), [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L222), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L223-L226) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 58: require(address(_initalizeData.verifier) != address(0), "vt"); 59: require(_initalizeData.governor != address(0), "vy"); 60: require(_initalizeData.admin != address(0), "hc"); 61: require(_initalizeData.priorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "vu"); ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L59) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 16: require(_chainId == block.chainid, "pr"); 27: require(msg.data.length >= 4 || msg.data.length == 0, "Ut"); 32: require(facetAddress != address(0), "F"); // Proxy has no facet for this selector 33: require(!diamondStorage.isFrozen || !facet.isFreezable, "q1"); // Facet is frozen ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L14), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L30), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 68: require(msg.sender == validator, "8h"); 125: require(block.timestamp >= commitBatchTimestamp + delay, "5c"); // The delay is not passed ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L66), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 33: require(msg.sender == pendingGovernor, "n4"); // Only proposed by current governor address can claim the governor rights 57: require(msg.sender == pendingAdmin, "n4"); // Only proposed by current admin address can claim the admin rights 86: require(_newPriorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "n5"); 114: require(!diamondStorage.isFrozen, "a9"); // diamond proxy is frozen already 125: require(diamondStorage.isFrozen, "a7"); // diamond proxy is not frozen ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L31), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L55), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L84), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L112), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 21: require(msg.sender == s.governor, "1g"); // only by governor 27: require(msg.sender == s.governor || msg.sender == s.admin, "Only by governor or admin"); 33: require(s.validators[msg.sender], "1h"); // validator is not active ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L19), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L25), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 34: require(_newBatch.batchNumber == _previousBatch.batchNumber + 1, "f"); // only commit next batch 47: require(_previousBatch.batchHash == previousBatchHash, "l"); 49: require(expectedPriorityOperationsHash == _newBatch.priorityOperationsHash, "t"); 51: require(expectedNumberOfLayer1Txs == _newBatch.numberOfLayer1Txs, "ta"); 83: require(batchTimestamp == _expectedBatchTimestamp, "tb"); 87: require(_previousBatchTimestamp < batchTimestamp, "h3"); 95: require(block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER <= batchTimestamp, "h1"); // New batch timestamp is too small 96: require(lastL2BlockTimestamp <= block.timestamp + COMMIT_TIMESTAMP_APPROXIMATION_DELTA, "h2"); // The last L2 block timestamp is too big 132: require(!_checkBit(processedLogs, uint8(logKey)), "kp"); 137: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lm"); 140: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "ln"); 141: require(providedL2ToL1PubdataHash == logValue, "wp"); 143: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lb"); 146: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sc"); 149: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sv"); 152: require(logSender == L2_BOOTLOADER_ADDRESS, "bl"); 155: require(logSender == L2_BOOTLOADER_ADDRESS, "bk"); 158: require(logSender == L2_BOOTLOADER_ADDRESS, "bu"); 159: require(_expectedSystemContractUpgradeTxHash == logValue, "ut"); 169: require(processedLogs == 127, "b7"); 171: require(processedLogs == 255, "b8"); 186: require(s.storedBatchHashes[s.totalBatchesCommitted] == _hashStoredBatchInfo(_lastCommittedBatchData), "i"); // incorrect previous batch data 187: require(_newBatchesData.length > 0, "No batches to commit"); 238: require(s.l2SystemContractsUpgradeBatchNumber == 0, "ik"); 277: require(currentBatchNumber == s.totalBatchesExecuted + _executedBatchIdx + 1, "k"); // Execute batches in order 278 require( 279 _hashStoredBatchInfo(_storedBatch) == s.storedBatchHashes[currentBatchNumber], 280 "exe10" // executing batch should be committed 281: ); 284: require(priorityOperationsHash == _storedBatch.priorityOperationsHash, "x"); // priority operations hash does not match to expected 302: require(newTotalBatchesExecuted <= s.totalBatchesVerified, "n"); // Can't execute batches more than committed and proven currently. 329: require(_hashStoredBatchInfo(_prevBatch) == s.storedBatchHashes[currentTotalBatchesVerified], "t1"); 334 require( 335 _hashStoredBatchInfo(_committedBatches[i]) == s.storedBatchHashes[currentTotalBatchesVerified], 336 "o1" 337: ); 348: require(currentTotalBatchesVerified <= s.totalBatchesCommitted, "q"); 361: require(successVerifyProof, "p"); // Proof verification fail 392: require(s.totalBatchesCommitted > _newLastBatch, "v1"); // The last committed batch is less than new last batch 393: require(_newLastBatch >= s.totalBatchesExecuted, "v2"); // Already executed batches cannot be reverted 446: require(_batch.systemLogs.length <= MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, "pu"); ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L32), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L47), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L49), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L81), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L85), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L94), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L130), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L135), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L138), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L139), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L141), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L144), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L147), [152](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L150), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L153), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L156), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L157), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L167), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L169), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L184), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L185), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L236), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L275), [278](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L276-L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L282), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L300), [329](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L327), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L332-L335), [348](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L346), [361](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L359), [392](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L390), [393](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L391), [446](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L444) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 162: require(ds.selectorToFacet[_selector].facetAddress != address(0), "g2"); ``` *GitHub*: [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L160) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 121: require(callSuccess, "pz"); 131: require(_batchNumber <= s.totalBatchesExecuted, "xx"); 138: require(hashedLog != L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, "tw"); 201: require(!s.isEthWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "jj"); 212: require(proofValid, "pi"); // Failed to verify that withdrawal was actually initialized on L2 259: require(_l2GasPerPubdataByteLimit == REQUIRED_L2_GAS_PRICE_PER_PUBDATA, "qp"); 281: require(s.totalDepositedAmountPerUser[_depositor] + _amount <= limitData.depositCap, "d2"); 296: require(_factoryDeps.length <= MAX_NEW_FACTORY_DEPS, "uj"); 308: require(msg.value >= baseCost + _l2Value, "mv"); // The `msg.value` doesn't cover the transaction cost 423: require(_message.length >= 56, "pm"); 426: require(bytes4(functionSignature) == this.finalizeEthWithdrawal.selector, "is"); ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L119), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L129), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L136), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L199), [212](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L210), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L257), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L279), [296](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L294), [308](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L306), [423](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L421), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L424) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 108: require(selectors.length > 0, "B"); // no functions for diamond cut 134: require(_facet != address(0), "G"); // facet with zero address cannot be added 143: require(oldFacet.facetAddress == address(0), "J"); // facet for this selector already exists 158: require(_facet != address(0), "K"); // cannot replace facet with zero address 164: require(oldFacet.facetAddress != address(0), "L"); // it is impossible to replace the facet with zero address 178: require(_facet == address(0), "a1"); // facet address must be zero 184: require(oldFacet.facetAddress != address(0), "a2"); // Can't delete a non-existent facet 222: require(_isSelectorFreezable == ds.selectorToFacet[selector0].isFreezable, "J1"); 287: require(_calldata.length == 0, "H"); // Non-empty calldata for zero address 304: require(data.length == 32, "lp"); 305: require(abi.decode(data, (bytes32)) == DIAMOND_INIT_SUCCESS_RETURN_VALUE, "lp1"); ``` *GitHub*: [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L106), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L132), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L141), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L156), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L162), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L176), [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L182), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L220), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L285), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L302), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L303) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 26: require(pathLength > 0, "xc"); 27: require(pathLength < 256, "bt"); 28: require(_index < (1 << pathLength), "px"); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L26) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 67: require(!_queue.isEmpty(), "D"); // priority queue is empty 75: require(!_queue.isEmpty(), "s"); // priority queue is empty ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L65), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L73) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 32: require(l2GasForTxBody <= _priorityTxMaxGasLimit, "ui"); 34: require(l2GasForTxBody / _transaction.gasPerPubdataByteLimit <= PRIORITY_TX_MAX_PUBDATA, "uk"); 38 require( 39 getMinimalPriorityTransactionGasLimit( 40 _encoded.length, 41 _transaction.factoryDeps.length, 42 _transaction.gasPerPubdataByteLimit 43 ) <= _transaction.gasLimit, 44 "up" 45: ); 52: require(_transaction.from <= type(uint16).max, "ua"); 53: require(_transaction.to <= type(uint160).max, "ub"); 54: require(_transaction.paymaster == 0, "uc"); 55: require(_transaction.value == 0, "ud"); 56: require(_transaction.reserved[0] == 0, "ue"); 57: require(_transaction.reserved[1] <= type(uint160).max, "uf"); 58: require(_transaction.reserved[2] == 0, "ug"); 59: require(_transaction.reserved[3] == 0, "uo"); 60: require(_transaction.signature.length == 0, "uh"); 61: require(_transaction.paymasterInput.length == 0, "ul"); 62: require(_transaction.reservedDynamic.length == 0, "um"); 119: require(_totalGasLimit >= overhead, "my"); // provided gas limit doesn't cover transaction overhead ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L32), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L36-L43), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L52), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L54), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L59), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L60), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L117) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 47: require(_l1Bridge != address(0), "bf"); 48: require(_l2TokenProxyBytecodeHash != bytes32(0), "df"); 49: require(_governor != address(0), "sf"); 73: require(AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, "mq"); 75: require(msg.value == 0, "Value should be 0 for ERC20 bridge"); 81: require(deployedToken == expectedL2Token, "mt"); 84: require(currentL1Token == _l1Token, "gg"); // Double check that the expected value equal to real one 115: require(l1Token != address(0), "yh"); 161: require(success, "mk"); ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L45), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L46), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L47), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L71), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L73), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L79), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L82), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L113), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L159) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 49: require(_l1Address != address(0), "in6"); // Should be non-zero address 103: require(msg.sender == l2Bridge, "xnt"); // Only L2 bridge can call this method ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L47), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L101) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 55: require(_l2Bridge != address(0), "L2 bridge address cannot be zero"); 56: require(_l1Address != address(0), "L1 WETH token address cannot be zero"); 62: require(msg.sender == l2Bridge, "permission denied"); // Only L2 bridge can call this method 84: require(success, "Failed withdrawal"); 109: require(success, "Failed withdrawal"); ``` *GitHub*: [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L54), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L60), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L82), [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L107) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 52: require(_l1Bridge != address(0), "L1 WETH bridge address cannot be zero"); 53: require(_l1WethAddress != address(0), "L1 WETH token address cannot be zero"); 54: require(_l2WethAddress != address(0), "L2 WETH token address cannot be zero"); 70: require(_l2Token == l2WethAddress, "Only WETH can be withdrawn"); 71: require(_amount > 0, "Amount cannot be zero"); 97 require( 98 AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, 99 "Only L1 WETH bridge can call this function" 100: ); 102: require(_l1Token == l1WethAddress, "Only WETH can be deposited"); 103: require(msg.value == _amount, "Amount mismatch"); 122: require(msg.sender == l2WethAddress, "pd"); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L52), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L68), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L69), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L95-L98), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L100), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L101), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L120) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 28: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); 39: require(Utils.isContractConstructing(_hash), "Code hash is not for a contract on constructor"); 50: require(Utils.isContractConstructed(_hash), "Code hash is not for a constructed contract"); 59: require(Utils.isContractConstructing(codeHash), "Code hash is not for a contract on constructor"); ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L26), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L37), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L48), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L57) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 94: require(vInt == 27 || vInt == 28, "Invalid v value"); 193: require(vInt == 27 || vInt == 28, "Invalid v value"); 288: require(vInt == 27 || vInt == 28, "Invalid v value"); ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L92), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191), [288](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L286) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 24: require(msg.sender == FORCE_DEPLOYER, "Can only be called by FORCE_DEPLOYER"); 26: require(_delegateTo.code.length > 0, "Delegatee is an EOA"); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L24) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 63: require(dictionary.length % 8 == 0, "Dictionary length should be a multiple of 8"); 64: require(dictionary.length <= 2 ** 16 * 8, "Dictionary is too big"); 65 require( 66 encodedData.length * 4 == _bytecode.length, 67 "Encoded data length should be 4 times shorter than the original bytecode" 68: ); 72: require(indexOfEncodedChunk < dictionary.length, "Encoded chunk index is out of bounds"); 77: require(encodedChunk == realChunk, "Encoded chunk does not match the original bytecode"); 128: require(_enumerationIndexSize <= MAX_ENUMERATION_INDEX_SIZE, "enumeration index size is too large"); 149: require(derivedKey == _compressedStateDiffs.readBytes32(stateDiffPtr), "iw: initial key mismatch"); 165: require(numInitialWritesProcessed == numberOfInitialWrites, "Incorrect number of initial storage diffs"); 178: require(enumIndex == compressedEnumIndex, "rw: enum key mismatch"); 194: require(stateDiffPtr == _compressedStateDiffs.length, "Extra data in _compressedStateDiffs"); 237: require(convertedValue == _finalValue, "transform or no compression: compressed and final mismatch"); 239: require(_initialValue + convertedValue == _finalValue, "add: initial plus converted not equal to final"); 241: require(_initialValue - convertedValue == _finalValue, "sub: initial minus converted not equal to final"); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L62), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L63-L66), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L70), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L75), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L126), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L147), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L163), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L176), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L192), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L235), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L237), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L239) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 31: require(msg.sender == address(this), "Callable only by self"); 76 require( 77 _nonceOrdering == AccountNonceOrdering.Arbitrary && 78 currentInfo.nonceOrdering == AccountNonceOrdering.Sequential, 79 "It is only possible to change from sequential to arbitrary ordering" 80: ); 241 require( 242 msg.sender == FORCE_DEPLOYER || msg.sender == address(COMPLEX_UPGRADER_CONTRACT), 243 "Can only be called by FORCE_DEPLOYER or COMPLEX_UPGRADER_CONTRACT" 244: ); 253: require(msg.value == sumOfValues, "`value` provided is not equal to the combined `value`s of deployments"); 266: require(_bytecodeHash != bytes32(0x0), "BytecodeHash cannot be zero"); 267: require(uint160(_newAddress) > MAX_SYSTEM_CONTRACT_ADDRESS, "Can not deploy contracts in kernel space"); 270 require( 271 ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getCodeHash(uint256(uint160(_newAddress))) == 0x0, 272 "Code hash is non-zero" 273: ); 275: require(NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(_newAddress) == 0x00, "Account is occupied"); 306: require(knownCodeMarker > 0, "The code hash is not known"); 353: require(value == 0, "The value must be zero if we do not call the constructor"); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L29), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L74-L78), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L239-L242), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L251), [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L264), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L265), [270](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L268-L271), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L273), [306](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L304), [353](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L351) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 102: require(totalRequiredBalance <= address(this).balance, "Not enough balance for fee + value"); 164: require(_signature.length == 65, "Signature length is incorrect"); 177: require(v == 27 || v == 28, "v is neither 27 nor 28"); 188: require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "Invalid s"); 206: require(success, "Failed to pay the fee to the operator"); ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L100), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L162), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L186), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L204) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 37: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 23: require(msg.sender == address(COMPRESSOR_CONTRACT), "Callable only by the compressor"); 79: require(version == 1 && _bytecodeHash[1] == bytes1(0), "Incorrectly formatted bytecodeHash"); 81: require(Utils.bytecodeLenInWords(_bytecodeHash) % 2 == 1, "Code length in words must be odd"); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L21), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L77), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L79) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 208: require(numberOfL2ToL1Logs <= numberOfL2ToL1Logs, "Too many L2->L1 logs"); 221 require( 222 reconstructedChainedLogsHash == chainedLogsHash, 223 "reconstructedChainedLogsHash is not equal to chainedLogsHash" 224: ); 252 require( 253 reconstructedChainedMessagesHash == chainedMessagesHash, 254 "reconstructedChainedMessagesHash is not equal to chainedMessagesHash" 255: ); 276 require( 277 reconstructedChainedL1BytecodesRevealDataHash == chainedL1BytecodesRevealDataHash, 278 "reconstructedChainedL1BytecodesRevealDataHash is not equal to chainedL1BytecodesRevealDataHash" 279: ); 286 require( 287 uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) == 288 STATE_DIFF_COMPRESSION_VERSION_NUMBER, 289 "state diff compression version mismatch" 290: ); 305: require(calldataPtr <= MAX_ALLOWED_PUBDATA_PER_BATCH, "L1 Messenger pubdata is too long"); 322: require(calldataPtr == _totalL2ToL1PubdataAndStateDiffs.length, "Extra data in the totalL2ToL1Pubdata array"); ``` *GitHub*: [208](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L206), [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L219-L222), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L250-L253), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L274-L277), [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L284-L288), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L303), [322](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L320) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 35 require( 36 msg.sender == MSG_VALUE_SYSTEM_CONTRACT || 37 msg.sender == address(DEPLOYER_SYSTEM_CONTRACT) || 38 msg.sender == BOOTLOADER_FORMAL_ADDRESS, 39 "Only system contracts with special access can call this method" 40: ); 43: require(fromBalance >= _amount, "Transfer amount exceeds balance"); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L33-L38), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L41) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 41: require(to != address(this), "MsgValueSimulator calls itself"); ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L39) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 68: require(_value <= MAXIMAL_MIN_NONCE_INCREMENT, "The value for incrementing the nonce is too high"); 87: require(_value != 0, "Nonce value cannot be set to 0"); 91: require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 117: require(oldMinNonce == _expectedNonce, "Incorrect nonce"); 138: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), ""); ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L66), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L85), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L89), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L115), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L136) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 215: require(_isFirstInBatch, "Upgrade transaction must be first"); 218: require(_l2BlockNumber > 0, "L2 block number is never expected to be zero"); 222: require(correctPrevBlockHash == _expectedPrevL2BlockHash, "The previous L2 block hash is incorrect"); 260: require(_maxVirtualBlocksToCreate > 0, "Can't initialize the first virtual block"); 324 require( 325 _l2BlockTimestamp >= currentBatchTimestamp, 326 "The timestamp of the L2 block must be greater than or equal to the timestamp of the current batch" 327: ); 328: require(_maxVirtualBlocksToCreate > 0, "There must be a virtual block created at the start of the batch"); 340: require(!_isFirstInBatch, "Can not reuse L2 block number from the previous batch"); 341: require(currentL2BlockTimestamp == _l2BlockTimestamp, "The timestamp of the same L2 block must be same"); 342 require( 343 _expectedPrevL2BlockHash == _getLatest257L2blockHash(_l2BlockNumber - 1), 344 "The previous hash of the same L2 block must be same" 345: ); 346: require(_maxVirtualBlocksToCreate == 0, "Can not create virtual blocks in the middle of the miniblock"); 358: require(_expectedPrevL2BlockHash == pendingL2BlockHash, "The current L2 block hash is incorrect"); 359 require( 360 _l2BlockTimestamp > currentL2BlockTimestamp, 361 "The timestamp of the new L2 block must be greater than the timestamp of the previous L2 block" 362: ); 386: require(currentBatchNumber > 0, "The current batch number must be greater than 0"); 403 require( 404 _newTimestamp > currentBlockTimestamp, 405 "The timestamp of the batch must be greater than the timestamp of the previous block" 406: ); 425: require(_newTimestamp > previousBatchTimestamp, "Timestamps should be incremental"); 426: require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); ``` *GitHub*: [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L213), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L216), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L220), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L258), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L322-L325), [328](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L326), [340](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L338), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L339), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L340-L343), [346](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L344), [358](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L356), [359](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L357-L360), [386](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L384), [403](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L401-L404), [425](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L423), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L424) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 18 require( 19 SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender), 20 "This method require system call flag" 21: ); 28 require( 29 SystemContractHelper.isSystemContract(msg.sender), 30 "This method require the caller to be system contract" 31: ); 38: require(msg.sender == caller, "Inappropriate caller"); 45: require(msg.sender == BOOTLOADER_FORMAL_ADDRESS, "Callable only by the bootloader"); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L16-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L26-L29), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L36), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L43) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 40: require(returnData.length == 32, "keccak256 returned invalid data"); 49: require(returnData.length == 32, "sha returned invalid data"); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L38), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L47) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 337: require(index < 10, "There are only 10 accessible registers"); 367: require(precompileCallSuccess, "Failed to charge gas"); ``` *GitHub*: [337](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L335), [367](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L365) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 365: require(_transaction.paymasterInput.length >= 4, "The standard paymaster input must be at least 4 bytes long"); 369 require( 370 _transaction.paymasterInput.length >= 68, 371 "The approvalBased paymaster input must be at least 68 bytes long" 372: ); ``` *GitHub*: [365](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L363), [369](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L367-L370) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 23: require(_x <= type(uint128).max, "Overflow"); 29: require(_x <= type(uint32).max, "Overflow"); 35: require(_x <= type(uint24).max, "Overflow"); 86: require(_bytecode.length % 32 == 0, "po"); 89: require(bytecodeLenInWords < 2 ** 16, "pp"); // bytecode length must be less than 2^16 words 90: require(bytecodeLenInWords % 2 == 1, "pr"); // bytecode length in words must be odd ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L21), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L27), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L33), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L84), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L87), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L88) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 63 require( 64 address(this).balance >= amount, 65 "Address: insufficient balance" 66: ); 69 require( 70 success, 71 "Address: unable to send value, recipient may have reverted" 72: ); 157 require( 158 address(this).balance >= value, 159 "Address: insufficient balance for call" 160: ); 268: require(isContract(target), "Address: call to non-contract"); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L61-L64), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L67-L70), [157](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L155-L158), [268](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L266)
### [G‑58] Using `constant`s directly, rather than caching the value, saves gas *There are 31 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol /// @audit DIAMOND_STORAGE_POSITION 89: bytes32 position = DIAMOND_STORAGE_POSITION; ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L87-L87) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit L2_TO_L1_LOGS_MERKLE_TREE_LEAVES 228: uint256 nodesOnCurrentLevel = L2_TO_L1_LOGS_MERKLE_TREE_LEAVES; ``` *GitHub*: [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L226-L226) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol /// @audit RAW_FAR_CALL_BY_REF_CALL_ADDRESS 136: address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS; /// @audit MSG_VALUE_SYSTEM_CONTRACT 144: address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT; /// @audit SYSTEM_CALL_BY_REF_CALL_ADDRESS 145: address callAddr = SYSTEM_CALL_BY_REF_CALL_ADDRESS; /// @audit RAW_FAR_CALL_BY_REF_CALL_ADDRESS 164: address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS; /// @audit RAW_FAR_CALL_BY_REF_CALL_ADDRESS 178: address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS; /// @audit MIMIC_CALL_BY_REF_CALL_ADDRESS 203: address callAddr = MIMIC_CALL_BY_REF_CALL_ADDRESS; /// @audit ADDRESS_MASK 204: uint256 cleanupMask = ADDRESS_MASK; ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L134-L134), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L142-L142), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L143-L143), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L162-L162), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L176-L176), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L201-L201), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L202-L202) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit TO_L1_CALL_ADDRESS 78: address callAddr = TO_L1_CALL_ADDRESS; /// @audit CODE_ADDRESS_CALL_ADDRESS 93: address callAddr = CODE_ADDRESS_CALL_ADDRESS; /// @audit LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS 104: address callAddr = LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS; /// @audit PTR_PACK_INTO_ACTIVE_CALL_ADDRESS 115: address callAddr = PTR_PACK_INTO_ACTIVE_CALL_ADDRESS; /// @audit PTR_ADD_INTO_ACTIVE_CALL_ADDRESS 124: address callAddr = PTR_ADD_INTO_ACTIVE_CALL_ADDRESS; /// @audit UINT32_MASK 125: uint256 cleanupMask = UINT32_MASK; /// @audit PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS 136: address callAddr = PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS; /// @audit UINT32_MASK 137: uint256 cleanupMask = UINT32_MASK; /// @audit PRECOMPILE_CALL_ADDRESS 178: address callAddr = PRECOMPILE_CALL_ADDRESS; /// @audit UINT32_MASK 180: uint256 cleanupMask = UINT32_MASK; /// @audit UINT128_MASK 192: uint256 cleanupMask = UINT128_MASK; /// @audit SET_CONTEXT_VALUE_CALL_ADDRESS 193: address callAddr = SET_CONTEXT_VALUE_CALL_ADDRESS; /// @audit EVENT_INITIALIZE_ADDRESS 205: address callAddr = EVENT_INITIALIZE_ADDRESS; /// @audit EVENT_WRITE_ADDRESS 215: address callAddr = EVENT_WRITE_ADDRESS; /// @audit META_CALL_ADDRESS 226: address callAddr = META_CALL_ADDRESS; /// @audit CALLFLAGS_CALL_ADDRESS 315: address callAddr = CALLFLAGS_CALL_ADDRESS; /// @audit PTR_CALLDATA_CALL_ADDRESS 326: address callAddr = PTR_CALLDATA_CALL_ADDRESS; /// @audit GET_EXTRA_ABI_DATA_ADDRESS 339: address callAddr = GET_EXTRA_ABI_DATA_ADDRESS; ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L76-L76), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L91-L91), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L102-L102), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L113-L113), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L122-L122), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L123-L123), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L134-L134), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L135-L135), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L176-L176), [180](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L178-L178), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L190-L190), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L191-L191), [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L203-L203), [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L213-L213), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L224-L224), [315](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L313-L313), [326](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L324-L324), [339](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L337-L337) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol /// @audit SYSTEM_CALL_CALL_ADDRESS 79: address callAddr = SYSTEM_CALL_CALL_ADDRESS; /// @audit MSG_VALUE_SYSTEM_CONTRACT 106: address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT; /// @audit MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT 109: uint256 forwardMask = MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT; ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L77-L77), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L104-L104), [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L107-L107) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit BOOTLOADER_FORMAL_ADDRESS 398: address bootloaderAddr = BOOTLOADER_FORMAL_ADDRESS; ``` *GitHub*: [398](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L396-L396) ### [G‑59] Using `msg` globals directly, rather than caching the value, saves gas For example, use `msg.sender` directly rather than storing it to a local variable *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit sender 250: if (sender != tx.origin) { /// @audit sender 251: sender = AddressAliasHelper.applyL1ToL2Alias(msg.sender); /// @audit sender 265: sender, ``` *GitHub*: [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L248-L248), [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L249-L249), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L263-L263) ### [G‑60] Using globals directly is cheaper than assigning them to variables Using the [global](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html#global-variables) directly saves **5 [gas](https://gist.github.com/IllIllI000/0a38d74d0af20412471a43f1e4fcf8be)** *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 249: address sender = msg.sender; ``` *GitHub*: [249](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L247-L247) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 332: uint256 value = msg.value; ``` *GitHub*: [332](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L330-L330) ## Disputed Issues The issues below may be reported by other bots/wardens, but can be penalized/ignored since either the rule or the specified instances are invalid ### [D‑01] ~~`abi.encode()` is less efficient than `abi.encodepacked()`~~ `abi.encodePacked()` does not always save gas over `abi.encode()` and in fact often costs [more](https://gist.github.com/IllIllI000/2ee970e4f05af4d2a3d89a56b5cc93a5) gas. The [comparison](https://github.com/ConnorBlockchain/Solidity-Encode-Gas-Comparison) sometimes linked to itself even shows that when addresses are involved, the packed flavor costs more gas. *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 121: l2BridgeProxyConstructorData = abi.encode(bridgeImplementationAddr, _governor, proxyInitializationParams); 356: bytes32 constructorInputHash = keccak256(abi.encode(address(l2TokenBeacon), "")); ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L119-L119), [356](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L354-L354) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 120: l2WethBridgeProxyConstructorData = abi.encode( ``` *GitHub*: [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L118-L118) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 134: bytes32 constructorInputHash = keccak256(abi.encode(address(l2TokenBeacon), "")); 156: (salt, l2TokenProxyBytecodeHash, abi.encode(address(l2TokenBeacon), "")) ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L132-L132), [156](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L154-L154) ### [D‑02] ~~`abi.encodePacked()` should not be used with dynamic types when passing the result to a hash function such as `keccak256()`~~ The cases below do not have consecutive `bytes`/`string` arguments *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 376 keccak256( 377 abi.encodePacked( 378 _prevBatchCommitment, 379 _currentBatchCommitment, 380 _verifierParams.recursionNodeLevelVkHash, 381 _verifierParams.recursionLeafLevelVkHash 382 ) 383: ) ``` *GitHub*: [376](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L374-L381) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 133 bytes32 hashedLog = keccak256( 134 abi.encodePacked(_log.l2ShardId, _log.isService, _log.txNumberInBatch, _log.sender, _log.key, _log.value) 135: ); ``` *GitHub*: [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L131-L133) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 101 bytes32 hashedLog = keccak256( 102 abi.encodePacked( 103 _l2ToL1Log.l2ShardId, 104 _l2ToL1Log.isService, 105 _l2ToL1Log.txNumberInBlock, 106 _l2ToL1Log.sender, 107 _l2ToL1Log.key, 108 _l2ToL1Log.value 109 ) 110: ); ``` *GitHub*: [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L99-L108) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 207: return keccak256(abi.encodePacked(uint32(_blockNumber))); ``` *GitHub*: [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L205) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 135: keccak256(abi.encodePacked(_transaction.factoryDeps)), 144: return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); ``` *GitHub*: [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L133), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L142) ### [D‑03] ~~`internal` functions not called by the contract should be removed~~ These functions are referenced by other contracts extending the current one *There are 112 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 32 function requestDeployTransaction( 33 IZkSync _zkSync, 34 uint256 _deployTransactionFee, 35 bytes32 _bytecodeHash, 36 bytes memory _constructorData, 37 bytes[] memory _factoryDeps 38: ) internal returns (address deployedAddress) { ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L30-L36) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 23: function hashL2Bytecode(bytes memory _bytecode) internal pure returns (bytes32 hashedBytecode) { 41: function validateBytecodeHash(bytes32 _bytecodeHash) internal pure { 62 function computeCreate2Address( 63 address _sender, 64 bytes32 _salt, 65 bytes32 _bytecodeHash, 66 bytes32 _constructorInputHash 67: ) internal pure returns (address) { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L21-L21), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L39-L39), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L60-L65) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 13: function uncheckedInc(uint256 _number) internal pure returns (uint256) { 19: function uncheckedAdd(uint256 _lhs, uint256 _rhs) internal pure returns (uint256) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L11-L11), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 21: function readUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32 result, uint256 offset) { 28: function readAddress(bytes memory _bytes, uint256 _start) internal pure returns (address result, uint256 offset) { 35: function readUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256 result, uint256 offset) { 42: function readBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32 result, uint256 offset) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 146: function _upgradeVerifier(address _newVerifier, VerifierParams calldata _verifierParams) internal { 154: function _setBaseSystemContracts(bytes32 _bootloaderHash, bytes32 _defaultAccountHash) internal { 163 function _setL2SystemContractUpgrade( 164 IMailbox.L2CanonicalTransaction calldata _l2ProtocolUpgradeTx, 165 bytes[] calldata _factoryDeps, 166 uint256 _newProtocolVersion 167: ) internal returns (bytes32) { 216: function _setNewProtocolVersion(uint256 _newProtocolVersion) internal { 236: function _setAllowList(IAllowList _newAllowList) internal { ``` *GitHub*: [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L144-L144), [154](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L152-L152), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L161-L165), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L214-L214), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L234-L234) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 30: function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) { 40: function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L28-L28), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L38-L38) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 88: function getDiamondStorage() internal pure returns (DiamondStorage storage diamondStorage) { 97: function diamondCut(DiamondCutData memory _diamondCut) internal { ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L86-L86), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L95-L95) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 18: function get(Uint32Map storage _map, uint256 _index) internal view returns (uint32 result) { 38 function set( 39 Uint32Map storage _map, 40 uint256 _index, 41 uint32 _value 42: ) internal { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L16-L16), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L36-L40) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 20 function calculateRoot( 21 bytes32[] calldata _path, 22 uint256 _index, 23 bytes32 _itemHash 24: ) internal pure returns (bytes32) { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L18-L22) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 37: function getFirstUnprocessedPriorityTx(Queue storage _queue) internal view returns (uint256) { 42: function getTotalPriorityTxs(Queue storage _queue) internal view returns (uint256) { 47: function getSize(Queue storage _queue) internal view returns (uint256) { 52: function isEmpty(Queue storage _queue) internal view returns (bool) { 57: function pushBack(Queue storage _queue, PriorityOperation memory _operation) internal { 66: function front(Queue storage _queue) internal view returns (PriorityOperation memory) { 74: function popFront(Queue storage _queue) internal returns (PriorityOperation memory priorityOperation) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L35-L35), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L40-L40), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L45-L45), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L50-L50), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L55-L55), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L64-L64), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L72-L72) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 20 function validateL1ToL2Transaction( 21 IMailbox.L2CanonicalTransaction memory _transaction, 22 bytes memory _encoded, 23 uint256 _priorityTxMaxGasLimit 24: ) internal pure { 50: function validateUpgradeTransaction(IMailbox.L2CanonicalTransaction memory _transaction) internal pure { 71 function getMinimalPriorityTransactionGasLimit( 72 uint256 _encodingLength, 73 uint256 _numberOfFactoryDependencies, 74 uint256 _l2GasPricePerPubdata 75: ) internal pure returns (uint256) { 112 function getTransactionBodyGasLimit( 113 uint256 _totalGasLimit, 114 uint256 _gasPricePerPubdata, 115 uint256 _encodingLength 116: ) internal pure returns (uint256 txBodyGasLimit) { 135 function getOverheadForTransaction( 136 uint256 _totalGasLimit, 137 uint256 _gasPricePerPubdata, 138 uint256 _encodingLength 139: ) internal pure returns (uint256 batchOverheadForTransaction) { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L18-L22), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L48-L48), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L69-L73), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L110-L114), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L133-L137) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 38: function keccak(bytes calldata _data) internal view returns (bytes32) { 47: function sha(bytes calldata _data) internal view returns (bytes32) { 60 function call( 61 uint256 _gas, 62 address _address, 63 uint256 _value, 64 bytes calldata _data, 65 bool _isSystem 66: ) internal returns (bytes memory returnData) { 76 function staticCall( 77 uint256 _gas, 78 address _address, 79 bytes calldata _data 80: ) internal view returns (bytes memory returnData) { 90 function delegateCall( 91 uint256 _gas, 92 address _address, 93 bytes calldata _data 94: ) internal returns (bytes memory returnData) { 107 function mimicCall( 108 uint256 _gas, 109 address _address, 110 bytes calldata _data, 111 address _whoToMimic, 112 bool _isConstructor, 113 bool _isSystem 114: ) internal returns (bytes memory returnData) { 126 function rawCall( 127 uint256 _gas, 128 address _address, 129 uint256 _value, 130 bytes calldata _data, 131 bool _isSystem 132: ) internal returns (bool success) { 161: function rawStaticCall(uint256 _gas, address _address, bytes calldata _data) internal view returns (bool success) { 175: function rawDelegateCall(uint256 _gas, address _address, bytes calldata _data) internal returns (bool success) { 193 function rawMimicCall( 194 uint256 _gas, 195 address _address, 196 bytes calldata _data, 197 address _whoToMimic, 198 bool _isConstructor, 199 bool _isSystem 200: ) internal returns (bool success) { 234: function propagateRevert() internal pure { ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L36-L36), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L45-L45), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L58-L64), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L74-L78), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L88-L92), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L105-L112), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L124-L130), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L159-L159), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L173-L173), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L191-L198), [234](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L232-L232) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 13: function encodeAddress(address _val) internal pure returns (bytes memory encoded) { 26: function encodeUint256(uint256 _val) internal pure returns (bytes memory encoded) { 51: function encodeNonSingleBytesLen(uint64 _len) internal pure returns (bytes memory) { 58: function encodeListLen(uint64 _len) internal pure returns (bytes memory) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L11-L11), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L24-L24), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L49-L49), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L56-L56) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 77: function toL1(bool _isService, bytes32 _key, bytes32 _value) internal { 92: function getCodeAddress() internal view returns (address addr) { 103: function loadCalldataIntoActivePtr() internal view { 114: function ptrPackIntoActivePtr(uint256 _farCallAbi) internal view { 123: function ptrAddIntoActive(uint32 _value) internal view { 135: function ptrShrinkIntoActive(uint32 _shrink) internal view { 153 function packPrecompileParams( 154 uint32 _inputMemoryOffset, 155 uint32 _inputMemoryLength, 156 uint32 _outputMemoryOffset, 157 uint32 _outputMemoryLength, 158 uint64 _perPrecompileInterpreted 159: ) internal pure returns (uint256 rawParams) { 177: function unsafePrecompileCall(uint256 _rawParams, uint32 _gasToBurn) internal view returns (bool success) { 191: function setValueForNextFarCall(uint128 _value) internal returns (bool success) { 204: function eventInitialize(uint256 initializer, uint256 value1) internal { 214: function eventWrite(uint256 value1, uint256 value2) internal { 225: function getZkSyncMetaBytes() internal view returns (uint256 meta) { 237: function extractNumberFromMeta(uint256 meta, uint256 offset, uint256 size) internal pure returns (uint256 result) { 248: function getGasPerPubdataByteFromMeta(uint256 meta) internal pure returns (uint32 gasPerPubdataByte) { 258: function getHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 heapSize) { 267: function getAuxHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 auxHeapSize) { 275: function getShardIdFromMeta(uint256 meta) internal pure returns (uint8 shardId) { 284: function getCallerShardIdFromMeta(uint256 meta) internal pure returns (uint8 callerShardId) { 293: function getCodeShardIdFromMeta(uint256 meta) internal pure returns (uint8 codeShardId) { 299: function getZkSyncMeta() internal view returns (ZkSyncMeta memory meta) { 314: function getCallFlags() internal view returns (uint256 callFlags) { 325: function getCalldataPtr() internal view returns (uint256 ptr) { 336: function getExtraAbiData(uint256 index) internal view returns (uint256 extraAbiData) { 347: function isSystemCall() internal view returns (bool) { 356: function isSystemContract(address _address) internal pure returns (bool) { 362: function burnGas(uint32 _gasToPay) internal view { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L75-L75), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L90-L90), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L101-L101), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L112-L112), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L121-L121), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L133-L133), [153](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L151-L157), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L175-L175), [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L189-L189), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L202-L202), [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L212-L212), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L223-L223), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L235-L235), [248](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L246-L246), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L256-L256), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L265-L265), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L273-L273), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L282-L282), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L291-L291), [299](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L297-L297), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L312-L312), [325](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L323-L323), [336](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L334-L334), [347](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L345-L345), [356](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L354-L354), [362](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L360-L360) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 78: function systemCall(uint32 gasLimit, address to, uint256 value, bytes memory data) internal returns (bool success) { 125 function systemCallWithReturndata( 126 uint32 gasLimit, 127 address to, 128 uint128 value, 129 bytes memory data 130: ) internal returns (bool success, bytes memory returnData) { 152 function systemCallWithPropagatedRevert( 153 uint32 gasLimit, 154 address to, 155 uint128 value, 156 bytes memory data 157: ) internal returns (bytes memory returnData) { 216 function getFarCallABI( 217 uint32 dataOffset, 218 uint32 memoryPage, 219 uint32 dataStart, 220 uint32 dataLength, 221 uint32 gasPassed, 222 uint8 shardId, 223 CalldataForwardingMode forwardingMode, 224 bool isConstructorCall, 225 bool isSystemCall 226: ) internal pure returns (uint256 farCallAbi) { 252 function getFarCallABIWithEmptyFatPointer( 253 uint32 gasPassed, 254 uint8 shardId, 255 CalldataForwardingMode forwardingMode, 256 bool isConstructorCall, 257 bool isSystemCall 258: ) internal pure returns (uint256 farCallAbiWithEmptyFatPtr) { ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L76-L76), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L123-L128), [152](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L150-L155), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L214-L224), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L250-L256) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 96: function isEthToken(uint256 _addr) internal pure returns (bool) { 102: function encodeHash(Transaction calldata _transaction) internal view returns (bytes32 resultHash) { 364: function processPaymasterInput(Transaction calldata _transaction) internal { 397: function payToTheBootloader(Transaction calldata _transaction) internal returns (bool success) { 407: function totalRequiredBalance(Transaction calldata _transaction) internal pure returns (uint256 requiredBalance) { ``` *GitHub*: [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L94-L94), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L100-L100), [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L362-L362), [397](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L395-L395), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L405-L405) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 21: function readUint16(bytes calldata _bytes, uint256 _start) internal pure returns (uint16 result) { 28: function readUint32(bytes calldata _bytes, uint256 _start) internal pure returns (uint32 result) { 35: function readUint64(bytes calldata _bytes, uint256 _start) internal pure returns (uint64 result) { 42: function readBytes32(bytes calldata _bytes, uint256 _start) internal pure returns (bytes32 result) { 48: function readUint256(bytes calldata _bytes, uint256 _start) internal pure returns (uint256 result) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 22: function safeCastToU128(uint256 _x) internal pure returns (uint128) { 28: function safeCastToU32(uint256 _x) internal pure returns (uint32) { 34: function safeCastToU24(uint256 _x) internal pure returns (uint24) { 41: function bytecodeLenInBytes(bytes32 _bytecodeHash) internal pure returns (uint256 codeLength) { 46: function bytecodeLenInWords(bytes32 _bytecodeHash) internal pure returns (uint256 codeLengthInWords) { 53: function isContractConstructed(bytes32 _bytecodeHash) internal pure returns (bool) { 58: function isContractConstructing(bytes32 _bytecodeHash) internal pure returns (bool) { 65: function constructingBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) { 73: function constructedBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) { 84: function hashL2Bytecode(bytes calldata _bytecode) internal view returns (bytes32 hashedBytecode) { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L20-L20), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L26-L26), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L32-L32), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L39-L39), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L44-L44), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L51-L51), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L56-L56), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L63-L63), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L71-L71), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L82-L82) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 38: function isContract(address account) internal view returns (bool) { 62: function sendValue(address payable recipient, uint256 amount) internal { 93 function functionCall(address target, bytes memory data) 94 internal 95 returns (bytes memory) 96: { 112 function functionCall( 113 address target, 114 bytes memory data, 115 string memory errorMessage 116: ) internal returns (bytes memory) { 131 function functionCallWithValue( 132 address target, 133 bytes memory data, 134 uint256 value 135: ) internal returns (bytes memory) { 151 function functionCallWithValue( 152 address target, 153 bytes memory data, 154 uint256 value, 155 string memory errorMessage 156: ) internal returns (bytes memory) { 179 function functionStaticCall(address target, bytes memory data) 180 internal 181 view 182 returns (bytes memory) 183: { 198 function functionStaticCall( 199 address target, 200 bytes memory data, 201 string memory errorMessage 202: ) internal view returns (bytes memory) { 219 function functionDelegateCall(address target, bytes memory data) 220 internal 221 returns (bytes memory) 222: { 237 function functionDelegateCall( 238 address target, 239 bytes memory data, 240 string memory errorMessage 241: ) internal returns (bytes memory) { 258 function verifyCallResultFromTarget( 259 address target, 260 bool success, 261 bytes memory returndata, 262 string memory errorMessage 263: ) internal view returns (bytes memory) { 282 function verifyCallResult( 283 bool success, 284 bytes memory returndata, 285 string memory errorMessage 286: ) internal pure returns (bytes memory) { ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L36-L36), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L60-L60), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L91-L94), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L110-L114), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L129-L133), [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L149-L154), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L177-L181), [198](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L196-L200), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L217-L220), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L235-L239), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L256-L261), [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L280-L284)
### [D‑04] ~~`selfbalance()` is cheaper than `address(this).balance`~~ Both methods use the [same amount](https://gist.github.com/IllIllI000/23eac38a9b6483167a92e52bb915faa1) of gas, so this finding is invalid *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 102: require(totalRequiredBalance <= address(this).balance, "Not enough balance for fee + value"); ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L100-L100) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 64: address(this).balance >= amount, 158: address(this).balance >= value, ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L62-L62), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L156-L156) ### [D‑05] ~~All interfaces used within a project should be imported~~ These contracts don't rely on other contracts for their definitions, so there's nothing to import *There are 54 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 8: interface IL1BridgeLegacy { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 8: interface IL2ERC20Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 16 library BridgeInitializationHelper { 17 /// @dev The L2 gas limit for requesting L1 -> L2 transaction of deploying L2 bridge instance. 18 /// @dev It is big enough to deploy any contract, so we can use the same value for all bridges. 19: /// NOTE: this constant will be accurately calculated in the future. ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L14-L17) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 11: abstract contract AllowListed { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 27 abstract contract ReentrancyGuard { 28 /// @dev Address of lock flag variable. 29 /// @dev Flag is placed at random memory location to not interfere with Storage contract. 30: // keccak256("ReentrancyGuard") - 1; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L25-L28) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 7 interface IAllowList { 8 /*////////////////////////////////////////////////////////////// 9 EVENTS 10 //////////////////////////////////////////////////////////////*/ 11 12: /// @notice Access mode of target contract is changed ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 11 interface IL2ContractDeployer { 12 /// @notice A struct that describes a forced deployment on an address. 13 /// @param bytecodeHash The bytecode hash to put on an address. 14 /// @param newAddress The address on which to deploy the bytecodehash to. 15 /// @param callConstructor Whether to run the constructor on the force deployment. 16 /// @param value The `msg.value` with which to initialize a contract. 17: /// @param input The constructor calldata. ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L9-L15) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 12 library L2ContractHelper { 13: /// @dev The prefix used to create CREATE2 addresses. ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L10-L11) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 12: library UncheckedMath { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 20: library UnsafeBytes { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 7 interface IGovernance { 8 /// @dev This enumeration includes the following states: 9 /// @param Unset Default state, indicating the operation has not been set. 10 /// @param Waiting The operation is scheduled but not yet ready to be executed. 11 /// @param Ready The operation is ready to be executed. 12: /// @param Done The operation has been successfully executed. ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 23: library AddressAliasHelper { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 12: contract DiamondProxy { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 13: library Diamond { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 8 library LibMap { 9: /// @dev A uint32 map in storage. ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L6-L7) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 11: library Merkle { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 22: library PriorityQueue { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 15 library TransactionValidator { 16 /// @dev Used to validate key properties of an L1->L2 transaction 17 /// @param _transaction The transaction to validate 18 /// @param _encoded The abi encoded bytes of the transaction 19: /// @param _priorityTxMaxGasLimit The max gas limit, generally provided from Storage.sol ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L13-L17) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4-L4) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 13: contract EmptyContract { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L11-L11) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11 interface IAccount { 12 /// @notice Called by the bootloader to validate that an account agrees to process the transaction 13 /// (and potentially pay for it). 14 /// @param _txHash The hash of the transaction to be used in the explorer 15 /// @param _suggestedSignedHash The hash of the transaction is signed by EOAs 16 /// @param _transaction The transaction itself 17 /// @return magic The magic value that should be equal to the signature of this function 18 /// if the user agrees to proceed with the transaction. 19 /// @dev The developer should strive to preserve as many steps as possible both for valid 20 /// and invalid transactions as this very method is also used during the gas fee estimation 21: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9-L19) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7 interface IContractDeployer { 8 /// @notice Defines the version of the account abstraction protocol 9 /// that a contract claims to follow. 10 /// - `None` means that the account is just a contract and it should never be interacted 11 /// with as a custom account 12: /// - `Version1` means that the account follows the first version of the account abstraction protocol ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37 interface IL1Messenger { 38 // Possibly in the future we will be able to track the messages sent to L1 with 39: // some hooks in the VM. For now, it is much easier to track them with L2 events. ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35-L37) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 15: interface INonceHolder { ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16 interface IPaymaster { 17 /// @dev Called by the bootloader to verify that the paymaster agrees to pay for the 18 /// fee for the transaction. This transaction should also send the necessary amount of funds onto the bootloader 19 /// address. 20 /// @param _txHash The hash of the transaction 21 /// @param _suggestedSignedHash The hash of the transaction that is signed by an EOA 22 /// @param _transaction The transaction itself. 23 /// @return magic The value that should be equal to the signature of the validateAndPayForPaymasterTransaction 24 /// if the paymaster agrees to pay for the transaction. 25 /// @return context The "context" of the transaction: an array of bytes of length at most 1024 bytes, which will be 26 /// passed to the `postTransaction` method of the account. 27 /// @dev The developer should strive to preserve as many steps as possible both for valid 28 /// and invalid transactions as this very method is also used during the gas fee estimation 29: /// (without some of the necessary data, e.g. signature). ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14-L27) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 14: interface IPaymasterFlow { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 12: interface ISystemContext { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 11: interface ISystemContextDeprecated { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 14 abstract contract ISystemContract { 15 /// @notice Modifier that makes sure that the method 16: /// can only be called via a system call. ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L12-L14) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 34 library EfficientCall { 35 /// @notice Call the `keccak256` without copying calldata to memory. 36 /// @param _data The preimage data. 37: /// @return The `keccak256` hash. ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L32-L35) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 12: library RLPEncoder { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 70 library SystemContractHelper { 71 /// @notice Send an L2Log to L1. 72 /// @param _isService The `isService` flag. 73 /// @param _key The `key` part of the L2Log. 74 /// @param _value The `value` part of the L2Log. 75 /// @dev The meaning of all these parameters is context-dependent, but they 76: /// have no intrinsic meaning per se. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L68-L74) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 70 library SystemContractsCaller { 71 /// @notice Makes a call with the `isSystem` flag. 72 /// @param gasLimit The gas limit for the call. 73 /// @param to The address to call. 74 /// @param value The value to pass with the transaction. 75 /// @param data The calldata. 76 /// @return success Whether the transaction has been successful. 77: /// @dev Note, that the `isSystem` flag can only be set when calling system contracts. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L68-L75) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 80: library TransactionHelper { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L78-L78) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 20: library UnsafeBytesCalldata { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L18-L18) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 13 library Utils { 14: /// @dev Bit mask of bytecode hash "isConstructor" marker ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L11-L12) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 11 library Address { 12 /** 13 * @dev Returns true if `account` is a contract. 14 * 15 * [IMPORTANT] 16 * ==== 17 * It is unsafe to assume that an address for which this function returns 18 * false is an externally-owned account (EOA) and not a contract. 19 * 20 * Among others, `isContract` will return false for the following 21 * types of addresses: 22 * 23 * - an externally-owned account 24 * - a contract in construction 25 * - an address where a contract will be created 26 * - an address where a contract lived, but was destroyed 27 * ==== 28 * 29 * [IMPORTANT] 30 * ==== 31 * You shouldn't rely on `isContract` to protect against flash loan attacks! 32 * 33 * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets 34 * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract 35 * constructor. 36 * ==== 37: */ ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L9-L35)
### [D‑06] ~~Array is `push()`ed but not `pop()`ed~~ These arrays have `pop()`s *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 199: ds.facets.push(_facet); 230: ds.facetToSelectors[_facet].selectors.push(_selector); ``` *GitHub*: [199](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L197-L197), [230](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L228-L228) ### [D‑07] ~~Array lengths not checked~~ These instances only have one array *There are 49 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 85 function initialize( 86 bytes[] calldata _factoryDeps, 87 address _l2TokenBeacon, 88 address _governor, 89 uint256 _deployBridgeImplementationFee, 90 uint256 _deployBridgeProxyFee 91: ) external payable reentrancyGuardInitializer { 257 function claimFailedDeposit( 258 address _depositSender, 259 address _l1Token, 260 bytes32 _l2TxHash, 261 uint256 _l2BatchNumber, 262 uint256 _l2MessageIndex, 263 uint16 _l2TxNumberInBatch, 264 bytes32[] calldata _merkleProof 265: ) external nonReentrant senderCanCallFunction(allowList) { 295 function finalizeWithdrawal( 296 uint256 _l2BatchNumber, 297 uint256 _l2MessageIndex, 298 uint16 _l2TxNumberInBatch, 299 bytes calldata _message, 300 bytes32[] calldata _merkleProof 301: ) external nonReentrant senderCanCallFunction(allowList) { ``` *GitHub*: [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L83-L89), [257](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L255-L263), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L293-L299) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 83 function initialize( 84 bytes[] calldata _factoryDeps, 85 address _l2WethAddress, 86 address _governor, 87 uint256 _deployBridgeImplementationFee, 88 uint256 _deployBridgeProxyFee 89: ) external payable reentrancyGuardInitializer { 216 function claimFailedDeposit( 217 address, // _depositSender, 218 address, // _l1Token, 219 bytes32, // _l2TxHash 220 uint256, // _l2BatchNumber, 221 uint256, // _l2MessageIndex, 222 uint16, // _l2TxNumberInBatch, 223 bytes32[] calldata // _merkleProof 224: ) external pure { 235 function finalizeWithdrawal( 236 uint256 _l2BatchNumber, 237 uint256 _l2MessageIndex, 238 uint16 _l2TxNumberInBatch, 239 bytes calldata _message, 240 bytes32[] calldata _merkleProof 241: ) external nonReentrant senderCanCallFunction(allowList) { ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L81-L87), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L214-L222), [235](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L233-L239) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 32 function claimFailedDeposit( 33 address _depositSender, 34 address _l1Token, 35 bytes32 _l2TxHash, 36 uint256 _l2BatchNumber, 37 uint256 _l2MessageIndex, 38 uint16 _l2TxNumberInBatch, 39 bytes32[] calldata _merkleProof 40: ) external; 42 function finalizeWithdrawal( 43 uint256 _l2BatchNumber, 44 uint256 _l2MessageIndex, 45 uint16 _l2TxNumberInBatch, 46 bytes calldata _message, 47 bytes32[] calldata _merkleProof 48: ) external; ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L30-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L40-L46) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 32 function requestDeployTransaction( 33 IZkSync _zkSync, 34 uint256 _deployTransactionFee, 35 bytes32 _bytecodeHash, 36 bytes memory _constructorData, 37 bytes[] memory _factoryDeps 38: ) internal returns (address deployedAddress) { ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L30-L36) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 27: function forceDeployOnAddresses(ForceDeployment[] calldata _deployParams) external; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 226: function _execute(Call[] calldata _calls) internal { ``` *GitHub*: [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L224-L224) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 163 function _setL2SystemContractUpgrade( 164 IMailbox.L2CanonicalTransaction calldata _l2ProtocolUpgradeTx, 165 bytes[] calldata _factoryDeps, 166 uint256 _newProtocolVersion 167: ) internal returns (bytes32) { ``` *GitHub*: [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L161-L165) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 79 function commitBatches( 80 StoredBatchInfo calldata, 81 CommitBatchInfo[] calldata _newBatchesData 82: ) external onlyValidator { 105 function proveBatches( 106 StoredBatchInfo calldata, 107 StoredBatchInfo[] calldata, 108 ProofInput calldata 109: ) external onlyValidator { 115: function executeBatches(StoredBatchInfo[] calldata _newBatchesData) external onlyValidator { ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L77-L80), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L103-L107), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L113-L113) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 179 function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 180 external 181 override 182 nonReentrant 183 onlyValidator 184: { 207 function _commitBatchesWithoutSystemContractsUpgrade( 208 StoredBatchInfo memory _lastCommittedBatchData, 209 CommitBatchInfo[] calldata _newBatchesData 210: ) internal { 227 function _commitBatchesWithSystemContractsUpgrade( 228 StoredBatchInfo memory _lastCommittedBatchData, 229 CommitBatchInfo[] calldata _newBatchesData, 230 bytes32 _systemContractUpgradeTxHash 231: ) internal { 293: function executeBatches(StoredBatchInfo[] calldata _batchesData) external nonReentrant onlyValidator { 313 function proveBatches( 314 StoredBatchInfo calldata _prevBatch, 315 StoredBatchInfo[] calldata _committedBatches, 316 ProofInput calldata _proof 317: ) external nonReentrant onlyValidator { ``` *GitHub*: [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L177-L182), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L205-L208), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L225-L229), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L291-L291), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L311-L315) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 51 function proveL2MessageInclusion( 52 uint256 _batchNumber, 53 uint256 _index, 54 L2Message memory _message, 55 bytes32[] calldata _proof 56: ) public view returns (bool) { 66 function proveL2LogInclusion( 67 uint256 _batchNumber, 68 uint256 _index, 69 L2Log memory _log, 70 bytes32[] calldata _proof 71: ) external view returns (bool) { 84 function proveL1ToL2TransactionStatus( 85 bytes32 _l2TxHash, 86 uint256 _l2BatchNumber, 87 uint256 _l2MessageIndex, 88 uint16 _l2TxNumberInBatch, 89 bytes32[] calldata _merkleProof, 90 TxStatus _status 91: ) public view override returns (bool) { 125 function _proveL2LogInclusion( 126 uint256 _batchNumber, 127 uint256 _index, 128 L2Log memory _log, 129 bytes32[] calldata _proof 130: ) internal view returns (bool) { 194 function finalizeEthWithdrawal( 195 uint256 _l2BatchNumber, 196 uint256 _l2MessageIndex, 197 uint16 _l2TxNumberInBatch, 198 bytes calldata _message, 199 bytes32[] calldata _merkleProof 200: ) external override nonReentrant senderCanCallFunction(s.allowList) { 238 function requestL2Transaction( 239 address _contractL2, 240 uint256 _l2Value, 241 bytes calldata _calldata, 242 uint256 _l2GasLimit, 243 uint256 _l2GasPerPubdataByteLimit, 244 bytes[] calldata _factoryDeps, 245 address _refundRecipient 246: ) external payable nonReentrant senderCanCallFunction(s.allowList) returns (bytes32 canonicalTxHash) { 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291 uint256 _l2GasPerPubdataByteLimit, 292 bytes[] calldata _factoryDeps, 293 bool _isFree, 294 address _refundRecipient 295: ) internal returns (bytes32 canonicalTxHash) { 331 function _serializeL2Transaction( 332 WritePriorityOpParams memory _priorityOpParams, 333 bytes calldata _calldata, 334 bytes[] calldata _factoryDeps 335: ) internal pure returns (L2CanonicalTransaction memory transaction) { 358 function _writePriorityOp( 359 WritePriorityOpParams memory _priorityOpParams, 360 bytes calldata _calldata, 361 bytes[] calldata _factoryDeps 362: ) internal returns (bytes32 canonicalTxHash) { 390 function _hashFactoryDeps(bytes[] calldata _factoryDeps) 391 internal 392 pure 393 returns (uint256[] memory hashedFactoryDeps) 394: { ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L49-L54), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L64-L69), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L82-L89), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L123-L128), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L192-L198), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L236-L244), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L293), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L329-L333), [358](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L356-L360), [390](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L388-L392) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 81 function commitBatches(StoredBatchInfo calldata _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 82: external; 84 function proveBatches( 85 StoredBatchInfo calldata _prevBatch, 86 StoredBatchInfo[] calldata _committedBatches, 87 ProofInput calldata _proof 88: ) external; 90: function executeBatches(StoredBatchInfo[] calldata _batchesData) external; ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L79-L80), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L82-L86), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L88-L88) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 91 function proveL2MessageInclusion( 92 uint256 _l2BatchNumber, 93 uint256 _index, 94 L2Message calldata _message, 95 bytes32[] calldata _proof 96: ) external view returns (bool); 98 function proveL2LogInclusion( 99 uint256 _l2BatchNumber, 100 uint256 _index, 101 L2Log memory _log, 102 bytes32[] calldata _proof 103: ) external view returns (bool); 105 function proveL1ToL2TransactionStatus( 106 bytes32 _l2TxHash, 107 uint256 _l2BatchNumber, 108 uint256 _l2MessageIndex, 109 uint16 _l2TxNumberInBatch, 110 bytes32[] calldata _merkleProof, 111 TxStatus _status 112: ) external view returns (bool); 114 function finalizeEthWithdrawal( 115 uint256 _l2BatchNumber, 116 uint256 _l2MessageIndex, 117 uint16 _l2TxNumberInBatch, 118 bytes calldata _message, 119 bytes32[] calldata _merkleProof 120: ) external; 122 function requestL2Transaction( 123 address _contractL2, 124 uint256 _l2Value, 125 bytes calldata _calldata, 126 uint256 _l2GasLimit, 127 uint256 _l2GasPerPubdataByteLimit, 128 bytes[] calldata _factoryDeps, 129 address _refundRecipient 130: ) external payable returns (bytes32 canonicalTxHash); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L89-L94), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L96-L101), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L103-L110), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L112-L118), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120-L128) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 127 function _addFunctions( 128 address _facet, 129 bytes4[] memory _selectors, 130 bool _isFacetFreezable 131: ) private { 151 function _replaceFunctions( 152 address _facet, 153 bytes4[] memory _selectors, 154 bool _isFacetFreezable 155: ) private { 175: function _removeFunctions(address _facet, bytes4[] memory _selectors) private { ``` *GitHub*: [127](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L125-L129), [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L149-L153), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L173-L173) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 20 function calculateRoot( 21 bytes32[] calldata _path, 22 uint256 _index, 23 bytes32 _itemHash 24: ) internal pure returns (bytes32) { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L18-L22) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 9 function finalizeWithdrawal( 10 uint256 _l2BatchNumber, 11 uint256 _l2MessageIndex, 12 uint16 _l2TxNumberInBatch, 13 bytes calldata _message, 14 bytes32[] calldata _merkleProof 15: ) external; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L7-L13) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 240: function forceDeployOnAddresses(ForceDeployment[] calldata _deployments) external payable { ``` *GitHub*: [240](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L238-L238) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 36: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external override { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L34-L34) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 30: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external onlyCallFromBootloader { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L28-L28) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 15: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 10: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 8 function finalizeEthWithdrawal( 9 uint256 _l2BatchNumber, 10 uint256 _l2MessageIndex, 11 uint16 _l2TxNumberInBlock, 12 bytes calldata _message, 13 bytes32[] calldata _merkleProof 14: ) external; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L6-L12)
### [D‑08] ~~Assembly blocks should have comments~~ These blocks already have comments *There are 9 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 35 assembly { 36 // The pointer to the free memory slot 37 let ptr := mload(0x40) 38 // Copy function signature and arguments from calldata at zero position into memory at pointer position 39 calldatacopy(ptr, 0, calldatasize()) 40 // Delegatecall method of the implementation contract returns 0 on error 41 let result := delegatecall(gas(), facetAddress, ptr, calldatasize(), 0, 0) 42 // Get the size of the last return data 43 let size := returndatasize() 44 // Copy the size length of bytes from return data at zero position to pointer position 45 returndatacopy(ptr, 0, size) 46 // Depending on the result value 47 switch result 48 case 0 { 49 // End execution and revert state changes 50 revert(ptr, size) 51 } 52 default { 53 // Return data with length of size at pointers position 54 return(ptr, size) 55 } 56: } ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L33-L54) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 136 assembly { 137 // Copy function signature and arguments from calldata at zero position into memory at pointer position 138 calldatacopy(0, 0, calldatasize()) 139 // Call method of the zkSync contract returns 0 on error 140 let result := call(gas(), contractAddress, 0, 0, calldatasize(), 0, 0) 141 // Get the size of the last return data 142 let size := returndatasize() 143 // Copy the size length of bytes from return data at zero position to pointer position 144 returndatacopy(0, 0, size) 145 // Depending on the result value 146 switch result 147 case 0 { 148 // End execution and revert state changes 149 revert(0, size) 150 } 151 default { 152 // Return data with length of size at pointers position 153 return(0, size) 154 } 155: } ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L134-L153) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 205 assembly { 206 // Clearing values before usage in assembly, since Solidity 207 // doesn't do it by default 208 _whoToMimic := and(_whoToMimic, cleanupMask) 209 210 success := call(_address, callAddr, 0, 0, _whoToMimic, 0, 0) 211: } ``` *GitHub*: [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L203-L209) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 18 assembly { 19 // In the first byte we write the encoded length as 0x80 + 0x14 == 0x94. 20 mstore(add(encoded, 0x20), 0x9400000000000000000000000000000000000000000000000000000000000000) 21 // Write address data without stripping zeros. 22 mstore(add(encoded, 0x21), shiftedVal) 23: } ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L16-L21) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 79 assembly { 80 // Ensuring that the type is bool 81 _isService := and(_isService, 1) 82 // This `success` is always 0, but the method always succeeds 83 // (except for the cases when there is not enough gas) 84 let success := call(_isService, callAddr, _key, _value, 0xFFFF, 0, 0) 85: } 126 assembly { 127 // Clearing input params as they are not cleaned by Solidity by default 128 _value := and(_value, cleanupMask) 129 pop(staticcall(_value, callAddr, 0, 0xFFFF, 0, 0)) 130: } 138 assembly { 139 // Clearing input params as they are not cleaned by Solidity by default 140 _shrink := and(_shrink, cleanupMask) 141 pop(staticcall(_shrink, callAddr, 0, 0xFFFF, 0, 0)) 142: } 181 assembly { 182 // Clearing input params as they are not cleaned by Solidity by default 183 _gasToBurn := and(_gasToBurn, cleanupMask) 184 success := staticcall(_rawParams, callAddr, _gasToBurn, 0xFFFF, 0, 0) 185: } 194 assembly { 195 // Clearing input params as they are not cleaned by Solidity by default 196 _value := and(_value, cleanupMask) 197 success := call(0, callAddr, _value, 0, 0xFFFF, 0, 0) 198: } ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L77-L83), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L124-L128), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L136-L140), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L179-L183), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L192-L196) ### [D‑09] ~~Avoid fetching a low-level call's return data by using assembly~~ The return data is in fact used, so assembly provides no gas savings *There are 13 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 243: (, bytes memory data1) = _token.staticcall(abi.encodeCall(IERC20Metadata.name, ())); 244: (, bytes memory data2) = _token.staticcall(abi.encodeCall(IERC20Metadata.symbol, ())); 245: (, bytes memory data3) = _token.staticcall(abi.encodeCall(IERC20Metadata.decimals, ())); ``` *GitHub*: [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L241-L241), [244](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L242-L242), [245](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L243-L243) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 228: (bool success, bytes memory returnData) = _calls[i].target.call{value: _calls[i].value}(_calls[i].data); ``` *GitHub*: [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L226-L226) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 290: (bool success, bytes memory data) = _init.delegatecall(_calldata); ``` *GitHub*: [290](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L288-L288) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 83: (bool success, ) = msg.sender.call{value: _amount}(""); 108: (bool success, ) = _to.call{value: _amount}(""); ``` *GitHub*: [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L81-L81), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L106-L106) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 27: (bool success, bytes memory returnData) = _delegateTo.delegatecall(_calldata); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L25-L25) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 44: (bool success, ) = address(ETH_TOKEN_SYSTEM_CONTRACT).call( ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L42-L42) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 68: (bool success, ) = recipient.call{value: amount}(""); 161: (bool success, bytes memory returndata) = target.call{value: value}( 203: (bool success, bytes memory returndata) = target.staticcall(data); 242: (bool success, bytes memory returndata) = target.delegatecall(data); ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L66-L66), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L159-L159), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L201-L201), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L240-L240)
### [D‑10] ~~Bad bot rules~~ The titles below correspond to issues submitted by various bots, where the submitting bot solely submitted invalid findings (i.e. the submitter didn't filter the results of the rule), so they should be given extra scrutiny: - **Max allowance is not compatible with all tokens** - internal approval for the contract's own balance, so the rule is pointing to the support **for** max allowance - **increase/decrease allowance should be used instead of approve** - this is an internal approval function - **Must approve or increase allowance first** - the rule is flagging all transferFrom() calls, without approval logic - **Contract existence is not checked before low level call** - reading calldata, not making an external call - **Empty function blocks** - the bot's removed the extensive comment documentation in the 'code blocks' it shows for these virtual functions used to allow child contracts to implement functionality, or are constructors - **Utility contracts can be made into libraries** - all provided examples are invalid - **Address values should be used through variables rather than used as literals** - none of the examples are of addresses - **Employ Explicit Casting to Bytes or Bytes32 for Enhanced Code Clarity and Meaning** - the large majority of the examples are of multiple arguments, not just one - **Some if-statement can be converted to a ternary** - you can't use a ternary when only one of the branches is a `return` - **Addresses shouldn't be hard-coded** - none of these are addresses - **State variables used within a function more than once should be cached to save gas** - none of these are state variables - **Use storage instead of memory for structs/arrays** - these all are array call arguments, not arrays copied from storage - **Use bitmap to save gas** - none of these are examples where bitmaps can be used - **Consider merging sequential for loops** - the examples cannot be merged - **Emitting storage values instead of the memory one.** - this is a gas finding, not a Low one - **`selfbalance()` is cheaper than `address(this).balance`** - some bots submit the issue twice (under the heading `Use assembly when getting a contractundefineds balance of ETH`) - **Imports could be organized more systematically** - a lot of bots are blindly checking for interfaces not coming first. That is not the only way of organizing imports, and most projects are doing it in a systematic, valid, way - **Unused * definition** - some bots are reporting false positives for these rules. Check that it isn't used, or that if it's used, that there are two definitions, with one being unused - **`internal` functions not called by the contract should be removed** - some bots are reporting false positives when the function is called by a child contract, rather than the defining contract - **Change `public` to `external` for functions that are not called internally** - some bots are reporting false positives when the function is called by a child contract, rather than the defining contract - **Avoid contract existence checks by using low level calls** - at least one bot isn't checking that the version is prior to 0.8.10 - **For Operations that will not overflow, you could use unchecked** - at least one bot is flagging every single line, which has nothing to do with using `unchecked` Some of these have been raised as invalid in multiple contests, and the bot owners have not fixed them. Without penalties, they're unlikely to make any changes *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L1-L1) ### [D‑11] ~~Cast to `bytes` or `bytes32` for clearer semantic meaning~~ These calls to `abi.encodePacked()` have more than one argument *There are 9 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 377 abi.encodePacked( 378 _prevBatchCommitment, 379 _currentBatchCommitment, 380 _verifierParams.recursionNodeLevelVkHash, 381 _verifierParams.recursionLeafLevelVkHash 382: ) 429 abi.encodePacked( 430 _batch.indexRepeatedStorageChanges, 431 _batch.newStateRoot, 432 uint64(0), // index repeated storage changes in zkPorter 433 bytes32(0) // zkPorter batch hash 434: ); 438: return abi.encodePacked(s.zkPorterIsAvailable, s.l2BootloaderBytecodeHash, s.l2DefaultAccountBytecodeHash); ``` *GitHub*: [377](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L375-L380), [429](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L427-L432), [438](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L436-L436) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 134: abi.encodePacked(_log.l2ShardId, _log.isService, _log.txNumberInBatch, _log.sender, _log.key, _log.value) ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L132-L132) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 129: return abi.encodePacked(IL1Bridge.finalizeWithdrawal.selector, _to, _l1Token, _amount); ``` *GitHub*: [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L127-L127) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 102 abi.encodePacked( 103 _l2ToL1Log.l2ShardId, 104 _l2ToL1Log.isService, 105 _l2ToL1Log.txNumberInBlock, 106 _l2ToL1Log.sender, 107 _l2ToL1Log.key, 108 _l2ToL1Log.value 109: ) ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L100-L107) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 115: return abi.encodePacked(IMailbox.finalizeEthWithdrawal.selector, _to, _amount); 125: return abi.encodePacked(IMailbox.finalizeEthWithdrawal.selector, _to, _amount, _sender, _additionalData); ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L113-L113), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L123-L123) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 144: return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L142-L142) ### [D‑12] ~~Change `public` function visibility to `external` to save gas~~ Both `public` and `external` functions use the same amount of gas (both deployment and runtime gas), so this finding is invalid *There are 9 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 355: function l2TokenAddress(address _l1Token) public view returns (address) { ``` *GitHub*: [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L353-L353) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 168 function l2TransactionBaseCost( 169 uint256 _gasPrice, 170 uint256 _l2GasLimit, 171 uint256 _l2GasPerPubdataByteLimit 172: ) public pure returns (uint256) { ``` *GitHub*: [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L166-L170) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 42: function extendedAccountVersion(address _address) public view returns (AccountAbstractionVersion) { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L40-L40) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 59: function getRawNonce(address _address) public view returns (uint256) { 67: function increaseMinNonce(uint256 _value) public onlySystemCall returns (uint256 oldMinNonce) { 84: function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 104: function getValueUnderNonce(uint256 _key) public view returns (uint256) { ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L57-L57), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L65-L65), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82-L82), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L102-L102) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 163: function getBlockNumber() public view returns (uint128) { 171: function getBlockTimestamp() public view returns (uint128) { ``` *GitHub*: [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L161-L161), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L169-L169) ### [D‑13] ~~Constant redefined elsewhere~~ It's perfectly reasonable to split constants across multiple files, as long as they're appropriately scoped and not duplicated. This is especially true if the constants are members of libraries, which is the case for these constants. *There are 10 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 20: uint256 constant DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT = 10000000; 23: uint256 constant REQUIRED_L2_GAS_PRICE_PER_PUBDATA = 800; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L18-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 14: bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2"); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L12-L12) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 24: uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L22-L22) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 19 bytes32 constant DIAMOND_INIT_SUCCESS_RETURN_VALUE = 20: 0x33774e659306e47509050e97cb651e731180a42d458212294d30751925c551a2; // keccak256("diamond.zksync.init") - 1 23: bytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b; // keccak256("diamond.standard.diamond.storage") - 1; ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L17-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 84: bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId)"); 86 bytes32 constant EIP712_TRANSACTION_TYPE_HASH = 87 keccak256( 88 "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 89: ); ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L82-L82), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L84-L87) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 15 bytes32 constant IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK = 16: 0x00ff000000000000000000000000000000000000000000000000000000000000; 19 bytes32 constant SET_IS_CONSTRUCTOR_MARKER_BIT_MASK = 20: 0x0001000000000000000000000000000000000000000000000000000000000000; ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L13-L14), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L17-L18) ### [D‑14] ~~Contracts containing only utility functions should be made into libraries~~ Cannot be converted to a library because it has state variables *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 11: abstract contract AllowListed { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 16: contract Base is ReentrancyGuard, AllowListed { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L14-L14) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 14 abstract contract ISystemContract { 15 /// @notice Modifier that makes sure that the method 16: /// can only be called via a system call. ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L12-L14) ### [D‑15] ~~Contracts do not work with fee-on-transfer tokens~~ An ERC20 token being used, in and of itself, is not evidence of a fee-on-transfer issue; there must be other evidence that the balance accounting gets broken, and these lines do not contain such evidence. *There are 14 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 118: IL2ERC20Bridge.initialize, 187: uint256 amount = _depositFunds(msg.sender, IERC20(_l1Token), _amount); 233: bytes memory gettersData = _getERC20Getters(_l1Token); 243: (, bytes memory data1) = _token.staticcall(abi.encodeCall(IERC20Metadata.name, ())); 244: (, bytes memory data2) = _token.staticcall(abi.encodeCall(IERC20Metadata.symbol, ())); 245: (, bytes memory data3) = _token.staticcall(abi.encodeCall(IERC20Metadata.decimals, ())); ``` *GitHub*: [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L116-L116), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L185-L185), [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L231-L231), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L241-L241), [244](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L242-L242), [245](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L243-L243) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 97: L2StandardERC20(address(l2Token)).bridgeInitialize(_l1Token, _data); ``` *GitHub*: [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L95-L95) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 86: __ERC20_init_unchained(decodedName, decodedSymbol); 89: __ERC20Permit_init(decodedName); ``` *GitHub*: [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L84-L84), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L87-L87) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 43: __ERC20_init_unchained(name_, symbol_); 46: __ERC20Permit_init(name_); ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L41-L41), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L44-L44) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 379: uint256 currentAllowance = IERC20(token).allowance(address(this), paymaster); 384: IERC20(token).safeApprove(paymaster, 0); 385: IERC20(token).safeApprove(paymaster, minAllowance); ``` *GitHub*: [379](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L377-L377), [384](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L382-L382), [385](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L383-L383) ### [D‑16] ~~Default `bool` values are manually reset~~ Using delete instead of assigning zero/false to state variables does not save any extra gas with the optimizer [on](https://gist.github.com/IllIllI000/ef8ec3a70aede7f12433fe63dc418515#with-the-optimizer-set-at-200-runs) (saves 5-8 gas with optimizer completely off), so this finding is invalid, especially since if they were interested in gas savings, they'd have the optimizer enabled. Some bots are also flagging `true` rather than just `false` *There are 8 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 317: isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex] = true; ``` *GitHub*: [317](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L315-L315) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 267: isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex] = true; ``` *GitHub*: [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L265-L265) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 115: diamondStorage.isFrozen = true; 126: diamondStorage.isFrozen = false; ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L113-L113), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L124-L124) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 214: s.isEthWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex] = true; ``` *GitHub*: [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L212-L212) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 76: getters.ignoreName = true; 82: getters.ignoreSymbol = true; 95: getters.ignoreDecimals = true; ``` *GitHub*: [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L74-L74), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L80-L80), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L93-L93) ### [D‑17] ~~Duplicated `require()`/`revert()` checks should be refactored to a modifier or function~~ This instance appears only once *There are 280 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 92: require(_l2TokenBeacon != address(0), "nf"); 93: require(_governor != address(0), "nh"); 95: require(_factoryDeps.length == 3, "mk"); 97: require(msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, "fee"); 186: require(_amount != 0, "2T"); // empty deposit amount 188: require(amount == _amount, "1T"); // The token has non-standard transfer logic 274: require(proofValid, "yn"); 277: require(amount > 0, "y1"); 302: require(!isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "pw"); 314: require(success, "nq"); 331: require(_l2ToL1message.length == 76, "kk"); 334: require(bytes4(functionSignature) == this.finalizeWithdrawal.selector, "nt"); 349: require(totalDepositedAmountPerUser[_l1Token][_depositor] + _amount <= limitData.depositCap, "d1"); ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L91), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L93), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L95), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L184), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L186), [274](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L272), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L275), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L300), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L312), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L329), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L332), [349](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L347) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 90: require(_l2WethAddress != address(0), "L2 WETH address cannot be zero"); 91: require(_governor != address(0), "Governor address cannot be zero"); 92: require(_factoryDeps.length == 2, "Invalid factory deps length provided"); 93 require( 94 msg.value == _deployBridgeImplementationFee + _deployBridgeProxyFee, 95 "Miscalculated deploy transactions fees" 96: ); 169: require(_l1Token == l1WethAddress, "Invalid L1 token address"); 170: require(_amount != 0, "Amount cannot be zero"); 225: revert("Method not supported. Failed deposit funds are sent to the L2 refund recipient address."); 242: require(!isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "Withdrawal is already finalized"); 256: require(success, "vq"); 281: require(_message.length == 96, "Incorrect ETH message with additional data length"); 284 require( 285 bytes4(functionSignature) == IMailbox.finalizeEthWithdrawal.selector, 286 "Incorrect ETH message function selector" 287: ); 291: require(l1EthReceiver == address(this), "Wrong L1 ETH withdraw receiver"); 297: require(l2Sender == l2Bridge, "The withdrawal was not initiated by L2 bridge"); 313: require(msg.sender == l1WethAddress || msg.sender == address(zkSync), "pn"); ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L88), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L89), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L90), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L91-L94), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L167), [170](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L168), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L223), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L240), [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L254), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L282-L285), [291](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L289), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L295), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L311) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 62: require(targetsLength == _accessModes.length, "yg"); // The size of arrays should be equal 94: require(callersLength == _targets.length, "yw"); 95: require(callersLength == _functionSigs.length, "yx"); 96: require(callersLength == _enables.length, "yy"); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L60), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L92), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L94) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 15: require(_allowList.canCall(msg.sender, address(this), msg.sig), "nr"); ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L13) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 60: require(lockSlotOldValue == 0, "1B"); 77: require(_status == _NOT_ENTERED, "r1"); ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L58), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L75) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 25: require(_bytecode.length % 32 == 0, "pq"); 28: require(bytecodeLenInWords < 2**16, "pp"); // bytecode length must be less than 2^16 words 29: require(bytecodeLenInWords % 2 == 1, "ps"); // bytecode length in words must be odd 43: require(version == 1 && _bytecodeHash[1] == bytes1(0), "zf"); // Incorrectly formatted bytecodeHash 45: require(_bytecodeLen(_bytecodeHash) % 2 == 1, "uy"); // Code length in words must be odd ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L23), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L26), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L27), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L41), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L43) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 44: require(_admin != address(0), "Admin should be non zero address"); 61: require(msg.sender == address(this), "Only governance contract itself allowed to call this function"); 67: require(msg.sender == securityCouncil, "Only security council allowed to call this function"); 73 require( 74 msg.sender == owner() || msg.sender == securityCouncil, 75 "Only the owner and security council are allowed to call this function" 76: ); 157: require(isOperationPending(_id), "Operation must be pending"); 174: require(isOperationReady(id), "Operation must be ready before execution"); 179: require(isOperationReady(id), "Operation must be ready after execution"); 193: require(isOperationPending(id), "Operation must be pending before execution"); 198: require(isOperationPending(id), "Operation must be pending after execution"); 218: require(!isOperation(_id), "Operation with this proposal id already exists"); 219: require(_delay >= minDelay, "Proposed delay is less than minimum delay"); 242: require(_predecessorId == bytes32(0) || isOperationDone(_predecessorId), "Predecessor operation not completed"); ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L42), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L59), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L65), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L71-L74), [157](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L155), [174](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L172), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L177), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L191), [198](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L196), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L216), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L217), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L240) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 74: require(block.timestamp >= _proposedUpgrade.upgradeTimestamp, "Upgrade is not ready yet"); 173: require(_l2ProtocolUpgradeTx.txType == SYSTEM_UPGRADE_L2_TX_TYPE, "L2 system upgrade tx type is wrong"); 187 require( 188 _l2ProtocolUpgradeTx.nonce == _newProtocolVersion, 189 "The new protocol version should be included in the L2 system upgrade tx" 190: ); 203: require(_factoryDeps.length == _expectedHashes.length, "Wrong number of factory deps"); 204: require(_factoryDeps.length <= MAX_NEW_FACTORY_DEPS, "Factory deps can be at most 32"); 207 require( 208 L2ContractHelper.hashL2Bytecode(_factoryDeps[i]) == bytes32(_expectedHashes[i]), 209 "Wrong factory dep hash" 210: ); 218 require( 219 _newProtocolVersion > previousProtocolVersion, 220 "New protocol version is not greater than the current one" 221: ); 224: require(s.l2SystemContractsUpgradeTxHash == bytes32(0), "Previous upgrade has not been finalized"); 225 require( 226 s.l2SystemContractsUpgradeBatchNumber == 0, 227 "The batch number of the previous upgrade has not been cleaned" 228: ); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L72), [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L171), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L185-L188), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L201), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L202), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L205-L208), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L216-L219), [224](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L222), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L223-L226) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 58: require(address(_initalizeData.verifier) != address(0), "vt"); 59: require(_initalizeData.governor != address(0), "vy"); 60: require(_initalizeData.admin != address(0), "hc"); 61: require(_initalizeData.priorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "vu"); ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L59) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 16: require(_chainId == block.chainid, "pr"); 27: require(msg.data.length >= 4 || msg.data.length == 0, "Ut"); 32: require(facetAddress != address(0), "F"); // Proxy has no facet for this selector 33: require(!diamondStorage.isFrozen || !facet.isFreezable, "q1"); // Facet is frozen ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L14), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L30), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 68: require(msg.sender == validator, "8h"); 125: require(block.timestamp >= commitBatchTimestamp + delay, "5c"); // The delay is not passed ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L66), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 33: require(msg.sender == pendingGovernor, "n4"); // Only proposed by current governor address can claim the governor rights 57: require(msg.sender == pendingAdmin, "n4"); // Only proposed by current admin address can claim the admin rights 86: require(_newPriorityTxMaxGasLimit <= L2_TX_MAX_GAS_LIMIT, "n5"); 114: require(!diamondStorage.isFrozen, "a9"); // diamond proxy is frozen already 125: require(diamondStorage.isFrozen, "a7"); // diamond proxy is not frozen ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L31), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L55), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L84), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L112), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 21: require(msg.sender == s.governor, "1g"); // only by governor 27: require(msg.sender == s.governor || msg.sender == s.admin, "Only by governor or admin"); 33: require(s.validators[msg.sender], "1h"); // validator is not active ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L19), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L25), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L31) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 34: require(_newBatch.batchNumber == _previousBatch.batchNumber + 1, "f"); // only commit next batch 47: require(_previousBatch.batchHash == previousBatchHash, "l"); 49: require(expectedPriorityOperationsHash == _newBatch.priorityOperationsHash, "t"); 51: require(expectedNumberOfLayer1Txs == _newBatch.numberOfLayer1Txs, "ta"); 83: require(batchTimestamp == _expectedBatchTimestamp, "tb"); 87: require(_previousBatchTimestamp < batchTimestamp, "h3"); 95: require(block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER <= batchTimestamp, "h1"); // New batch timestamp is too small 96: require(lastL2BlockTimestamp <= block.timestamp + COMMIT_TIMESTAMP_APPROXIMATION_DELTA, "h2"); // The last L2 block timestamp is too big 132: require(!_checkBit(processedLogs, uint8(logKey)), "kp"); 137: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lm"); 140: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "ln"); 141: require(providedL2ToL1PubdataHash == logValue, "wp"); 143: require(logSender == L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, "lb"); 146: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sc"); 149: require(logSender == L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, "sv"); 152: require(logSender == L2_BOOTLOADER_ADDRESS, "bl"); 155: require(logSender == L2_BOOTLOADER_ADDRESS, "bk"); 158: require(logSender == L2_BOOTLOADER_ADDRESS, "bu"); 159: require(_expectedSystemContractUpgradeTxHash == logValue, "ut"); 161: revert("ul"); 169: require(processedLogs == 127, "b7"); 171: require(processedLogs == 255, "b8"); 186: require(s.storedBatchHashes[s.totalBatchesCommitted] == _hashStoredBatchInfo(_lastCommittedBatchData), "i"); // incorrect previous batch data 187: require(_newBatchesData.length > 0, "No batches to commit"); 238: require(s.l2SystemContractsUpgradeBatchNumber == 0, "ik"); 277: require(currentBatchNumber == s.totalBatchesExecuted + _executedBatchIdx + 1, "k"); // Execute batches in order 278 require( 279 _hashStoredBatchInfo(_storedBatch) == s.storedBatchHashes[currentBatchNumber], 280 "exe10" // executing batch should be committed 281: ); 284: require(priorityOperationsHash == _storedBatch.priorityOperationsHash, "x"); // priority operations hash does not match to expected 302: require(newTotalBatchesExecuted <= s.totalBatchesVerified, "n"); // Can't execute batches more than committed and proven currently. 329: require(_hashStoredBatchInfo(_prevBatch) == s.storedBatchHashes[currentTotalBatchesVerified], "t1"); 334 require( 335 _hashStoredBatchInfo(_committedBatches[i]) == s.storedBatchHashes[currentTotalBatchesVerified], 336 "o1" 337: ); 348: require(currentTotalBatchesVerified <= s.totalBatchesCommitted, "q"); 361: require(successVerifyProof, "p"); // Proof verification fail 392: require(s.totalBatchesCommitted > _newLastBatch, "v1"); // The last committed batch is less than new last batch 393: require(_newLastBatch >= s.totalBatchesExecuted, "v2"); // Already executed batches cannot be reverted 446: require(_batch.systemLogs.length <= MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, "pu"); ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L32), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L45), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L47), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L49), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L81), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L85), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L94), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L130), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L135), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L138), [141](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L139), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L141), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L144), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L147), [152](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L150), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L153), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L156), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L157), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L159), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L167), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L169), [186](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L184), [187](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L185), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L236), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L275), [278](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L276-L279), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L282), [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L300), [329](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L327), [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L332-L335), [348](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L346), [361](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L359), [392](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L390), [393](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L391), [446](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L444) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 162: require(ds.selectorToFacet[_selector].facetAddress != address(0), "g2"); ``` *GitHub*: [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L160) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 121: require(callSuccess, "pz"); 131: require(_batchNumber <= s.totalBatchesExecuted, "xx"); 138: require(hashedLog != L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, "tw"); 201: require(!s.isEthWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex], "jj"); 212: require(proofValid, "pi"); // Failed to verify that withdrawal was actually initialized on L2 259: require(_l2GasPerPubdataByteLimit == REQUIRED_L2_GAS_PRICE_PER_PUBDATA, "qp"); 281: require(s.totalDepositedAmountPerUser[_depositor] + _amount <= limitData.depositCap, "d2"); 296: require(_factoryDeps.length <= MAX_NEW_FACTORY_DEPS, "uj"); 308: require(msg.value >= baseCost + _l2Value, "mv"); // The `msg.value` doesn't cover the transaction cost 423: require(_message.length >= 56, "pm"); 426: require(bytes4(functionSignature) == this.finalizeEthWithdrawal.selector, "is"); ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L119), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L129), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L136), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L199), [212](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L210), [259](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L257), [281](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L279), [296](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L294), [308](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L306), [423](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L421), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L424) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 108: require(selectors.length > 0, "B"); // no functions for diamond cut 117: revert("C"); // undefined diamond cut action 134: require(_facet != address(0), "G"); // facet with zero address cannot be added 143: require(oldFacet.facetAddress == address(0), "J"); // facet for this selector already exists 158: require(_facet != address(0), "K"); // cannot replace facet with zero address 164: require(oldFacet.facetAddress != address(0), "L"); // it is impossible to replace the facet with zero address 178: require(_facet == address(0), "a1"); // facet address must be zero 184: require(oldFacet.facetAddress != address(0), "a2"); // Can't delete a non-existent facet 222: require(_isSelectorFreezable == ds.selectorToFacet[selector0].isFreezable, "J1"); 287: require(_calldata.length == 0, "H"); // Non-empty calldata for zero address 294: revert("I"); // delegatecall failed 304: require(data.length == 32, "lp"); 305: require(abi.decode(data, (bytes32)) == DIAMOND_INIT_SUCCESS_RETURN_VALUE, "lp1"); ``` *GitHub*: [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L106), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L115), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L132), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L141), [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L156), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L162), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L176), [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L182), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L220), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L285), [294](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L292), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L302), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L303) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 26: require(pathLength > 0, "xc"); 27: require(pathLength < 256, "bt"); 28: require(_index < (1 << pathLength), "px"); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L26) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 67: require(!_queue.isEmpty(), "D"); // priority queue is empty 75: require(!_queue.isEmpty(), "s"); // priority queue is empty ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L65), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L73) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 32: require(l2GasForTxBody <= _priorityTxMaxGasLimit, "ui"); 34: require(l2GasForTxBody / _transaction.gasPerPubdataByteLimit <= PRIORITY_TX_MAX_PUBDATA, "uk"); 38 require( 39 getMinimalPriorityTransactionGasLimit( 40 _encoded.length, 41 _transaction.factoryDeps.length, 42 _transaction.gasPerPubdataByteLimit 43 ) <= _transaction.gasLimit, 44 "up" 45: ); 52: require(_transaction.from <= type(uint16).max, "ua"); 53: require(_transaction.to <= type(uint160).max, "ub"); 54: require(_transaction.paymaster == 0, "uc"); 55: require(_transaction.value == 0, "ud"); 56: require(_transaction.reserved[0] == 0, "ue"); 57: require(_transaction.reserved[1] <= type(uint160).max, "uf"); 58: require(_transaction.reserved[2] == 0, "ug"); 59: require(_transaction.reserved[3] == 0, "uo"); 60: require(_transaction.signature.length == 0, "uh"); 61: require(_transaction.paymasterInput.length == 0, "ul"); 62: require(_transaction.reservedDynamic.length == 0, "um"); 119: require(_totalGasLimit >= overhead, "my"); // provided gas limit doesn't cover transaction overhead ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L30), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L32), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L36-L43), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L52), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L54), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L56), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L57), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L58), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L59), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L60), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L117) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 47: require(_l1Bridge != address(0), "bf"); 48: require(_l2TokenProxyBytecodeHash != bytes32(0), "df"); 49: require(_governor != address(0), "sf"); 73: require(AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, "mq"); 75: require(msg.value == 0, "Value should be 0 for ERC20 bridge"); 81: require(deployedToken == expectedL2Token, "mt"); 84: require(currentL1Token == _l1Token, "gg"); // Double check that the expected value equal to real one 115: require(l1Token != address(0), "yh"); 161: require(success, "mk"); ``` *GitHub*: [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L45), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L46), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L47), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L71), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L73), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L79), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L82), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L113), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L159) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 49: require(_l1Address != address(0), "in6"); // Should be non-zero address 103: require(msg.sender == l2Bridge, "xnt"); // Only L2 bridge can call this method ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L47), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L101) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 55: require(_l2Bridge != address(0), "L2 bridge address cannot be zero"); 56: require(_l1Address != address(0), "L1 WETH token address cannot be zero"); 62: require(msg.sender == l2Bridge, "permission denied"); // Only L2 bridge can call this method 73: revert("bridgeMint is not implemented! Use deposit/depositTo methods instead."); ``` *GitHub*: [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L53), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L54), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L60), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L71) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 52: require(_l1Bridge != address(0), "L1 WETH bridge address cannot be zero"); 53: require(_l1WethAddress != address(0), "L1 WETH token address cannot be zero"); 54: require(_l2WethAddress != address(0), "L2 WETH token address cannot be zero"); 70: require(_l2Token == l2WethAddress, "Only WETH can be withdrawn"); 71: require(_amount > 0, "Amount cannot be zero"); 97 require( 98 AddressAliasHelper.undoL1ToL2Alias(msg.sender) == l1Bridge, 99 "Only L1 WETH bridge can call this function" 100: ); 102: require(_l1Token == l1WethAddress, "Only WETH can be deposited"); 103: require(msg.value == _amount, "Amount mismatch"); 122: require(msg.sender == l2WethAddress, "pd"); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L51), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L52), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L68), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L69), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L95-L98), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L100), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L101), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L120) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 28: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); 39: require(Utils.isContractConstructing(_hash), "Code hash is not for a contract on constructor"); 50: require(Utils.isContractConstructed(_hash), "Code hash is not for a constructed contract"); 59: require(Utils.isContractConstructing(codeHash), "Code hash is not for a contract on constructor"); ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L26), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L37), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L48), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L57) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 39: revert("Unsupported tx type"); ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L37) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 24: require(msg.sender == FORCE_DEPLOYER, "Can only be called by FORCE_DEPLOYER"); 26: require(_delegateTo.code.length > 0, "Delegatee is an EOA"); ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L22), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L24) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 63: require(dictionary.length % 8 == 0, "Dictionary length should be a multiple of 8"); 64: require(dictionary.length <= 2 ** 16 * 8, "Dictionary is too big"); 65 require( 66 encodedData.length * 4 == _bytecode.length, 67 "Encoded data length should be 4 times shorter than the original bytecode" 68: ); 72: require(indexOfEncodedChunk < dictionary.length, "Encoded chunk index is out of bounds"); 77: require(encodedChunk == realChunk, "Encoded chunk does not match the original bytecode"); 128: require(_enumerationIndexSize <= MAX_ENUMERATION_INDEX_SIZE, "enumeration index size is too large"); 149: require(derivedKey == _compressedStateDiffs.readBytes32(stateDiffPtr), "iw: initial key mismatch"); 165: require(numInitialWritesProcessed == numberOfInitialWrites, "Incorrect number of initial storage diffs"); 178: require(enumIndex == compressedEnumIndex, "rw: enum key mismatch"); 194: require(stateDiffPtr == _compressedStateDiffs.length, "Extra data in _compressedStateDiffs"); 237: require(convertedValue == _finalValue, "transform or no compression: compressed and final mismatch"); 239: require(_initialValue + convertedValue == _finalValue, "add: initial plus converted not equal to final"); 241: require(_initialValue - convertedValue == _finalValue, "sub: initial minus converted not equal to final"); 243: revert("unsupported operation"); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L62), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L63-L66), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L70), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L75), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L126), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L147), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L163), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L176), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L192), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L235), [239](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L237), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L239), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L241) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 31: require(msg.sender == address(this), "Callable only by self"); 76 require( 77 _nonceOrdering == AccountNonceOrdering.Arbitrary && 78 currentInfo.nonceOrdering == AccountNonceOrdering.Sequential, 79 "It is only possible to change from sequential to arbitrary ordering" 80: ); 241 require( 242 msg.sender == FORCE_DEPLOYER || msg.sender == address(COMPLEX_UPGRADER_CONTRACT), 243 "Can only be called by FORCE_DEPLOYER or COMPLEX_UPGRADER_CONTRACT" 244: ); 253: require(msg.value == sumOfValues, "`value` provided is not equal to the combined `value`s of deployments"); 266: require(_bytecodeHash != bytes32(0x0), "BytecodeHash cannot be zero"); 267: require(uint160(_newAddress) > MAX_SYSTEM_CONTRACT_ADDRESS, "Can not deploy contracts in kernel space"); 270 require( 271 ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT.getCodeHash(uint256(uint160(_newAddress))) == 0x0, 272 "Code hash is non-zero" 273: ); 275: require(NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(_newAddress) == 0x00, "Account is occupied"); 306: require(knownCodeMarker > 0, "The code hash is not known"); 353: require(value == 0, "The value must be zero if we do not call the constructor"); ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L29), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L74-L78), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L239-L242), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L251), [266](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L264), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L265), [270](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L268-L271), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L273), [306](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L304), [353](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L351) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 102: require(totalRequiredBalance <= address(this).balance, "Not enough balance for fee + value"); 164: require(_signature.length == 65, "Signature length is incorrect"); 177: require(v == 27 || v == 28, "v is neither 27 nor 28"); 188: require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "Invalid s"); 206: require(success, "Failed to pay the fee to the operator"); ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L100), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L162), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L186), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L204) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 37: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), "Callable only by the deployer system contract"); ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 23: require(msg.sender == address(COMPRESSOR_CONTRACT), "Callable only by the compressor"); 79: require(version == 1 && _bytecodeHash[1] == bytes1(0), "Incorrectly formatted bytecodeHash"); 81: require(Utils.bytecodeLenInWords(_bytecodeHash) % 2 == 1, "Code length in words must be odd"); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L21), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L77), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L79) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 208: require(numberOfL2ToL1Logs <= numberOfL2ToL1Logs, "Too many L2->L1 logs"); 221 require( 222 reconstructedChainedLogsHash == chainedLogsHash, 223 "reconstructedChainedLogsHash is not equal to chainedLogsHash" 224: ); 252 require( 253 reconstructedChainedMessagesHash == chainedMessagesHash, 254 "reconstructedChainedMessagesHash is not equal to chainedMessagesHash" 255: ); 276 require( 277 reconstructedChainedL1BytecodesRevealDataHash == chainedL1BytecodesRevealDataHash, 278 "reconstructedChainedL1BytecodesRevealDataHash is not equal to chainedL1BytecodesRevealDataHash" 279: ); 286 require( 287 uint256(uint8(bytes1(_totalL2ToL1PubdataAndStateDiffs[calldataPtr]))) == 288 STATE_DIFF_COMPRESSION_VERSION_NUMBER, 289 "state diff compression version mismatch" 290: ); 305: require(calldataPtr <= MAX_ALLOWED_PUBDATA_PER_BATCH, "L1 Messenger pubdata is too long"); 322: require(calldataPtr == _totalL2ToL1PubdataAndStateDiffs.length, "Extra data in the totalL2ToL1Pubdata array"); ``` *GitHub*: [208](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L206), [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L219-L222), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L250-L253), [276](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L274-L277), [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L284-L288), [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L303), [322](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L320) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 35 require( 36 msg.sender == MSG_VALUE_SYSTEM_CONTRACT || 37 msg.sender == address(DEPLOYER_SYSTEM_CONTRACT) || 38 msg.sender == BOOTLOADER_FORMAL_ADDRESS, 39 "Only system contracts with special access can call this method" 40: ); 43: require(fromBalance >= _amount, "Transfer amount exceeds balance"); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L33-L38), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L41) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 41: require(to != address(this), "MsgValueSimulator calls itself"); ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L39) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 68: require(_value <= MAXIMAL_MIN_NONCE_INCREMENT, "The value for incrementing the nonce is too high"); 87: require(_value != 0, "Nonce value cannot be set to 0"); 91: require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 117: require(oldMinNonce == _expectedNonce, "Incorrect nonce"); 138: require(msg.sender == address(DEPLOYER_SYSTEM_CONTRACT), ""); 165: revert("Reusing the same nonce twice"); 167: revert("The nonce was not set as used"); ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L66), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L85), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L89), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L115), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L136), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L163), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L165) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 215: require(_isFirstInBatch, "Upgrade transaction must be first"); 218: require(_l2BlockNumber > 0, "L2 block number is never expected to be zero"); 222: require(correctPrevBlockHash == _expectedPrevL2BlockHash, "The previous L2 block hash is incorrect"); 260: require(_maxVirtualBlocksToCreate > 0, "Can't initialize the first virtual block"); 324 require( 325 _l2BlockTimestamp >= currentBatchTimestamp, 326 "The timestamp of the L2 block must be greater than or equal to the timestamp of the current batch" 327: ); 328: require(_maxVirtualBlocksToCreate > 0, "There must be a virtual block created at the start of the batch"); 340: require(!_isFirstInBatch, "Can not reuse L2 block number from the previous batch"); 341: require(currentL2BlockTimestamp == _l2BlockTimestamp, "The timestamp of the same L2 block must be same"); 342 require( 343 _expectedPrevL2BlockHash == _getLatest257L2blockHash(_l2BlockNumber - 1), 344 "The previous hash of the same L2 block must be same" 345: ); 346: require(_maxVirtualBlocksToCreate == 0, "Can not create virtual blocks in the middle of the miniblock"); 358: require(_expectedPrevL2BlockHash == pendingL2BlockHash, "The current L2 block hash is incorrect"); 359 require( 360 _l2BlockTimestamp > currentL2BlockTimestamp, 361 "The timestamp of the new L2 block must be greater than the timestamp of the previous L2 block" 362: ); 367: revert("Invalid new L2 block number"); 386: require(currentBatchNumber > 0, "The current batch number must be greater than 0"); 403 require( 404 _newTimestamp > currentBlockTimestamp, 405 "The timestamp of the batch must be greater than the timestamp of the previous block" 406: ); 425: require(_newTimestamp > previousBatchTimestamp, "Timestamps should be incremental"); 426: require(previousBatchNumber + 1 == _expectedNewNumber, "The provided block number is not correct"); ``` *GitHub*: [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L213), [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L216), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L220), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L258), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L322-L325), [328](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L326), [340](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L338), [341](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L339), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L340-L343), [346](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L344), [358](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L356), [359](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L357-L360), [367](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L365), [386](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L384), [403](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L401-L404), [425](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L423), [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L424) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 18 require( 19 SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender), 20 "This method require system call flag" 21: ); 28 require( 29 SystemContractHelper.isSystemContract(msg.sender), 30 "This method require the caller to be system contract" 31: ); 38: require(msg.sender == caller, "Inappropriate caller"); 45: require(msg.sender == BOOTLOADER_FORMAL_ADDRESS, "Callable only by the bootloader"); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L16-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L26-L29), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L36), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L43) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 40: require(returnData.length == 32, "keccak256 returned invalid data"); 49: require(returnData.length == 32, "sha returned invalid data"); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L38), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L47) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 337: require(index < 10, "There are only 10 accessible registers"); 367: require(precompileCallSuccess, "Failed to charge gas"); ``` *GitHub*: [337](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L335), [367](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L365) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 114: revert("Encoding unsupported tx"); 365: require(_transaction.paymasterInput.length >= 4, "The standard paymaster input must be at least 4 bytes long"); 369 require( 370 _transaction.paymasterInput.length >= 68, 371 "The approvalBased paymaster input must be at least 68 bytes long" 372: ); 390: revert("Unsupported paymaster flow"); ``` *GitHub*: [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L112), [365](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L363), [369](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L367-L370), [390](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L388) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 23: require(_x <= type(uint128).max, "Overflow"); 29: require(_x <= type(uint32).max, "Overflow"); 35: require(_x <= type(uint24).max, "Overflow"); 86: require(_bytecode.length % 32 == 0, "po"); 89: require(bytecodeLenInWords < 2 ** 16, "pp"); // bytecode length must be less than 2^16 words 90: require(bytecodeLenInWords % 2 == 1, "pr"); // bytecode length in words must be odd ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L21), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L27), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L33), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L84), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L87), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L88) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 63 require( 64 address(this).balance >= amount, 65 "Address: insufficient balance" 66: ); 69 require( 70 success, 71 "Address: unable to send value, recipient may have reverted" 72: ); 157 require( 158 address(this).balance >= value, 159 "Address: insufficient balance for call" 160: ); 268: require(isContract(target), "Address: call to non-contract"); 307: revert(errorMessage); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L61-L64), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L67-L70), [157](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L155-L158), [268](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L266), [307](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L305)
### [D‑18] ~~Duplicated require()/revert() checks should be refactored to a modifier Or function to save gas~~ If the compiler inlines the function, there will be no gas savings. If it doesn't, there's extra runtime overhead due to the JUMP instructions. Either way, this suggestion is not helpful. *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 133: if (availableGetters.ignoreSymbol) revert(); ``` *GitHub*: [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 109: require(success, "Failed withdrawal"); ``` *GitHub*: [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L107) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 193: require(vInt == 27 || vInt == 28, "Invalid v value"); ``` *GitHub*: [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191) ### [D‑19] ~~Event names should use CamelCase~~ The instances below are already CamelCase (events are supposed to use CamelCase, not lowerCamelCase) *There are 59 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 43: event EthReceived(uint256 amount); ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L41-L41) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 9 event DepositInitiated( 10 bytes32 indexed l2DepositTxHash, 11 address indexed from, 12 address indexed to, 13 address l1Token, 14 uint256 amount 15: ); 17: event WithdrawalFinalized(address indexed to, address indexed l1Token, uint256 amount); 19: event ClaimedFailedDeposit(address indexed to, address indexed l1Token, uint256 amount); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L7-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L15-L15), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 13: event UpdateAccessMode(address indexed target, AccessMode previousMode, AccessMode newMode); 16: event UpdateCallPermission(address indexed caller, address indexed target, bytes4 indexed functionSig, bool status); ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L11-L11), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 67: event TransparentOperationScheduled(bytes32 indexed _id, uint256 delay, Operation _operation); 70: event ShadowOperationScheduled(bytes32 indexed _id, uint256 delay); 73: event OperationExecuted(bytes32 indexed _id); 76: event ChangeSecurityCouncil(address _securityCouncilBefore, address _securityCouncilAfter); 79: event ChangeMinDelay(uint256 _delayBefore, uint256 _delayAfter); 82: event OperationCancelled(bytes32 indexed _id); ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L65-L65), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L68-L68), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L71-L71), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L74-L74), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L77-L77), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L80-L80) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 48: event NewProtocolVersion(uint256 indexed previousProtocolVersion, uint256 indexed newProtocolVersion); 51: event NewL2BootloaderBytecodeHash(bytes32 indexed previousBytecodeHash, bytes32 indexed newBytecodeHash); 54: event NewL2DefaultAccountBytecodeHash(bytes32 indexed previousBytecodeHash, bytes32 indexed newBytecodeHash); 57: event NewVerifier(address indexed oldVerifier, address indexed newVerifier); 60: event NewVerifierParams(VerifierParams oldVerifierParams, VerifierParams newVerifierParams); 63: event UpgradeComplete(uint256 indexed newProtocolVersion, bytes32 indexed l2UpgradeTxHash, ProposedUpgrade upgrade); 66: event NewAllowList(address indexed oldAllowList, address indexed newAllowList); ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L46-L46), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L49-L49), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L52-L52), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L55-L55), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L58-L58), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L61-L61), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L64-L64) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 29: event NewExecutionDelay(uint256 _newExecutionDelay); 32: event NewValidator(address _oldValidator, address _newValidator); ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L27-L27), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L30-L30) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 33: event IsPorterAvailableStatusUpdate(bool isPorterAvailable); 36: event ValidatorStatusUpdate(address indexed validatorAddress, bool isActive); 40: event NewPendingGovernor(address indexed oldPendingGovernor, address indexed newPendingGovernor); 43: event NewGovernor(address indexed oldGovernor, address indexed newGovernor); 47: event NewPendingAdmin(address indexed oldPendingAdmin, address indexed newPendingAdmin); 50: event NewAdmin(address indexed oldAdmin, address indexed newAdmin); 53: event NewPriorityTxMaxGasLimit(uint256 oldPriorityTxMaxGasLimit, uint256 newPriorityTxMaxGasLimit); 56: event ExecuteUpgrade(Diamond.DiamondCutData diamondCut); 59: event Freeze(); 62: event Unfreeze(); ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L31-L31), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L34-L34), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L38-L38), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L41-L41), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L45-L45), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L48-L48), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L51-L51), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L54-L54), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L57-L57), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L60-L60) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 96: event BlockCommit(uint256 indexed batchNumber, bytes32 indexed batchHash, bytes32 indexed commitment); 100: event BlocksVerification(uint256 indexed previousLastVerifiedBatch, uint256 indexed currentLastVerifiedBatch); 104: event BlockExecution(uint256 indexed batchNumber, bytes32 indexed batchHash, bytes32 indexed commitment); 108: event BlocksRevert(uint256 totalBatchesCommitted, uint256 totalBatchesVerified, uint256 totalBatchesExecuted); ``` *GitHub*: [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L94-L94), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L98-L98), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L102-L102), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L106-L106) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 144 event NewPriorityRequest( 145 uint256 txId, 146 bytes32 txHash, 147 uint64 expirationTimestamp, 148 L2CanonicalTransaction transaction, 149 bytes[] factoryDeps 150: ); 155: event EthWithdrawalFinalized(address indexed to, uint256 amount); ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L142-L148), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L153-L153) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 25: event DiamondCut(FacetCut[] facetCuts, address initAddress, bytes initCalldata); ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L23-L23) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 25: event EthReceived(uint256 amount); ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L23-L23) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 9 event FinalizeDeposit( 10 address indexed l1Sender, 11 address indexed l2Receiver, 12 address indexed l2Token, 13 uint256 amount 14: ); 16 event WithdrawalInitiated( 17 address indexed l2Sender, 18 address indexed l1Receiver, 19 address indexed l2Token, 20 uint256 amount 21: ); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L7-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L14-L19) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 8: event BridgeInitialize(address indexed l1Token, string name, string symbol, uint8 decimals); 10: event BridgeMint(address indexed _account, uint256 _amount); 12: event BridgeBurn(address indexed _account, uint256 _amount); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 7: event Initialize(string name, string symbol, uint8 decimals); ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 35 event ContractDeployed( 36 address indexed deployerAddress, 37 bytes32 indexed bytecodeHash, 38 address indexed contractAddress 39: ); 41: event AccountNonceOrderingUpdated(address indexed accountAddress, AccountNonceOrdering nonceOrdering); 43: event AccountVersionUpdated(address indexed accountAddress, AccountAbstractionVersion aaVersion); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L33-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L39-L39), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 26: event Mint(address indexed account, uint256 amount); 28: event Transfer(address indexed from, address indexed to, uint256 value); 30: event Withdrawal(address indexed _l2Sender, address indexed _l1Receiver, uint256 _amount); 32 event WithdrawalWithMessage( 33 address indexed _l2Sender, 34 address indexed _l1Receiver, 35 uint256 _amount, 36 bytes _additionalData 37: ); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L28-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L30-L35) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 8: event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 40: event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message); 42: event L2ToL1LogSent(L2ToL1Log _l2log); 44: event BytecodeL1PublicationRequested(bytes32 _bytecodeHash); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L42-L42) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 8: event BridgeMint(address indexed _account, uint256 _amount); 10: event BridgeBurn(address indexed _account, uint256 _amount); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 16: event ValueSetUnderNonce(address indexed accountAddress, uint256 indexed key, uint256 value); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L14-L14)
### [D‑20] ~~Events that mark critical parameter changes should contain both the old and the new value~~ These are not critical parameter changes *There are 57 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 213: emit DepositInitiated(l2TxHash, msg.sender, _l2Receiver, _l1Token, amount); 286: emit ClaimedFailedDeposit(_depositSender, _l1Token, amount); 321: emit WithdrawalFinalized(l1Receiver, l1Token, amount); ``` *GitHub*: [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L211-L211), [286](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L284-L284), [321](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L319-L319) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 197: emit DepositInitiated(txHash, msg.sender, _l2Receiver, _l1Token, _amount); 269: emit WithdrawalFinalized(l1WethWithdrawReceiver, l1WethAddress, amount); 314: emit EthReceived(msg.value); ``` *GitHub*: [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L195-L195), [269](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L267-L267), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L312-L312) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 75: emit UpdateAccessMode(_target, accessMode, _accessMode); 123: emit UpdateCallPermission(_caller, _target, _functionSig, _enable); ``` *GitHub*: [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L73-L73), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L121-L121) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 49: emit ChangeSecurityCouncil(address(0), _securityCouncil); 52: emit ChangeMinDelay(0, _minDelay); 134: emit TransparentOperationScheduled(id, _delay, _operation); 146: emit ShadowOperationScheduled(_id, _delay); 159: emit OperationCancelled(_id); 182: emit OperationExecuted(id); 201: emit OperationExecuted(id); ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L47-L47), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L50-L50), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L132-L132), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L144-L144), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L157-L157), [182](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L180-L180), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L199-L199) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 91: emit NewL2DefaultAccountBytecodeHash(previousDefaultAccountBytecodeHash, _l2DefaultAccountBytecodeHash); 108: emit NewL2BootloaderBytecodeHash(previousBootloaderBytecodeHash, _l2BootloaderBytecodeHash); 124: emit NewVerifier(address(oldVerifier), address(_newVerifier)); 140: emit NewVerifierParams(oldVerifierParams, _newVerifierParams); 231: emit NewProtocolVersion(previousProtocolVersion, _newProtocolVersion); 243: emit NewAllowList(address(oldAllowList), address(_newAllowList)); ``` *GitHub*: [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L89-L89), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L106-L106), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L122-L122), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L138-L138), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L229-L229), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L241-L241) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 45: emit UpgradeComplete(_proposedUpgrade.newProtocolVersion, txHash, _proposedUpgrade); ``` *GitHub*: [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L43-L43) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 39: emit NewPendingGovernor(pendingGovernor, address(0)); 40: emit NewGovernor(previousGovernor, pendingGovernor); 63: emit NewPendingAdmin(pendingAdmin, address(0)); 64: emit NewAdmin(previousAdmin, pendingAdmin); 102: emit ExecuteUpgrade(_diamondCut); 117: emit Freeze(); 128: emit Unfreeze(); ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L37-L37), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L38-L38), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L61-L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L62-L62), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L100-L100), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L115-L115), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L126-L126) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 215 emit BlockCommit( 216 _lastCommittedBatchData.batchNumber, 217 _lastCommittedBatchData.batchHash, 218 _lastCommittedBatchData.commitment 219: ); 253 emit BlockCommit( 254 _lastCommittedBatchData.batchNumber, 255 _lastCommittedBatchData.batchHash, 256 _lastCommittedBatchData.commitment 257: ); 297: emit BlockExecution(_batchesData[i].batchNumber, _batchesData[i].batchHash, _batchesData[i].commitment); 364: emit BlocksVerification(s.totalBatchesVerified, currentTotalBatchesVerified); 406: emit BlocksRevert(s.totalBatchesCommitted, s.totalBatchesVerified, s.totalBatchesExecuted); ``` *GitHub*: [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L213-L217), [253](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L251-L255), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L295-L295), [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L362-L362), [406](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L404-L404) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 217: emit EthWithdrawalFinalized(_l1WithdrawReceiver, _amount); 380 emit NewPriorityRequest( 381 _priorityOpParams.txId, 382 canonicalTxHash, 383 _priorityOpParams.expirationTimestamp, 384 transaction, 385 _factoryDeps 386: ); ``` *GitHub*: [217](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L215-L215), [380](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L378-L384) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 122: emit DiamondCut(facetCuts, initAddress, initCalldata); ``` *GitHub*: [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 89: emit FinalizeDeposit(_l1Sender, _l2Receiver, expectedL2Token, _amount); 120: emit WithdrawalInitiated(msg.sender, _l1Receiver, _l2Token, _amount); ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L87-L87), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L118-L118) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 99: emit BridgeInitialize(_l1Address, decodedName, decodedSymbol, decimals_); 113: emit BridgeMint(_to, _amount); 122: emit BridgeBurn(_from, _amount); ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L97-L97), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L111-L111), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L120-L120) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 48: emit Initialize(name_, symbol_, 18); 86: emit BridgeBurn(_from, _amount); ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L46-L46), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L84-L84) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 82: emit WithdrawalInitiated(msg.sender, _l1Receiver, l2WethAddress, _amount); 108: emit FinalizeDeposit(_l1Sender, _l2Receiver, l2WethAddress, _amount); 123: emit EthReceived(msg.value); ``` *GitHub*: [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L80-L80), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L106-L106), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L121-L121) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 234: emit ContractDeployed(_sender, _deployment.bytecodeHash, _deployment.newAddress); 300: emit ContractDeployed(msg.sender, _bytecodeHash, _newAddress); ``` *GitHub*: [234](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L232-L232), [300](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L298-L298) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 62: emit MarkedAsKnown(_bytecodeHash, _shouldSendToL1); ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L60-L60) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 117: emit L2ToL1LogSent(_l2ToL1Log); 163: emit L1MessageSent(msg.sender, hash, _message); 188: emit BytecodeL1PublicationRequested(_bytecodeHash); ``` *GitHub*: [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L115-L115), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L161-L161), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L186-L186) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 51: emit Transfer(_from, _to, _amount); 69: emit Mint(_account, _amount); 81: emit Withdrawal(msg.sender, _l1Receiver, amount); 94: emit WithdrawalWithMessage(msg.sender, _l1Receiver, amount, _additionalData); ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L49-L49), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L67-L67), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L79-L79), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L92-L92)
### [D‑21] ~~Functions which are either private or internal should have a preceding _ in their name~~ This rule does not apply to internal library functions, so these instances are invalid. *There are 107 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 32 function requestDeployTransaction( 33 IZkSync _zkSync, 34 uint256 _deployTransactionFee, 35 bytes32 _bytecodeHash, 36 bytes memory _constructorData, 37 bytes[] memory _factoryDeps 38: ) internal returns (address deployedAddress) { ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L30-L36) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 23: function hashL2Bytecode(bytes memory _bytecode) internal pure returns (bytes32 hashedBytecode) { 41: function validateBytecodeHash(bytes32 _bytecodeHash) internal pure { 62 function computeCreate2Address( 63 address _sender, 64 bytes32 _salt, 65 bytes32 _bytecodeHash, 66 bytes32 _constructorInputHash 67: ) internal pure returns (address) { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L21-L21), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L39-L39), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L60-L65) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 13: function uncheckedInc(uint256 _number) internal pure returns (uint256) { 19: function uncheckedAdd(uint256 _lhs, uint256 _rhs) internal pure returns (uint256) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L11-L11), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 21: function readUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32 result, uint256 offset) { 28: function readAddress(bytes memory _bytes, uint256 _start) internal pure returns (address result, uint256 offset) { 35: function readUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256 result, uint256 offset) { 42: function readBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32 result, uint256 offset) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 30: function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) { 40: function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L28-L28), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L38-L38) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 88: function getDiamondStorage() internal pure returns (DiamondStorage storage diamondStorage) { 97: function diamondCut(DiamondCutData memory _diamondCut) internal { ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L86-L86), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L95-L95) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 18: function get(Uint32Map storage _map, uint256 _index) internal view returns (uint32 result) { 38 function set( 39 Uint32Map storage _map, 40 uint256 _index, 41 uint32 _value 42: ) internal { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L16-L16), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L36-L40) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 20 function calculateRoot( 21 bytes32[] calldata _path, 22 uint256 _index, 23 bytes32 _itemHash 24: ) internal pure returns (bytes32) { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L18-L22) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 37: function getFirstUnprocessedPriorityTx(Queue storage _queue) internal view returns (uint256) { 42: function getTotalPriorityTxs(Queue storage _queue) internal view returns (uint256) { 47: function getSize(Queue storage _queue) internal view returns (uint256) { 52: function isEmpty(Queue storage _queue) internal view returns (bool) { 57: function pushBack(Queue storage _queue, PriorityOperation memory _operation) internal { 66: function front(Queue storage _queue) internal view returns (PriorityOperation memory) { 74: function popFront(Queue storage _queue) internal returns (PriorityOperation memory priorityOperation) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L35-L35), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L40-L40), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L45-L45), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L50-L50), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L55-L55), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L64-L64), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L72-L72) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 20 function validateL1ToL2Transaction( 21 IMailbox.L2CanonicalTransaction memory _transaction, 22 bytes memory _encoded, 23 uint256 _priorityTxMaxGasLimit 24: ) internal pure { 50: function validateUpgradeTransaction(IMailbox.L2CanonicalTransaction memory _transaction) internal pure { 71 function getMinimalPriorityTransactionGasLimit( 72 uint256 _encodingLength, 73 uint256 _numberOfFactoryDependencies, 74 uint256 _l2GasPricePerPubdata 75: ) internal pure returns (uint256) { 112 function getTransactionBodyGasLimit( 113 uint256 _totalGasLimit, 114 uint256 _gasPricePerPubdata, 115 uint256 _encodingLength 116: ) internal pure returns (uint256 txBodyGasLimit) { 135 function getOverheadForTransaction( 136 uint256 _totalGasLimit, 137 uint256 _gasPricePerPubdata, 138 uint256 _encodingLength 139: ) internal pure returns (uint256 batchOverheadForTransaction) { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L18-L22), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L48-L48), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L69-L73), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L110-L114), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L133-L137) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 38: function keccak(bytes calldata _data) internal view returns (bytes32) { 47: function sha(bytes calldata _data) internal view returns (bytes32) { 60 function call( 61 uint256 _gas, 62 address _address, 63 uint256 _value, 64 bytes calldata _data, 65 bool _isSystem 66: ) internal returns (bytes memory returnData) { 76 function staticCall( 77 uint256 _gas, 78 address _address, 79 bytes calldata _data 80: ) internal view returns (bytes memory returnData) { 90 function delegateCall( 91 uint256 _gas, 92 address _address, 93 bytes calldata _data 94: ) internal returns (bytes memory returnData) { 107 function mimicCall( 108 uint256 _gas, 109 address _address, 110 bytes calldata _data, 111 address _whoToMimic, 112 bool _isConstructor, 113 bool _isSystem 114: ) internal returns (bytes memory returnData) { 126 function rawCall( 127 uint256 _gas, 128 address _address, 129 uint256 _value, 130 bytes calldata _data, 131 bool _isSystem 132: ) internal returns (bool success) { 161: function rawStaticCall(uint256 _gas, address _address, bytes calldata _data) internal view returns (bool success) { 175: function rawDelegateCall(uint256 _gas, address _address, bytes calldata _data) internal returns (bool success) { 193 function rawMimicCall( 194 uint256 _gas, 195 address _address, 196 bytes calldata _data, 197 address _whoToMimic, 198 bool _isConstructor, 199 bool _isSystem 200: ) internal returns (bool success) { 234: function propagateRevert() internal pure { ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L36-L36), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L45-L45), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L58-L64), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L74-L78), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L88-L92), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L105-L112), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L124-L130), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L159-L159), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L173-L173), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L191-L198), [234](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L232-L232) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 13: function encodeAddress(address _val) internal pure returns (bytes memory encoded) { 26: function encodeUint256(uint256 _val) internal pure returns (bytes memory encoded) { 51: function encodeNonSingleBytesLen(uint64 _len) internal pure returns (bytes memory) { 58: function encodeListLen(uint64 _len) internal pure returns (bytes memory) { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L11-L11), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L24-L24), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L49-L49), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L56-L56) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 77: function toL1(bool _isService, bytes32 _key, bytes32 _value) internal { 92: function getCodeAddress() internal view returns (address addr) { 103: function loadCalldataIntoActivePtr() internal view { 114: function ptrPackIntoActivePtr(uint256 _farCallAbi) internal view { 123: function ptrAddIntoActive(uint32 _value) internal view { 135: function ptrShrinkIntoActive(uint32 _shrink) internal view { 153 function packPrecompileParams( 154 uint32 _inputMemoryOffset, 155 uint32 _inputMemoryLength, 156 uint32 _outputMemoryOffset, 157 uint32 _outputMemoryLength, 158 uint64 _perPrecompileInterpreted 159: ) internal pure returns (uint256 rawParams) { 177: function unsafePrecompileCall(uint256 _rawParams, uint32 _gasToBurn) internal view returns (bool success) { 191: function setValueForNextFarCall(uint128 _value) internal returns (bool success) { 204: function eventInitialize(uint256 initializer, uint256 value1) internal { 214: function eventWrite(uint256 value1, uint256 value2) internal { 225: function getZkSyncMetaBytes() internal view returns (uint256 meta) { 237: function extractNumberFromMeta(uint256 meta, uint256 offset, uint256 size) internal pure returns (uint256 result) { 248: function getGasPerPubdataByteFromMeta(uint256 meta) internal pure returns (uint32 gasPerPubdataByte) { 258: function getHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 heapSize) { 267: function getAuxHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 auxHeapSize) { 275: function getShardIdFromMeta(uint256 meta) internal pure returns (uint8 shardId) { 284: function getCallerShardIdFromMeta(uint256 meta) internal pure returns (uint8 callerShardId) { 293: function getCodeShardIdFromMeta(uint256 meta) internal pure returns (uint8 codeShardId) { 299: function getZkSyncMeta() internal view returns (ZkSyncMeta memory meta) { 314: function getCallFlags() internal view returns (uint256 callFlags) { 325: function getCalldataPtr() internal view returns (uint256 ptr) { 336: function getExtraAbiData(uint256 index) internal view returns (uint256 extraAbiData) { 347: function isSystemCall() internal view returns (bool) { 356: function isSystemContract(address _address) internal pure returns (bool) { 362: function burnGas(uint32 _gasToPay) internal view { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L75-L75), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L90-L90), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L101-L101), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L112-L112), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L121-L121), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L133-L133), [153](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L151-L157), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L175-L175), [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L189-L189), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L202-L202), [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L212-L212), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L223-L223), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L235-L235), [248](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L246-L246), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L256-L256), [267](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L265-L265), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L273-L273), [284](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L282-L282), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L291-L291), [299](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L297-L297), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L312-L312), [325](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L323-L323), [336](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L334-L334), [347](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L345-L345), [356](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L354-L354), [362](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L360-L360) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 78: function systemCall(uint32 gasLimit, address to, uint256 value, bytes memory data) internal returns (bool success) { 125 function systemCallWithReturndata( 126 uint32 gasLimit, 127 address to, 128 uint128 value, 129 bytes memory data 130: ) internal returns (bool success, bytes memory returnData) { 152 function systemCallWithPropagatedRevert( 153 uint32 gasLimit, 154 address to, 155 uint128 value, 156 bytes memory data 157: ) internal returns (bytes memory returnData) { 216 function getFarCallABI( 217 uint32 dataOffset, 218 uint32 memoryPage, 219 uint32 dataStart, 220 uint32 dataLength, 221 uint32 gasPassed, 222 uint8 shardId, 223 CalldataForwardingMode forwardingMode, 224 bool isConstructorCall, 225 bool isSystemCall 226: ) internal pure returns (uint256 farCallAbi) { 252 function getFarCallABIWithEmptyFatPointer( 253 uint32 gasPassed, 254 uint8 shardId, 255 CalldataForwardingMode forwardingMode, 256 bool isConstructorCall, 257 bool isSystemCall 258: ) internal pure returns (uint256 farCallAbiWithEmptyFatPtr) { ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L76-L76), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L123-L128), [152](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L150-L155), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L214-L224), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L250-L256) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 96: function isEthToken(uint256 _addr) internal pure returns (bool) { 102: function encodeHash(Transaction calldata _transaction) internal view returns (bytes32 resultHash) { 364: function processPaymasterInput(Transaction calldata _transaction) internal { 397: function payToTheBootloader(Transaction calldata _transaction) internal returns (bool success) { 407: function totalRequiredBalance(Transaction calldata _transaction) internal pure returns (uint256 requiredBalance) { ``` *GitHub*: [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L94-L94), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L100-L100), [364](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L362-L362), [397](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L395-L395), [407](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L405-L405) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 21: function readUint16(bytes calldata _bytes, uint256 _start) internal pure returns (uint16 result) { 28: function readUint32(bytes calldata _bytes, uint256 _start) internal pure returns (uint32 result) { 35: function readUint64(bytes calldata _bytes, uint256 _start) internal pure returns (uint64 result) { 42: function readBytes32(bytes calldata _bytes, uint256 _start) internal pure returns (bytes32 result) { 48: function readUint256(bytes calldata _bytes, uint256 _start) internal pure returns (uint256 result) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 22: function safeCastToU128(uint256 _x) internal pure returns (uint128) { 28: function safeCastToU32(uint256 _x) internal pure returns (uint32) { 34: function safeCastToU24(uint256 _x) internal pure returns (uint24) { 41: function bytecodeLenInBytes(bytes32 _bytecodeHash) internal pure returns (uint256 codeLength) { 46: function bytecodeLenInWords(bytes32 _bytecodeHash) internal pure returns (uint256 codeLengthInWords) { 53: function isContractConstructed(bytes32 _bytecodeHash) internal pure returns (bool) { 58: function isContractConstructing(bytes32 _bytecodeHash) internal pure returns (bool) { 65: function constructingBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) { 73: function constructedBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) { 84: function hashL2Bytecode(bytes calldata _bytecode) internal view returns (bytes32 hashedBytecode) { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L20-L20), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L26-L26), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L32-L32), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L39-L39), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L44-L44), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L51-L51), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L56-L56), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L63-L63), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L71-L71), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L82-L82) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 38: function isContract(address account) internal view returns (bool) { 62: function sendValue(address payable recipient, uint256 amount) internal { 93 function functionCall(address target, bytes memory data) 94 internal 95 returns (bytes memory) 96: { 112 function functionCall( 113 address target, 114 bytes memory data, 115 string memory errorMessage 116: ) internal returns (bytes memory) { 131 function functionCallWithValue( 132 address target, 133 bytes memory data, 134 uint256 value 135: ) internal returns (bytes memory) { 151 function functionCallWithValue( 152 address target, 153 bytes memory data, 154 uint256 value, 155 string memory errorMessage 156: ) internal returns (bytes memory) { 179 function functionStaticCall(address target, bytes memory data) 180 internal 181 view 182 returns (bytes memory) 183: { 198 function functionStaticCall( 199 address target, 200 bytes memory data, 201 string memory errorMessage 202: ) internal view returns (bytes memory) { 219 function functionDelegateCall(address target, bytes memory data) 220 internal 221 returns (bytes memory) 222: { 237 function functionDelegateCall( 238 address target, 239 bytes memory data, 240 string memory errorMessage 241: ) internal returns (bytes memory) { 258 function verifyCallResultFromTarget( 259 address target, 260 bool success, 261 bytes memory returndata, 262 string memory errorMessage 263: ) internal view returns (bytes memory) { 282 function verifyCallResult( 283 bool success, 284 bytes memory returndata, 285 string memory errorMessage 286: ) internal pure returns (bytes memory) { ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L36-L36), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L60-L60), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L91-L94), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L110-L114), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L129-L133), [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L149-L154), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L177-L181), [198](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L196-L200), [219](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L217-L220), [237](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L235-L239), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L256-L261), [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L280-L284)
### [D‑22] ~~Getter for public state variables are redundant~~ The variable is not public, so this function is not redundant *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 163 function getBlockNumber() public view returns (uint128) { 164 return currentVirtualL2BlockInfo.number; 165: } 171 function getBlockTimestamp() public view returns (uint128) { 172 return currentVirtualL2BlockInfo.timestamp; 173: } ``` *GitHub*: [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L161-L163), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L169-L171) ### [D‑23] ~~IERC20 approve() Is Deprecated~~ `approve()` itself is not deprecated, and these are already approvals to zero, not to non-zero, so they won't revert *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 384: IERC20(token).safeApprove(paymaster, 0); ``` *GitHub*: [384](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L382-L382) ### [D‑24] ~~Inconsistent comment spacing~~ URLs are not comments *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 34: // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/566a774222707e424896c0c390a84dc3c13bdcb2/contracts/security/ReentrancyGuard.sol 87: // https://eips.ethereum.org/EIPS/eip-2200) ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L32), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L85) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 7: /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibMap.sol) ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 27: /// @dev For more details see https://docs.openzeppelin.com/contracts/3.x/api/proxy#UpgradeableBeacon. ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L25) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 233: // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md ``` *GitHub*: [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L231) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 180: // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines ``` *GitHub*: [180](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L178) ### [D‑25] ~~Interfaces should be defined in separate files from their usage~~ These interfaces are already in a file separate from the implementation *There are 35 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 8: interface IL1BridgeLegacy { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 8: interface IL2ERC20Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 7 interface IAllowList { 8 /*////////////////////////////////////////////////////////////// 9 EVENTS 10 //////////////////////////////////////////////////////////////*/ 11 12: /// @notice Access mode of target contract is changed ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 11 interface IL2ContractDeployer { 12 /// @notice A struct that describes a forced deployment on an address. 13 /// @param bytecodeHash The bytecode hash to put on an address. 14 /// @param newAddress The address on which to deploy the bytecodehash to. 15 /// @param callConstructor Whether to run the constructor on the force deployment. 16 /// @param value The `msg.value` with which to initialize a contract. 17: /// @param input The constructor calldata. ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L9-L15) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 7 interface IGovernance { 8 /// @dev This enumeration includes the following states: 9 /// @param Unset Default state, indicating the operation has not been set. 10 /// @param Waiting The operation is scheduled but not yet ready to be executed. 11 /// @param Ready The operation is ready to be executed. 12: /// @param Done The operation has been successfully executed. ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L5-L10) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 11: interface IAdmin is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4-L4) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 30 interface IExecutor is IBase { 31 /// @notice Rollup batch stored data 32 /// @param batchNumber Rollup batch number 33 /// @param batchHash Hash of L2 batch 34 /// @param indexRepeatedStorageChanges The serial number of the shortcut index that's used as a unique identifier for storage keys that were used twice or more 35 /// @param numberOfLayer1Txs Number of priority operations to be processed 36 /// @param priorityOperationsHash Hash of all priority operations from this batch 37 /// @param l2LogsTreeRoot Root hash of tree that contains L2 -> L1 messages from this batch 38 /// @param timestamp Rollup batch timestamp, have the same format as Ethereum batch constant 39: /// @param commitment Verified input for the zkSync circuit ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L28-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 11 interface IGetters is IBase { 12 /*////////////////////////////////////////////////////////////// 13 CUSTOM GETTERS 14 //////////////////////////////////////////////////////////////*/ 15: ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9-L13) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 13: interface ILegacyGetters is IBase { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 18 interface IMailbox is IBase { 19 /// @dev Structure that includes all fields of the L2 transaction 20 /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx 21 /// @param txType The tx type number, depending on which the L2 transaction can be interpreted differently 22 /// @param from The sender's address. `uint256` type for possible address format changes and maintaining backward compatibility 23 /// @param to The recipient's address. `uint256` type for possible address format changes and maintaining backward compatibility 24 /// @param gasLimit The L2 gas limit for L2 transaction. Analog to the `gasLimit` on an L1 transactions 25 /// @param gasPerPubdataByteLimit Maximum number of L2 gas that will cost one byte of pubdata (every piece of data that will be stored on L1 as calldata) 26 /// @param maxFeePerGas The absolute maximum sender willing to pay per unit of L2 gas to get the transaction included in a batch. Analog to the EIP-1559 `maxFeePerGas` on an L1 transactions 27 /// @param maxPriorityFeePerGas The additional fee that is paid directly to the validator to incentivize them to include the transaction in a batch. Analog to the EIP-1559 `maxPriorityFeePerGas` on an L1 transactions 28 /// @param paymaster The address of the EIP-4337 paymaster, that will pay fees for the transaction. `uint256` type for possible address format changes and maintaining backward compatibility 29 /// @param nonce The nonce of the transaction. For L1->L2 transactions it is the priority operation Id. 30 /// @param value The value to pass with the transaction 31 /// @param reserved The fixed-length fields for usage in a future extension of transaction formats 32 /// @param data The calldata that is transmitted for the transaction call 33 /// @param signature An abstract set of bytes that are used for transaction authorization 34 /// @param factoryDeps The set of L2 bytecode hashes whose preimages were shown on L1 35 /// @param paymasterInput The arbitrary-length data that is used as a calldata to the paymaster pre-call 36: /// @param reservedDynamic The arbitrary-length field for usage in a future extension of transaction formats ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L16-L34) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4-L4) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7 interface IContractDeployer { 8 /// @notice Defines the version of the account abstraction protocol 9 /// that a contract claims to follow. 10 /// - `None` means that the account is just a contract and it should never be interacted 11 /// with as a custom account 12: /// - `Version1` means that the account follows the first version of the account abstraction protocol ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 7: interface IEthToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37 interface IL1Messenger { 38 // Possibly in the future we will be able to track the messages sent to L1 with 39: // some hooks in the VM. For now, it is much easier to track them with L2 events. ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35-L37) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 15: interface INonceHolder { ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 14: interface IPaymasterFlow { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 12: interface ISystemContext { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 11: interface ISystemContextDeprecated { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L9-L9)
### [D‑26] ~~It is standard for all external and public functions to be override from an interface~~ According to the Solidity [docs](https://docs.soliditylang.org/en/v0.8.20/contracts.html#function-overriding), "Starting from Solidity 0.8.8, the `override` keyword is not required when overriding an interface function, except for the case where the function is defined in multiple bases", so while it may have been a requirement in the past, they're trying to change that. Paired with the advice of making all `public` and `external` functions a part of an `interface`, this finding would end up having all sponsors mark all `public`/`external` functions with `override`, making the keyword meaningless. It's better to use `override` only when something is actually being overridden. *There are 52 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L302-L302) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 179 function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 180 external 181 override 182 nonReentrant 183 onlyValidator 184: { ``` *GitHub*: [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L177-L182) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 84 function proveL1ToL2TransactionStatus( 85 bytes32 _l2TxHash, 86 uint256 _l2BatchNumber, 87 uint256 _l2MessageIndex, 88 uint16 _l2TxNumberInBatch, 89 bytes32[] calldata _merkleProof, 90 TxStatus _status 91: ) public view override returns (bool) { 194 function finalizeEthWithdrawal( 195 uint256 _l2BatchNumber, 196 uint256 _l2MessageIndex, 197 uint16 _l2TxNumberInBatch, 198 bytes calldata _message, 199 bytes32[] calldata _merkleProof 200: ) external override nonReentrant senderCanCallFunction(s.allowList) { ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L82-L89), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L192-L198) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 65 function finalizeDeposit( 66 address _l1Sender, 67 address _l2Receiver, 68 address _l1Token, 69 uint256 _amount, 70 bytes calldata _data 71: ) external payable override { 107 function withdraw( 108 address _l1Receiver, 109 address _l2Token, 110 uint256 _amount 111: ) external override { 133: function l2TokenAddress(address _l1Token) public view override returns (address) { ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L63-L69), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L105-L109), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L131-L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 111: function bridgeMint(address _to, uint256 _amount) external override onlyBridge { 120: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 125: function name() public view override returns (string memory) { 131: function symbol() public view override returns (string memory) { 137: function decimals() public view override returns (uint8) { ``` *GitHub*: [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L109-L109), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L118-L118), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L123-L123), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L129-L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135-L135) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 69 function bridgeMint( 70 address, // _account 71 uint256 // _amount 72: ) external view override { 80: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 90: function deposit() external payable override { 95: function withdraw(uint256 _amount) external override { 100: function depositTo(address _to) public payable override { 106: function withdrawTo(address _to, uint256 _amount) public override { ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L67-L70), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L78-L78), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L88-L88), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L93-L93), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L98-L98), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L104-L104) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 65 function withdraw( 66 address _l1Receiver, 67 address _l2Token, 68 uint256 _amount 69: ) external override { 90 function finalizeDeposit( 91 address _l1Sender, 92 address _l2Receiver, 93 address _l1Token, 94 uint256 _amount, 95 bytes calldata // _data 96: ) external payable override { 112: function l1TokenAddress(address _l2Token) public view override returns (address l1Token) { 117: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L63-L67), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L88-L94), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L110-L110), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L115-L115) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 37: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 48: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 56: function markAccountCodeHashAsConstructed(address _address) external override onlyDeployer { 80: function getRawCodeHash(address _address) public view override returns (bytes32 codeHash) { 91: function getCodeHash(uint256 _input) external view override returns (bytes32) { 119: function getCodeSize(uint256 _input) external view override returns (uint256 codeSize) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L35-L35), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L46-L46), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L54-L54), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L78-L78), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L89-L89), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L117-L117) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 26 function getTransactionHashes( 27 Transaction calldata _transaction 28: ) external view override returns (bytes32 txHash, bytes32 signedTxHash) { ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L24-L26) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 94 function getNewAddressCreate2( 95 address _sender, 96 bytes32 _bytecodeHash, 97 bytes32 _salt, 98 bytes calldata _input 99: ) public view override returns (address newAddress) { 114 function getNewAddressCreate( 115 address _sender, 116 uint256 _senderNonce 117: ) public pure override returns (address newAddress) { 132 function create2( 133 bytes32 _salt, 134 bytes32 _bytecodeHash, 135 bytes calldata _input 136: ) external payable override returns (address) { 148 function create( 149 bytes32 _salt, 150 bytes32 _bytecodeHash, 151 bytes calldata _input 152: ) external payable override returns (address) { 164 function create2Account( 165 bytes32 _salt, 166 bytes32 _bytecodeHash, 167 bytes calldata _input, 168 AccountAbstractionVersion _aaVersion 169: ) public payable override onlySystemCall returns (address) { 185 function createAccount( 186 bytes32, // salt 187 bytes32 _bytecodeHash, 188 bytes calldata _input, 189 AccountAbstractionVersion _aaVersion 190: ) public payable override onlySystemCall returns (address) { ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L92-L97), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L112-L115), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L130-L134), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L146-L150), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L162-L167), [185](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L183-L188) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 69 function validateTransaction( 70 bytes32, // _txHash 71 bytes32 _suggestedSignedHash, 72 Transaction calldata _transaction 73: ) external payable override ignoreNonBootloader ignoreInDelegateCall returns (bytes4 magic) { 116 function executeTransaction( 117 bytes32, // _txHash 118 bytes32, // _suggestedSignedHash 119 Transaction calldata _transaction 120: ) external payable override ignoreNonBootloader ignoreInDelegateCall { 129 function executeTransactionFromOutside(Transaction calldata _transaction) external payable override { 130 // Behave the same as for fallback/receive, just execute nothing, returns nothing 131: } ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L67-L71), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L114-L118), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L127-L129) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 29: function getImmutable(address _dest, uint256 _index) external view override returns (bytes32) { 36: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external override { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L27-L27), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L34-L34) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L66-L66) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 121: function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { 167 function requestBytecodeL1Publication( 168 bytes32 _bytecodeHash 169: ) external override onlyCallFrom(address(KNOWN_CODE_STORAGE_CONTRACT)) { ``` *GitHub*: [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L119-L119), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L165-L167) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 34: function transferFromTo(address _from, address _to, uint256 _amount) external override { 58: function balanceOf(uint256 _account) external view override returns (uint256) { 66: function mint(address _account, uint256 _amount) external override onlyCallFromBootloader { 74: function withdraw(address _l1Receiver) external payable override { 87: function withdrawWithMessage(address _l1Receiver, bytes memory _additionalData) external payable override { 130: function name() external pure override returns (string memory) { 136: function symbol() external pure override returns (string memory) { 142: function decimals() external pure override returns (uint8) { ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L32-L32), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L56-L56), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L64-L64), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L72-L72), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L85-L85), [130](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L128-L128), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L134-L134), [142](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L140-L140)
### [D‑27] ~~It's not standard to end and begin a code object on the same line~~ These are perfectly standard *There are 76 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 22: import {L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR} from "../common/L2ContractAddresses.sol"; ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 10: import {L2_DEPLOYER_SYSTEM_CONTRACT_ADDR} from "../../common/L2ContractAddresses.sol"; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L8-L8) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 7: import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; 8: import {IGovernance} from "./IGovernance.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 7: import {IAllowList} from "../common/interfaces/IAllowList.sol"; 8: import {IVerifier} from "./interfaces/IVerifier.sol"; 9: import {IExecutor} from "./interfaces/IExecutor.sol"; 10: import {Diamond} from "./libraries/Diamond.sol"; 11: import {Base} from "./facets/Base.sol"; 12: import {Verifier} from "./Verifier.sol"; 13: import {VerifierParams} from "./Storage.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 7: import {Diamond} from "./libraries/Diamond.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 10: import {L2_TX_MAX_GAS_LIMIT} from "../Config.sol"; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L8-L8) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 7: import {Base} from "./Base.sol"; 11: import {UncheckedMath} from "../../common/libraries/UncheckedMath.sol"; 12: import {UnsafeBytes} from "../../common/libraries/UnsafeBytes.sol"; 13: import {L2ContractHelper} from "../../common/libraries/L2ContractHelper.sol"; 14: import {VerifierParams} from "../Storage.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L5-L5), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L12-L12) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 7: import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; 10: import {Merkle} from "../libraries/Merkle.sol"; 12: import {TransactionValidator} from "../libraries/TransactionValidator.sol"; 14: import {UncheckedMath} from "../../common/libraries/UncheckedMath.sol"; 15: import {UnsafeBytes} from "../../common/libraries/UnsafeBytes.sol"; 16: import {L2ContractHelper} from "../../common/libraries/L2ContractHelper.sol"; 17: import {AddressAliasHelper} from "../../vendor/AddressAliasHelper.sol"; 18: import {IAllowList} from "../../common/interfaces/IAllowList.sol"; 19: import {Base} from "./Base.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L5-L5), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 9: import {Diamond} from "../libraries/Diamond.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 7: import {IBase} from "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 17: import {SystemContractsCaller} from "../SystemContractsCaller.sol"; ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L15-L15) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 13: import {L2_ETH_ADDRESS} from "../L2ContractHelper.sol"; ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L11-L11) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 7: import {IComplexUpgrader} from "./interfaces/IComplexUpgrader.sol"; 8: import {FORCE_DEPLOYER} from "./Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; 9: import {Utils} from "./libraries/Utils.sol"; 10: import {UnsafeBytesCalldata} from "./libraries/UnsafeBytesCalldata.sol"; 11: import {EfficientCall} from "./libraries/EfficientCall.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 7: import {IAccountCodeStorage} from "./interfaces/IAccountCodeStorage.sol"; 8: import {INonceHolder} from "./interfaces/INonceHolder.sol"; 9: import {IContractDeployer} from "./interfaces/IContractDeployer.sol"; 10: import {IKnownCodesStorage} from "./interfaces/IKnownCodesStorage.sol"; 11: import {IImmutableSimulator} from "./interfaces/IImmutableSimulator.sol"; 12: import {IEthToken} from "./interfaces/IEthToken.sol"; 13: import {IL1Messenger} from "./interfaces/IL1Messenger.sol"; 14: import {ISystemContext} from "./interfaces/ISystemContext.sol"; 15: import {ICompressor} from "./interfaces/ICompressor.sol"; 16: import {IComplexUpgrader} from "./interfaces/IComplexUpgrader.sol"; 17: import {IBootloaderUtilities} from "./interfaces/IBootloaderUtilities.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L15-L15) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 7: import {ImmutableData} from "./interfaces/IImmutableSimulator.sol"; 8: import {IContractDeployer} from "./interfaces/IContractDeployer.sol"; 11: import {Utils} from "./libraries/Utils.sol"; 12: import {EfficientCall} from "./libraries/EfficientCall.sol"; 13: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; 14: import {ISystemContract} from "./interfaces/ISystemContract.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L6-L6), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 8: import {DEPLOYER_SYSTEM_CONTRACT} from "./Constants.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 7: import {IKnownCodesStorage} from "./interfaces/IKnownCodesStorage.sol"; 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; 9: import {Utils} from "./libraries/Utils.sol"; 10: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; 9: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; 10: import {EfficientCall} from "./libraries/EfficientCall.sol"; 11: import {Utils} from "./libraries/Utils.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 7: import {IEthToken} from "./interfaces/IEthToken.sol"; 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; 10: import {IMailbox} from "./interfaces/IMailbox.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 10: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 9: import {ISystemContract} from "./interfaces/ISystemContract.sol"; 10: import {DEPLOYER_SYSTEM_CONTRACT} from "./Constants.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 7: import {ISystemContext} from "./interfaces/ISystemContext.sol"; 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; 9: import {ISystemContextDeprecated} from "./interfaces/ISystemContextDeprecated.sol"; 10: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 7: import {SystemContractHelper} from "../libraries/SystemContractHelper.sol"; 8: import {BOOTLOADER_FORMAL_ADDRESS} from "../Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 7: import {MAX_SYSTEM_CONTRACT_ADDRESS} from "../Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L5-L5)
### [D‑28] ~~Lack of unchecked in loops~~ The increment/decrement is already in an `unchecked` block *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 87: for (uint256 i = 0; i < _newBatchesData.length; ++i) { 118: for (uint256 i = 0; i < _newBatchesData.length; ++i) { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L85), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L116) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 40: for (uint256 i = 0; i < immutablesLength; ++i) { ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L38) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 33: for (uint256 i = 0; i < hashesLen; ++i) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L31) ### [D‑29] ~~Large approvals may not work with some ERC20 tokens~~ These are not maximum approvals, or approvals that grow over time, so there is no broken behavior here *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 384: IERC20(token).safeApprove(paymaster, 0); 385: IERC20(token).safeApprove(paymaster, minAllowance); ``` *GitHub*: [384](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L382-L382), [385](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L383-L383) ### [D‑30] ~~Low level calls with Solidity before 0.8.14 result in an optimiser bug~~ This assembly block does not call `mstore()`, so it's not possible to hit the bug here even if there are small future changes, so this doesn't seem low severity. *There are 59 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 54 assembly { 55 lockSlotOldValue := sload(LOCK_FLAG_ADDRESS) 56 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 57: } 72 assembly { 73 _status := sload(LOCK_FLAG_ADDRESS) 74: } 80 assembly { 81 sstore(LOCK_FLAG_ADDRESS, _ENTERED) 82: } 88 assembly { 89 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 90: } ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L52-L55), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L70-L72), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L78-L80), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L86-L88) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 22 assembly { 23 offset := add(_start, 4) 24 result := mload(add(_bytes, offset)) 25: } 29 assembly { 30 offset := add(_start, 20) 31 result := mload(add(_bytes, offset)) 32: } 36 assembly { 37 offset := add(_start, 32) 38 result := mload(add(_bytes, offset)) 39: } 43 assembly { 44 offset := add(_start, 32) 45 result := mload(add(_bytes, offset)) 46: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L20-L23), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L27-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L34-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L41-L44) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 231 assembly { 232 revert(add(returnData, 0x20), mload(returnData)) 233: } ``` *GitHub*: [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L229-L231) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 35 assembly { 36 // The pointer to the free memory slot 37 let ptr := mload(0x40) 38 // Copy function signature and arguments from calldata at zero position into memory at pointer position 39 calldatacopy(ptr, 0, calldatasize()) 40 // Delegatecall method of the implementation contract returns 0 on error 41 let result := delegatecall(gas(), facetAddress, ptr, calldatasize(), 0, 0) 42 // Get the size of the last return data 43 let size := returndatasize() 44 // Copy the size length of bytes from return data at zero position to pointer position 45 returndatacopy(ptr, 0, size) 46 // Depending on the result value 47 switch result 48 case 0 { 49 // End execution and revert state changes 50 revert(ptr, size) 51 } 52 default { 53 // Return data with length of size at pointers position 54 return(ptr, size) 55 } 56: } ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L33-L54) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 136 assembly { 137 // Copy function signature and arguments from calldata at zero position into memory at pointer position 138 calldatacopy(0, 0, calldatasize()) 139 // Call method of the zkSync contract returns 0 on error 140 let result := call(gas(), contractAddress, 0, 0, calldatasize(), 0, 0) 141 // Get the size of the last return data 142 let size := returndatasize() 143 // Copy the size length of bytes from return data at zero position to pointer position 144 returndatacopy(0, 0, size) 145 // Depending on the result value 146 switch result 147 case 0 { 148 // End execution and revert state changes 149 revert(0, size) 150 } 151 default { 152 // Return data with length of size at pointers position 153 return(0, size) 154 } 155: } ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L134-L153) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 118 assembly { 119 callSuccess := call(gas(), _to, _amount, 0, 0, 0, 0) 120: } ``` *GitHub*: [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L116-L118) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 90 assembly { 91 diamondStorage.slot := position 92: } 297 assembly { 298 revert(add(data, 0x20), mload(data)) 299: } ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L88-L90), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L295-L297) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 72 assembly { 73 sstore(addressAsKey, _hash) 74: } 83 assembly { 84 codeHash := sload(addressAsKey) 85: } ``` *GitHub*: [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L70-L72), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L81-L83) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 28 assembly { 29 if iszero(success) { 30 revert(add(returnData, 0x20), mload(returnData)) 31 } 32: } ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L26-L30) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 33 assembly { 34 return(0, 0) 35: } 51 assembly { 52 return(0, 0) 53: } 172 assembly { 173 r := mload(add(_signature, 0x20)) 174 s := mload(add(_signature, 0x40)) 175 v := and(mload(add(_signature, 0x41)), 0xff) 176: } ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L31-L33), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L49-L51), [172](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L170-L174) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 58 assembly { 59 sstore(_bytecodeHash, 1) 60: } 69 assembly { 70 marker := sload(_hash) 71: } ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L56-L58), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L67-L69) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 50 assembly { 51 revert(0, 0) 52: } ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L48-L50) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 150 assembly { 151 success := call(msgValueSimulator, callAddr, _value, _address, 0xFFFF, forwardMask, 0) 152: } 137 assembly { 138 success := call(_address, callAddr, 0, 0, 0xFFFF, 0, 0) 139: } 165 assembly { 166 success := staticcall(_address, callAddr, 0, 0xFFFF, 0, 0) 167: } 179 assembly { 180 success := delegatecall(_address, callAddr, 0, 0xFFFF, 0, 0) 181: } 205 assembly { 206 // Clearing values before usage in assembly, since Solidity 207 // doesn't do it by default 208 _whoToMimic := and(_whoToMimic, cleanupMask) 209 210 success := call(_address, callAddr, 0, 0, _whoToMimic, 0, 0) 211: } 220 assembly { 221 size := returndatasize() 222: } 225 assembly { 226 returndatacopy(add(returnData, 0x20), 0, size) 227: } 235 assembly { 236 let size := returndatasize() 237 returndatacopy(0, 0, size) 238 revert(0, size) 239: } 256 assembly { 257 dataOffset := _data.offset 258: } ``` *GitHub*: [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L148-L150), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L135-L137), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L163-L165), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L177-L179), [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L203-L209), [220](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L218-L220), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L223-L225), [235](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L233-L237), [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L254-L256) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 79 assembly { 80 // Ensuring that the type is bool 81 _isService := and(_isService, 1) 82 // This `success` is always 0, but the method always succeeds 83 // (except for the cases when there is not enough gas) 84 let success := call(_isService, callAddr, _key, _value, 0xFFFF, 0, 0) 85: } 94 assembly { 95 addr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 96: } 105 assembly { 106 pop(staticcall(0, callAddr, 0, 0xFFFF, 0, 0)) 107: } 116 assembly { 117 pop(staticcall(_farCallAbi, callAddr, 0, 0xFFFF, 0, 0)) 118: } 126 assembly { 127 // Clearing input params as they are not cleaned by Solidity by default 128 _value := and(_value, cleanupMask) 129 pop(staticcall(_value, callAddr, 0, 0xFFFF, 0, 0)) 130: } 138 assembly { 139 // Clearing input params as they are not cleaned by Solidity by default 140 _shrink := and(_shrink, cleanupMask) 141 pop(staticcall(_shrink, callAddr, 0, 0xFFFF, 0, 0)) 142: } 181 assembly { 182 // Clearing input params as they are not cleaned by Solidity by default 183 _gasToBurn := and(_gasToBurn, cleanupMask) 184 success := staticcall(_rawParams, callAddr, _gasToBurn, 0xFFFF, 0, 0) 185: } 194 assembly { 195 // Clearing input params as they are not cleaned by Solidity by default 196 _value := and(_value, cleanupMask) 197 success := call(0, callAddr, _value, 0, 0xFFFF, 0, 0) 198: } 206 assembly { 207 pop(call(initializer, callAddr, value1, 0, 0xFFFF, 0, 0)) 208: } 216 assembly { 217 pop(call(value1, callAddr, value2, 0, 0xFFFF, 0, 0)) 218: } 227 assembly { 228 meta := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 229: } 316 assembly { 317 callFlags := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 318: } 327 assembly { 328 ptr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 329: } 340 assembly { 341 extraAbiData := staticcall(index, callAddr, 0, 0xFFFF, 0, 0) 342: } ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L77-L83), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L92-L94), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L103-L105), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L114-L116), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L124-L128), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L136-L140), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L179-L183), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L192-L196), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L204-L206), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L214-L216), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L225-L227), [316](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L314-L316), [327](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L325-L327), [340](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L338-L340) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 82 assembly { 83 dataStart := add(data, 0x20) 84: } 111 assembly { 112 success := call(msgValueSimulator, callAddr, value, to, farCallAbi, forwardMask, 0) 113: } 102 assembly { 103 success := call(to, callAddr, 0, 0, farCallAbi, 0, 0) 104: } 134 assembly { 135 size := returndatasize() 136: } 139 assembly { 140 returndatacopy(add(returnData, 0x20), 0, size) 141: } 162 assembly { 163 let size := mload(returnData) 164 revert(add(returnData, 0x20), size) 165: } ``` *GitHub*: [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L80-L82), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L109-L111), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L100-L102), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L132-L134), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L137-L139), [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L160-L163) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 401 assembly { 402 success := call(gas(), bootloaderAddr, amount, 0, 0, 0, 0) 403: } ``` *GitHub*: [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L399-L401) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 22 assembly { 23 let offset := sub(_bytes.offset, 30) 24 result := calldataload(add(offset, _start)) 25: } 29 assembly { 30 let offset := sub(_bytes.offset, 28) 31 result := calldataload(add(offset, _start)) 32: } 36 assembly { 37 let offset := sub(_bytes.offset, 24) 38 result := calldataload(add(offset, _start)) 39: } 43 assembly { 44 result := calldataload(add(_bytes.offset, _start)) 45: } 49 assembly { 50 result := calldataload(add(_bytes.offset, _start)) 51: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L20-L23), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L27-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L34-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L41-L43), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L47-L49) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 302 assembly { 303 let returndata_size := mload(returndata) 304 revert(add(32, returndata), returndata_size) 305: } ``` *GitHub*: [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L300-L303)
### [D‑31] ~~Missing checks for `ecrecover()` signature malleability~~ Malleability checks are in fact present *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 190: address recoveredAddress = ecrecover(_hash, v, r, s); ``` *GitHub*: [190](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L188-L188) ### [D‑32] ~~Missing checks for state variable assignments~~ There _are_ checks for these variables *There are 12 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 99: l2TokenBeacon = _l2TokenBeacon; ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L97-L97) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 98: l2WethAddress = _l2WethAddress; ``` *GitHub*: [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L96-L96) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 56: validator = _newValidator; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L54-L54) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 51: l1Bridge = _l1Bridge; 53: l2TokenProxyBytecodeHash = _l2TokenProxyBytecodeHash; 82: l1TokenAddress[expectedL2Token] = _l1Token; ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L49-L49), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L51-L51), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L80-L80) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 50: l1Address = _l1Address; ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L48-L48) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 57: l2Bridge = _l2Bridge; 58: l1Address = _l1Address; ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L55-L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L56-L56) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 56: l1Bridge = _l1Bridge; 57: l1WethAddress = _l1WethAddress; 58: l2WethAddress = _l2WethAddress; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L54-L54), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L55-L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L56-L56)
### [D‑33] ~~Missing contract-existence checks before low-level calls~~ The contract or caller exists, or it's a transfer of funds *There are 4 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 76 /// @dev Burn tokens from a given account and send the same amount of Ether to the bridge. 77 /// @param _from The account from which tokens will be burned. 78 /// @param _amount The amount that will be burned. 79 /// @notice Should be called by the bridge before withdrawing tokens to L1. 80 function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 81 _burn(_from, _amount); 82 // sends Ether to the bridge 83 (bool success, ) = msg.sender.call{value: _amount}(""); 84 require(success, "Failed withdrawal"); 85 86: emit BridgeBurn(_from, _amount); 104 /// @notice Withdraw WETH to get Ether to a given account. 105 /// burns sender's tokens and sends Ether to the given account 106 function withdrawTo(address _to, uint256 _amount) public override { 107 _burn(msg.sender, _amount); 108 (bool success, ) = _to.call{value: _amount}(""); 109 require(success, "Failed withdrawal"); 110: } ``` *GitHub*: [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L74-L84), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L102-L108) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 17 /// @notice Executes an upgrade process by delegating calls to another contract. 18 /// @dev This function allows only the `FORCE_DEPLOYER` to initiate the upgrade. 19 /// If the delegate call fails, the function will revert the transaction, returning the error message 20 /// provided by the delegated contract. 21 /// @param _delegateTo the address of the contract to which the calls will be delegated 22 /// @param _calldata the calldata to be delegate called in the `_delegateTo` contract 23 function upgrade(address _delegateTo, bytes calldata _calldata) external payable { 24 require(msg.sender == FORCE_DEPLOYER, "Can only be called by FORCE_DEPLOYER"); 25 26 require(_delegateTo.code.length > 0, "Delegatee is an EOA"); 27 (bool success, bytes memory returnData) = _delegateTo.delegatecall(_calldata); 28 assembly { 29 if iszero(success) { 30: revert(add(returnData, 0x20), mload(returnData)) ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L15-L28) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 58 * taken to not create reentrancy vulnerabilities. Consider using 59 * {ReentrancyGuard} or the 60 * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. 61 */ 62 function sendValue(address payable recipient, uint256 amount) internal { 63 require( 64 address(this).balance >= amount, 65 "Address: insufficient balance" 66 ); 67 68 (bool success, ) = recipient.call{value: amount}(""); 69 require( 70 success, 71: "Address: unable to send value, recipient may have reverted" ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L56-L69) ### [D‑34] ~~Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, for readability~~ Well-organized data structures make code reviews easier, which may lead to fewer bugs. Consider combining related mappings into mappings to structs, so it's clear what data is related *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 56 mapping(address => uint256) public __DEPRECATED_lastWithdrawalLimitReset; 57 58 /// @dev A mapping L1 token address => the accumulated withdrawn amount during the withdrawal limit window 59 mapping(address => uint256) public __DEPRECATED_withdrawnAmountInWindow; 60 61 /// @dev The accumulated deposited amount per user. 62 /// @dev A mapping L1 token address => user address => the total deposited amount by the user 63: mapping(address => mapping(address => uint256)) public totalDepositedAmountPerUser; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L54-L61) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 24 mapping(address => AccessMode) public getAccessMode; 25 26 /// @notice The mapping that stores permissions to call the function on the target address by the caller 27 /// @dev caller => target => function signature => permission to call target function for the given caller address 28 mapping(address => mapping(address => mapping(bytes4 => bool))) public hasSpecialAccessToCall; 29 30 /// @dev The mapping L1 token address => struct Deposit 31: mapping(address => Deposit) public tokenDeposit; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L22-L29) ### [D‑35] ~~Multiple `address`/ID mappings can be combined into a single `mapping` of an `address`/ID to a `struct`, where appropriate~~ Saves a storage slot for the mapping. Depending on the circumstances and sizes of types, can avoid a Gsset (**20000 gas**) per mapping combined. Reads and subsequent writes can also be cheaper when a function requires both values and they both fit in the same storage slot. Finally, if both fields are accessed in the same function, can save **~42 gas per access** due to [not having to recalculate the key's keccak256 hash](https://gist.github.com/IllIllI000/ec23a57daa30a8f8ca8b9681c8ccefb0) (Gkeccak256 - 30 gas) and that calculation's associated stack operations. *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 56 mapping(address => uint256) public __DEPRECATED_lastWithdrawalLimitReset; 57 58 /// @dev A mapping L1 token address => the accumulated withdrawn amount during the withdrawal limit window 59 mapping(address => uint256) public __DEPRECATED_withdrawnAmountInWindow; 60 61 /// @dev The accumulated deposited amount per user. 62 /// @dev A mapping L1 token address => user address => the total deposited amount by the user 63: mapping(address => mapping(address => uint256)) public totalDepositedAmountPerUser; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L54-L61) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 24 mapping(address => AccessMode) public getAccessMode; 25 26 /// @notice The mapping that stores permissions to call the function on the target address by the caller 27 /// @dev caller => target => function signature => permission to call target function for the given caller address 28 mapping(address => mapping(address => mapping(bytes4 => bool))) public hasSpecialAccessToCall; 29 30 /// @dev The mapping L1 token address => struct Deposit 31: mapping(address => Deposit) public tokenDeposit; ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L22-L29) ### [D‑36] ~~Multiplications of powers 2 of can be replaced by a left shift operation to save gas~~ This is not safe to do in all cases, because there is no overflow protection with left bit shifts *There are 25 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 52: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 16: uint256 constant MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES = 4 + L2_TO_L1_LOG_SERIALIZE_SIZE * 512; ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 89: assert(L2_TO_L1_LOG_SERIALIZE_SIZE != 2 * 32); ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L87-L87) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 27: uint256 bitOffset = (_index & 7) * 32; 52: uint256 bitOffset = (_index & 7) * 32; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L25-L25), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L50-L50) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 99: vInt += 8 + block.chainid * 2; ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L97-L97) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 64: require(dictionary.length <= 2 ** 16 * 8, "Dictionary is too big"); 66: encodedData.length * 4 == _bytecode.length, 71: uint256 indexOfEncodedChunk = uint256(encodedData.readUint16(encodedDataPointer)) * 8; 75: uint64 realChunk = _bytecode.readUint64(encodedDataPointer * 4); 210: dictionary = _rawCompressedData[2:2 + dictionaryLen * 8]; 211: encodedData = _rawCompressedData[2 + dictionaryLen * 8:]; 254: number >>= (256 - (_calldataSlice.length * 8)); ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L62-L62), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L64-L64), [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L69-L69), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L73-L73), [210](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L208-L208), [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L209-L209), [254](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L252-L252) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 158 4 * 159: keccakGasCost(64) + 233: abi.encode(l2ToL1LogsTreeArray[2 * i], l2ToL1LogsTreeArray[2 * i + 1]) ``` *GitHub*: [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L156-L157), [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L231-L231), [233](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L231-L231) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 39: uint256 shiftedVal = _val << (lbs * 8); 74: uint256 shiftedVal = uint256(_len) << (lbs * 8); ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L37-L37), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L72-L72) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 43: uint256 constant META_GAS_PER_PUBDATA_BYTE_OFFSET = 0 * 8; 44: uint256 constant META_HEAP_SIZE_OFFSET = 8 * 8; 45: uint256 constant META_AUX_HEAP_SIZE_OFFSET = 12 * 8; 46: uint256 constant META_SHARD_ID_OFFSET = 28 * 8; 47: uint256 constant META_CALLER_SHARD_ID_OFFSET = 29 * 8; 48: uint256 constant META_CODE_SHARD_ID_OFFSET = 30 * 8; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L41-L41), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L42-L42), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L43-L43), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L44-L44), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L45-L45), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 48: codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3])); ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L46-L46)
### [D‑37] ~~Must approve or increase allowance first~~ The bot is just flagging `transferFrom()` calls without a prior approval. Many projects require you to approve their contract before using it, so this suggestion is not helpful, and certainly is not 'Low' severity, since that's the design and no funds are lost. There is no way for the project to address this issue other than by requiring that the caller send the tokens themselves, which has its own risks. *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 220: _token.safeTransferFrom(_from, address(this), _amount); ``` *GitHub*: [220](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L218-L218) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 173: IERC20(l1WethAddress).safeTransferFrom(msg.sender, address(this), _amount); ``` *GitHub*: [173](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L171-L171) ### [D‑38] ~~NatSpec: Contract declarations should have `@notice` tags~~ The compiler interprets `///` or `/**` comments [as this tag](https://docs.soliditylang.org/en/latest/natspec-format.html#tags) if one wasn't explicitly provided *There are 64 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 30: contract L1ERC20Bridge is IL1Bridge, IL1BridgeLegacy, AllowListed, ReentrancyGuard { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28-L28) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 39: contract L1WethBridge is IL1Bridge, AllowListed, ReentrancyGuard { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L37-L37) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 8: interface IL1BridgeLegacy { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 8: interface IL2ERC20Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 16 library BridgeInitializationHelper { 17 /// @dev The L2 gas limit for requesting L1 -> L2 transaction of deploying L2 bridge instance. 18 /// @dev It is big enough to deploy any contract, so we can use the same value for all bridges. 19: /// NOTE: this constant will be accurately calculated in the future. ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L14-L17) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 20: contract AllowList is IAllowList, Ownable2Step { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 11: abstract contract AllowListed { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 27 abstract contract ReentrancyGuard { 28 /// @dev Address of lock flag variable. 29 /// @dev Flag is placed at random memory location to not interfere with Storage contract. 30: // keccak256("ReentrancyGuard") - 1; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L25-L28) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 11 interface IL2ContractDeployer { 12 /// @notice A struct that describes a forced deployment on an address. 13 /// @param bytecodeHash The bytecode hash to put on an address. 14 /// @param newAddress The address on which to deploy the bytecodehash to. 15 /// @param callConstructor Whether to run the constructor on the force deployment. 16 /// @param value The `msg.value` with which to initialize a contract. 17: /// @param input The constructor calldata. ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L9-L15) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 12 library L2ContractHelper { 13: /// @dev The prefix used to create CREATE2 addresses. ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L10-L11) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 12: library UncheckedMath { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 20: library UnsafeBytes { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 22 contract Governance is IGovernance, Ownable2Step { 23: /// @notice A constant representing the timestamp for completed operations. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L20-L21) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 17 abstract contract BaseZkSyncUpgrade is Base { 18 /// @notice The struct that represents the upgrade proposal. 19 /// @param l2ProtocolUpgradeTx The system upgrade transaction. 20 /// @param factoryDeps The list of factory deps for the l2ProtocolUpgradeTx. 21 /// @param bootloaderHash The hash of the new bootloader bytecode. If zero, it will not be updated. 22 /// @param defaultAccountHash The hash of the new default account bytecode. If zero, it will not be updated. 23 /// @param verifier The address of the new verifier. If zero, the verifier will not be updated. 24 /// @param verifierParams The new verifier params. If either of its fields is 0, the params will not be updated. 25 /// @param l1ContractsUpgradeCalldata Custom calldata for L1 contracts upgrade, it may be interpreted differently 26 /// in each upgrade. Usually empty. 27 /// @param postUpgradeCalldata Custom calldata for post upgrade hook, it may be interpreted differently in each 28 /// upgrade. Usually empty. 29 /// @param upgradeTimestamp The timestamp after which the upgrade can be executed. 30 /// @param newProtocolVersion The new version number for the protocol after this upgrade. Should be greater than 31 /// the previous protocol version. 32: /// @param newAllowList The address of the new allowlist contract. If zero, it will not be updated. ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L15-L30) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 12 contract DefaultUpgrade is BaseZkSyncUpgrade { 13 /// @notice Placeholder function for custom logic for upgrading L1 contract. 14 /// Typically this function will never be used. 15 /// @param _customCallDataForUpgrade Custom data for an upgrade, which may be interpreted differently for each 16: /// upgrade. ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L10-L14) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 21 contract DiamondInit is Base { 22 /// @notice Struct that holds all data needed for initializing zkSync Diamond Proxy. 23 /// @dev We use struct instead of raw parameters in `initialize` function to prevent "Stack too deep" error 24 /// @param _verifier address of Verifier contract 25 /// @param _governor address who can manage critical updates in the contract 26 /// @param _admin address who can manage non-critical updates in the contract 27 /// @param _genesisBatchHash Batch hash of the genesis (initial) batch 28 /// @param _genesisIndexRepeatedStorageChanges The serial number of the shortcut storage key for genesis batch 29 /// @param _genesisBatchCommitment The zk-proof commitment for the genesis batch 30 /// @param _allowList The address of the allow list smart contract 31 /// @param _verifierParams Verifier config parameters that describes the circuit to be verified 32 /// @param _zkPorterIsAvailable The availability of zk porter shard 33 /// @param _l2BootloaderBytecodeHash The hash of bootloader L2 bytecode 34 /// @param _l2DefaultAccountBytecodeHash The hash of default account L2 bytecode 35: /// @param _priorityTxMaxGasLimit maximum number of the L2 gas that a user can request for L1 -> L2 transactions ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L19-L33) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 12: contract DiamondProxy { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 22: contract ValidatorTimelock is IExecutor, Ownable2Step { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 16: contract AdminFacet is Base, IAdmin { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 16: contract Base is ReentrancyGuard, AllowListed { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 20: contract ExecutorFacet is Base, IExecutor { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L18-L18) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 17: contract GettersFacet is Base, IGetters, ILegacyGetters { ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L15-L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 39: contract MailboxFacet is Base, IMailbox { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L37-L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 13: interface ILegacyGetters is IBase { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 13: library Diamond { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L11-L11) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 8 library LibMap { 9: /// @dev A uint32 map in storage. ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L6-L7) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 11: library Merkle { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 22: library PriorityQueue { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 15 library TransactionValidator { 16 /// @dev Used to validate key properties of an L1->L2 transaction 17 /// @param _transaction The transaction to validate 18 /// @param _encoded The abi encoded bytes of the transaction 19: /// @param _priorityTxMaxGasLimit The max gas limit, generally provided from Storage.sol ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L13-L17) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 22 contract L2ERC20Bridge is IL2Bridge, Initializable { 23: /// @dev The address of the L1 bridge counterpart. ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L20-L21) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 13 contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { 14 /// @dev Describes whether there is a specific getter in the token. 15 /// @notice Used to explicitly separate which getters the token has and which it does not. 16 /// @notice Different tokens in L1 can implement or not implement getter function as `name`/`symbol`/`decimals`, 17: /// @notice Our goal is to store all the getters that L1 token implements, and for others, we keep it as an unimplemented method. ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11-L15) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 23 contract L2Weth is ERC20PermitUpgradeable, IL2Weth, IL2StandardToken { 24: /// @dev Address of the L2 WETH Bridge. ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21-L22) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 23 contract L2WethBridge is IL2Bridge, Initializable { 24: /// @dev Event emitted when ETH is received by the contract. ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L21-L22) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 24: contract AccountCodeStorage is IAccountCodeStorage { ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L22-L22) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 18: contract BootloaderUtilities is IBootloaderUtilities { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L16-L16) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 16 contract ComplexUpgrader is IComplexUpgrader { 17 /// @notice Executes an upgrade process by delegating calls to another contract. 18 /// @dev This function allows only the `FORCE_DEPLOYER` to initiate the upgrade. 19 /// If the delegate call fails, the function will revert the transaction, returning the error message 20 /// provided by the delegated contract. 21 /// @param _delegateTo the address of the contract to which the calls will be delegated 22: /// @param _calldata the calldata to be delegate called in the `_delegateTo` contract ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L14-L20) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 36: contract Compressor is ICompressor, ISystemContract { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L34-L34) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 25 contract ContractDeployer is IContractDeployer, ISystemContract { 26 /// @notice Information about an account contract. 27: /// @dev For EOA and simple contracts (i.e. not accounts) this value is 0. ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L23-L25) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 21: contract DefaultAccount is IAccount { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L19-L19) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 13: contract EmptyContract { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L11-L11) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 20 contract ImmutableSimulator is IImmutableSimulator { 21 /// @dev mapping (contract address) => (index of immutable variable) => value 22: /// @notice that address uses `uint256` type to leave the option to introduce 32-byte address space in future. ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L18-L20) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 21: contract KnownCodesStorage is IKnownCodesStorage, ISystemContract { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L19-L19) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 35 contract L1Messenger is IL1Messenger, ISystemContract { 36 /// @notice Sequential hash of logs sent in the current block. 37: /// @dev Will be reset at the end of the block to zero value. ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L33-L35) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 20 contract L2EthToken is IEthToken, ISystemContract { 21: /// @notice The balances of the users. ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L18-L19) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 21 contract MsgValueSimulator is ISystemContract { 22 /// @notice Extract value, isSystemCall and to from the extraAbi params. 23 /// @dev The contract accepts value, the callee and whether the call should a system one via its ABI params. 24 /// @dev The first ABI param contains the value in the [0..127] bits. The 128th contains 25 /// the flag whether or not the call should be a system one. 26: /// The second ABI params contains the callee. ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L19-L24) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 29: contract NonceHolder is INonceHolder, ISystemContract { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L27-L27) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 19 contract SystemContext is ISystemContext, ISystemContextDeprecated, ISystemContract { 20 /// @notice The number of latest L2 blocks to store. 21 /// @dev EVM requires us to be able to query the hashes of previous 256 blocks. 22 /// We could either: 23 /// - Store the latest 256 hashes (and strictly rely that we do not accidentally override the hash of the block 256 blocks ago) 24: /// - Store the latest 257 blocks's hashes. ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L17-L22) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 15: interface INonceHolder { ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 14: interface IPaymasterFlow { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 12: interface ISystemContext { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 11: interface ISystemContextDeprecated { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 14 abstract contract ISystemContract { 15 /// @notice Modifier that makes sure that the method 16: /// can only be called via a system call. ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L12-L14) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 34 library EfficientCall { 35 /// @notice Call the `keccak256` without copying calldata to memory. 36 /// @param _data The preimage data. 37: /// @return The `keccak256` hash. ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L32-L35) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 12: library RLPEncoder { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 70 library SystemContractHelper { 71 /// @notice Send an L2Log to L1. 72 /// @param _isService The `isService` flag. 73 /// @param _key The `key` part of the L2Log. 74 /// @param _value The `value` part of the L2Log. 75 /// @dev The meaning of all these parameters is context-dependent, but they 76: /// have no intrinsic meaning per se. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L68-L74) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 70 library SystemContractsCaller { 71 /// @notice Makes a call with the `isSystem` flag. 72 /// @param gasLimit The gas limit for the call. 73 /// @param to The address to call. 74 /// @param value The value to pass with the transaction. 75 /// @param data The calldata. 76 /// @return success Whether the transaction has been successful. 77: /// @dev Note, that the `isSystem` flag can only be set when calling system contracts. ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L68-L75) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 80: library TransactionHelper { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L78-L78) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 20: library UnsafeBytesCalldata { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L18-L18) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 13 library Utils { 14: /// @dev Bit mask of bytecode hash "isConstructor" marker ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L11-L12) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 11 library Address { 12 /** 13 * @dev Returns true if `account` is a contract. 14 * 15 * [IMPORTANT] 16 * ==== 17 * It is unsafe to assume that an address for which this function returns 18 * false is an externally-owned account (EOA) and not a contract. 19 * 20 * Among others, `isContract` will return false for the following 21 * types of addresses: 22 * 23 * - an externally-owned account 24 * - a contract in construction 25 * - an address where a contract will be created 26 * - an address where a contract lived, but was destroyed 27 * ==== 28 * 29 * [IMPORTANT] 30 * ==== 31 * You shouldn't rely on `isContract` to protect against flash loan attacks! 32 * 33 * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets 34 * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract 35 * constructor. 36 * ==== 37: */ ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L9-L35)
### [D‑39] ~~NatSpec: Function declarations should have `@notice` tags~~ The compiler interprets `///` or `/**` comments [as this tag](https://docs.soliditylang.org/en/latest/natspec-format.html#tags) if one wasn't explicitly provided *There are 217 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 67: constructor(IZkSync _zkSync, IAllowList _allowList) reentrancyGuardInitializer { 85 function initialize( 86 bytes[] calldata _factoryDeps, 87 address _l2TokenBeacon, 88 address _governor, 89 uint256 _deployBridgeImplementationFee, 90 uint256 _deployBridgeProxyFee 91: ) external payable reentrancyGuardInitializer { 146 function deposit( 147 address _l2Receiver, 148 address _l1Token, 149 uint256 _amount, 150 uint256 _l2TxGasLimit, 151 uint256 _l2TxGasPerPubdataByte 152: ) external payable returns (bytes32 l2TxHash) { 178 function deposit( 179 address _l2Receiver, 180 address _l1Token, 181 uint256 _amount, 182 uint256 _l2TxGasLimit, 183 uint256 _l2TxGasPerPubdataByte, 184 address _refundRecipient 185: ) public payable nonReentrant senderCanCallFunction(allowList) returns (bytes32 l2TxHash) { 257 function claimFailedDeposit( 258 address _depositSender, 259 address _l1Token, 260 bytes32 _l2TxHash, 261 uint256 _l2BatchNumber, 262 uint256 _l2MessageIndex, 263 uint16 _l2TxNumberInBatch, 264 bytes32[] calldata _merkleProof 265: ) external nonReentrant senderCanCallFunction(allowList) { 295 function finalizeWithdrawal( 296 uint256 _l2BatchNumber, 297 uint256 _l2MessageIndex, 298 uint16 _l2TxNumberInBatch, 299 bytes calldata _message, 300 bytes32[] calldata _merkleProof 301: ) external nonReentrant senderCanCallFunction(allowList) { 355: function l2TokenAddress(address _l1Token) public view returns (address) { ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L65-L65), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L83-L89), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L144-L150), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L176-L183), [257](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L255-L263), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L293-L299), [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L353-L353) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 66: constructor(address payable _l1WethAddress, IZkSync _zkSync, IAllowList _allowList) reentrancyGuardInitializer { 83 function initialize( 84 bytes[] calldata _factoryDeps, 85 address _l2WethAddress, 86 address _governor, 87 uint256 _deployBridgeImplementationFee, 88 uint256 _deployBridgeProxyFee 89: ) external payable reentrancyGuardInitializer { 161 function deposit( 162 address _l2Receiver, 163 address _l1Token, 164 uint256 _amount, 165 uint256 _l2TxGasLimit, 166 uint256 _l2TxGasPerPubdataByte, 167 address _refundRecipient 168: ) external payable nonReentrant senderCanCallFunction(allowList) returns (bytes32 txHash) { 216 function claimFailedDeposit( 217 address, // _depositSender, 218 address, // _l1Token, 219 bytes32, // _l2TxHash 220 uint256, // _l2BatchNumber, 221 uint256, // _l2MessageIndex, 222 uint16, // _l2TxNumberInBatch, 223 bytes32[] calldata // _merkleProof 224: ) external pure { 235 function finalizeWithdrawal( 236 uint256 _l2BatchNumber, 237 uint256 _l2MessageIndex, 238 uint16 _l2TxNumberInBatch, 239 bytes calldata _message, 240 bytes32[] calldata _merkleProof 241: ) external nonReentrant senderCanCallFunction(allowList) { 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { 309: receive() external payable { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L64-L64), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L81-L87), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L159-L166), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L214-L222), [235](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L233-L239), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L302-L302), [309](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L307-L307) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 41: function canCall(address _caller, address _target, bytes4 _functionSig) external view returns (bool) { 51: function setAccessMode(address _target, AccessMode _accessMode) external onlyOwner { 60: function setBatchAccessMode(address[] calldata _targets, AccessMode[] calldata _accessModes) external onlyOwner { 85 function setBatchPermissionToCall( 86 address[] calldata _callers, 87 address[] calldata _targets, 88 bytes4[] calldata _functionSigs, 89 bool[] calldata _enables 90: ) external onlyOwner { 108 function setPermissionToCall( 109 address _caller, 110 address _target, 111 bytes4 _functionSig, 112 bool _enable 113: ) external onlyOwner { 131: function setDepositLimit(address _l1Token, bool _depositLimitation, uint256 _depositCap) external onlyOwner { 138: function getTokenDepositLimitData(address _l1Token) external view returns (Deposit memory) { ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L39-L39), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L49-L49), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L58-L58), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L83-L88), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L106-L111), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L129-L129), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L136-L136) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 27: function forceDeployOnAddresses(ForceDeployment[] calldata _deployParams) external; 33 function create2( 34 bytes32 _salt, 35 bytes32 _bytecodeHash, 36 bytes calldata _input 37: ) external; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L25-L25), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L31-L35) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 43: constructor(address _admin, address _securityCouncil, uint256 _minDelay) { 86: function isOperation(bytes32 _id) public view returns (bool) { 91: function isOperationPending(bytes32 _id) public view returns (bool) { 97: function isOperationReady(bytes32 _id) public view returns (bool) { 102: function isOperationDone(bytes32 _id) public view returns (bool) { 107: function getOperationState(bytes32 _id) public view returns (OperationState) { 131: function scheduleTransparent(Operation calldata _operation, uint256 _delay) external onlyOwner { 144: function scheduleShadow(bytes32 _id, uint256 _delay) external onlyOwner { 156: function cancel(bytes32 _id) external onlyOwnerOrSecurityCouncil { 169: function execute(Operation calldata _operation) external onlyOwnerOrSecurityCouncil { 188: function executeInstant(Operation calldata _operation) external onlySecurityCouncil { 206: function hashOperation(Operation calldata _operation) public pure returns (bytes32) { 251: function updateDelay(uint256 _newDelay) external onlySelf { 258: function updateSecurityCouncil(address _newSecurityCouncil) external onlySelf { 264: receive() external payable {} ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L41-L41), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L84-L84), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L89-L89), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L95-L95), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L100-L100), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L105-L105), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L129-L129), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L142-L142), [156](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L154-L154), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L167-L167), [188](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L186-L186), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L204-L204), [251](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L249-L249), [258](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L256-L256), [264](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L262-L262) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 69: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public virtual returns (bytes32) { ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L67-L67) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 52: constructor() reentrancyGuardInitializer {} 57: function initialize(InitializeData calldata _initalizeData) external reentrancyGuardInitializer returns (bytes32) { ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L50-L50), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L55-L55) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 22: fallback() external payable { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 54: function setValidator(address _newValidator) external onlyOwner { 61: function setExecutionDelay(uint32 _executionDelay) external onlyOwner { 73: function getCommittedBatchTimestamp(uint256 _l2BatchNumber) external view returns (uint256) { 79 function commitBatches( 80 StoredBatchInfo calldata, 81 CommitBatchInfo[] calldata _newBatchesData 82: ) external onlyValidator { 98: function revertBatches(uint256) external onlyValidator { 105 function proveBatches( 106 StoredBatchInfo calldata, 107 StoredBatchInfo[] calldata, 108 ProofInput calldata 109: ) external onlyValidator { 115: function executeBatches(StoredBatchInfo[] calldata _newBatchesData) external onlyValidator { ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L52-L52), [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L59-L59), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L71-L71), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L77-L80), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L96-L96), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L103-L107), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L113-L113) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 22: function setPendingGovernor(address _newPendingGovernor) external onlyGovernor { 31: function acceptGovernor() external { 46: function setPendingAdmin(address _newPendingAdmin) external onlyGovernorOrAdmin { 55: function acceptAdmin() external { 70: function setValidator(address _validator, bool _active) external onlyGovernorOrAdmin { 77: function setPorterAvailability(bool _zkPorterIsAvailable) external onlyGovernor { 85: function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external onlyGovernor { 100: function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external onlyGovernor { 111: function freezeDiamond() external onlyGovernor { 122: function unfreezeDiamond() external onlyGovernorOrAdmin { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L20-L20), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L29-L29), [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L44-L44), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L53-L53), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L68-L68), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L75-L75), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L83-L83), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L98-L98), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L109-L109), [122](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L120-L120) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 179 function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 180 external 181 override 182 nonReentrant 183 onlyValidator 184: { 293: function executeBatches(StoredBatchInfo[] calldata _batchesData) external nonReentrant onlyValidator { 313 function proveBatches( 314 StoredBatchInfo calldata _prevBatch, 315 StoredBatchInfo[] calldata _committedBatches, 316 ProofInput calldata _proof 317: ) external nonReentrant onlyValidator { 391: function revertBatches(uint256 _newLastBatch) external nonReentrant onlyValidator { ``` *GitHub*: [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L177-L182), [293](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L291-L291), [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L311-L315), [391](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L389-L389) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 28: function getVerifier() external view returns (address) { 33: function getGovernor() external view returns (address) { 38: function getPendingGovernor() external view returns (address) { 43: function getTotalBatchesCommitted() external view returns (uint256) { 48: function getTotalBatchesVerified() external view returns (uint256) { 53: function getTotalBatchesExecuted() external view returns (uint256) { 58: function getTotalPriorityTxs() external view returns (uint256) { 65: function getFirstUnprocessedPriorityTx() external view returns (uint256) { 70: function getPriorityQueueSize() external view returns (uint256) { 75: function priorityQueueFrontOperation() external view returns (PriorityOperation memory) { 80: function isValidator(address _address) external view returns (bool) { 85: function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32) { 92: function storedBatchHash(uint256 _batchNumber) external view returns (bytes32) { 97: function getL2BootloaderBytecodeHash() external view returns (bytes32) { 102: function getL2DefaultAccountBytecodeHash() external view returns (bytes32) { 107: function getVerifierParams() external view returns (VerifierParams memory) { 112: function getProtocolVersion() external view returns (uint256) { 117: function getL2SystemContractsUpgradeTxHash() external view returns (bytes32) { 126: function getL2SystemContractsUpgradeBatchNumber() external view returns (uint256) { 131: function isDiamondStorageFrozen() external view returns (bool) { 137: function isFacetFreezable(address _facet) external view returns (bool isFreezable) { 150: function getPriorityTxMaxGasLimit() external view returns (uint256) { 155: function getAllowList() external view returns (address) { 160: function isFunctionFreezable(bytes4 _selector) external view returns (bool) { 169: function isEthWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool) { 178: function facets() external view returns (Facet[] memory result) { 193: function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory) { 199: function facetAddresses() external view returns (address[] memory) { 205: function facetAddress(bytes4 _selector) external view returns (address) { 216: function getTotalBlocksCommitted() external view returns (uint256) { 222: function getTotalBlocksVerified() external view returns (uint256) { 228: function getTotalBlocksExecuted() external view returns (uint256) { 236: function storedBlockHash(uint256 _batchNumber) external view returns (bytes32) { 246: function getL2SystemContractsUpgradeBlockNumber() external view returns (uint256) { ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L26-L26), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L31-L31), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L36-L36), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L41-L41), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L46-L46), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L51-L51), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L56-L56), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L63-L63), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L68-L68), [75](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L73-L73), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L78-L78), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L83-L83), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L90-L90), [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L95-L95), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L100-L100), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L105-L105), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L110-L110), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L115-L115), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L124-L124), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L129-L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L135-L135), [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L148-L148), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L153-L153), [160](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L158-L158), [169](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L167-L167), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L176-L176), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L191-L191), [199](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L197-L197), [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L203-L203), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L214-L214), [222](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L220-L220), [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L226-L226), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L234-L234), [246](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L244-L244) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 51 function proveL2MessageInclusion( 52 uint256 _batchNumber, 53 uint256 _index, 54 L2Message memory _message, 55 bytes32[] calldata _proof 56: ) public view returns (bool) { 66 function proveL2LogInclusion( 67 uint256 _batchNumber, 68 uint256 _index, 69 L2Log memory _log, 70 bytes32[] calldata _proof 71: ) external view returns (bool) { 84 function proveL1ToL2TransactionStatus( 85 bytes32 _l2TxHash, 86 uint256 _l2BatchNumber, 87 uint256 _l2MessageIndex, 88 uint16 _l2TxNumberInBatch, 89 bytes32[] calldata _merkleProof, 90 TxStatus _status 91: ) public view override returns (bool) { 168 function l2TransactionBaseCost( 169 uint256 _gasPrice, 170 uint256 _l2GasLimit, 171 uint256 _l2GasPerPubdataByteLimit 172: ) public pure returns (uint256) { 194 function finalizeEthWithdrawal( 195 uint256 _l2BatchNumber, 196 uint256 _l2MessageIndex, 197 uint16 _l2TxNumberInBatch, 198 bytes calldata _message, 199 bytes32[] calldata _merkleProof 200: ) external override nonReentrant senderCanCallFunction(s.allowList) { 238 function requestL2Transaction( 239 address _contractL2, 240 uint256 _l2Value, 241 bytes calldata _calldata, 242 uint256 _l2GasLimit, 243 uint256 _l2GasPerPubdataByteLimit, 244 bytes[] calldata _factoryDeps, 245 address _refundRecipient 246: ) external payable nonReentrant senderCanCallFunction(s.allowList) returns (bytes32 canonicalTxHash) { ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L49-L54), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L64-L69), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L82-L89), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L166-L170), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L192-L198), [238](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L236-L244) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 38: constructor() { 65 function finalizeDeposit( 66 address _l1Sender, 67 address _l2Receiver, 68 address _l1Token, 69 uint256 _amount, 70 bytes calldata _data 71: ) external payable override { 107 function withdraw( 108 address _l1Receiver, 109 address _l2Token, 110 uint256 _amount 111: ) external override { 133: function l2TokenAddress(address _l1Token) public view override returns (address) { ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L36-L36), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L63-L69), [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L105-L109), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L131-L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 38: constructor() { 48: function bridgeInitialize(address _l1Address, bytes memory _data) external initializer { 111: function bridgeMint(address _to, uint256 _amount) external override onlyBridge { 120: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 144: function decodeString(bytes memory _input) external pure returns (string memory result) { 149: function decodeUint8(bytes memory _input) external pure returns (uint8 result) { ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L36-L36), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L46-L46), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L109-L109), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L118-L118), [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L142-L142), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 31: constructor() { 41: function initialize(string memory name_, string memory symbol_) external initializer { 54: function initializeV2(address _l2Bridge, address _l1Address) external reinitializer(2) { 69 function bridgeMint( 70 address, // _account 71 uint256 // _amount 72: ) external view override { 80: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 90: function deposit() external payable override { 95: function withdraw(uint256 _amount) external override { 100: function depositTo(address _to) public payable override { 106: function withdrawTo(address _to, uint256 _amount) public override { 113: receive() external payable { ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L29-L29), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L39-L39), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L52-L52), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L67-L70), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L78-L78), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L88-L88), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L93-L93), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L98-L98), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L104-L104), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L111-L111) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 38: constructor() { 47 function initialize( 48 address _l1Bridge, 49 address _l1WethAddress, 50 address _l2WethAddress 51: ) external initializer { 65 function withdraw( 66 address _l1Receiver, 67 address _l2Token, 68 uint256 _amount 69: ) external override { 90 function finalizeDeposit( 91 address _l1Sender, 92 address _l2Receiver, 93 address _l1Token, 94 uint256 _amount, 95 bytes calldata // _data 96: ) external payable override { 112: function l1TokenAddress(address _l2Token) public view override returns (address l1Token) { 117: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L36-L36), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L45-L49), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L63-L67), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L88-L94), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L110-L110), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L115-L115) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 37: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 48: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 56: function markAccountCodeHashAsConstructed(address _address) external override onlyDeployer { 80: function getRawCodeHash(address _address) public view override returns (bytes32 codeHash) { 91: function getCodeHash(uint256 _input) external view override returns (bytes32) { 119: function getCodeSize(uint256 _input) external view override returns (uint256 codeSize) { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L35-L35), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L46-L46), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L54-L54), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L78-L78), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L89-L89), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L117-L117) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 26 function getTransactionHashes( 27 Transaction calldata _transaction 28: ) external view override returns (bytes32 txHash, bytes32 signedTxHash) { ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L24-L26) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 23: function upgrade(address _delegateTo, bytes calldata _calldata) external payable { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 56 function publishCompressedBytecode( 57 bytes calldata _bytecode, 58 bytes calldata _rawCompressedData 59: ) external payable onlyCallFromBootloader returns (bytes32 bytecodeHash) { 119 function verifyCompressedStateDiffs( 120 uint256 _numberOfStateDiffs, 121 uint256 _enumerationIndexSize, 122 bytes calldata _stateDiffs, 123 bytes calldata _compressedStateDiffs 124: ) external payable onlyCallFrom(address(L1_MESSENGER_CONTRACT)) returns (bytes32 stateDiffHash) { ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L54-L57), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L117-L122) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 36: function getAccountInfo(address _address) external view returns (AccountInfo memory info) { 42: function extendedAccountVersion(address _address) public view returns (AccountAbstractionVersion) { 64: function updateAccountVersion(AccountAbstractionVersion _version) external onlySystemCall { 73: function updateNonceOrdering(AccountNonceOrdering _nonceOrdering) external onlySystemCall { 94 function getNewAddressCreate2( 95 address _sender, 96 bytes32 _bytecodeHash, 97 bytes32 _salt, 98 bytes calldata _input 99: ) public view override returns (address newAddress) { 114 function getNewAddressCreate( 115 address _sender, 116 uint256 _senderNonce 117: ) public pure override returns (address newAddress) { 132 function create2( 133 bytes32 _salt, 134 bytes32 _bytecodeHash, 135 bytes calldata _input 136: ) external payable override returns (address) { 148 function create( 149 bytes32 _salt, 150 bytes32 _bytecodeHash, 151 bytes calldata _input 152: ) external payable override returns (address) { 164 function create2Account( 165 bytes32 _salt, 166 bytes32 _bytecodeHash, 167 bytes calldata _input, 168 AccountAbstractionVersion _aaVersion 169: ) public payable override onlySystemCall returns (address) { 185 function createAccount( 186 bytes32, // salt 187 bytes32 _bytecodeHash, 188 bytes calldata _input, 189 AccountAbstractionVersion _aaVersion 190: ) public payable override onlySystemCall returns (address) { 216: function forceDeployOnAddress(ForceDeployment calldata _deployment, address _sender) external payable onlySelf { 240: function forceDeployOnAddresses(ForceDeployment[] calldata _deployments) external payable { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L34-L34), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L40-L40), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L62-L62), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L71-L71), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L92-L97), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L112-L115), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L130-L134), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L146-L150), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L162-L167), [185](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L183-L188), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L214-L214), [240](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L238-L238) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 69 function validateTransaction( 70 bytes32, // _txHash 71 bytes32 _suggestedSignedHash, 72 Transaction calldata _transaction 73: ) external payable override ignoreNonBootloader ignoreInDelegateCall returns (bytes4 magic) { 116 function executeTransaction( 117 bytes32, // _txHash 118 bytes32, // _suggestedSignedHash 119 Transaction calldata _transaction 120: ) external payable override ignoreNonBootloader ignoreInDelegateCall { 129 function executeTransactionFromOutside(Transaction calldata _transaction) external payable override { 130 // Behave the same as for fallback/receive, just execute nothing, returns nothing 131: } 200 function payForTransaction( 201 bytes32, // _txHash 202 bytes32, // _suggestedSignedHash 203 Transaction calldata _transaction 204: ) external payable ignoreNonBootloader ignoreInDelegateCall { 216 function prepareForPaymaster( 217 bytes32, // _txHash 218 bytes32, // _suggestedSignedHash 219 Transaction calldata _transaction 220: ) external payable ignoreNonBootloader ignoreInDelegateCall { ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L67-L71), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L114-L118), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L127-L129), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L198-L202), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L214-L218) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 29: function getImmutable(address _dest, uint256 _index) external view override returns (bytes32) { 36: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external override { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L27-L27), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L34-L34) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 30: function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external onlyCallFromBootloader { 42: function markBytecodeAsPublished(bytes32 _bytecodeHash) external onlyCompressor { 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L28-L28), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L40-L40), [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L66-L66) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 77 function sendL2ToL1Log( 78 bool _isService, 79 bytes32 _key, 80 bytes32 _value 81: ) external onlyCallFromSystemContract returns (uint256 logIdInMerkleTree) { 121: function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { 167 function requestBytecodeL1Publication( 168 bytes32 _bytecodeHash 169: ) external override onlyCallFrom(address(KNOWN_CODE_STORAGE_CONTRACT)) { 201 function publishPubdataAndClearState( 202 bytes calldata _totalL2ToL1PubdataAndStateDiffs 203: ) external onlyCallFromBootloader { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L75-L79), [121](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L119-L119), [167](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L165-L167), [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L199-L201) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 34: function transferFromTo(address _from, address _to, uint256 _amount) external override { 58: function balanceOf(uint256 _account) external view override returns (uint256) { 66: function mint(address _account, uint256 _amount) external override onlyCallFromBootloader { 74: function withdraw(address _l1Receiver) external payable override { 87: function withdrawWithMessage(address _l1Receiver, bytes memory _additionalData) external payable override { 130: function name() external pure override returns (string memory) { 136: function symbol() external pure override returns (string memory) { 142: function decimals() external pure override returns (uint8) { ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L32-L32), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L56-L56), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L64-L64), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L72-L72), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L85-L85), [130](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L128-L128), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L134-L134), [142](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L140-L140) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 48: function getMinNonce(address _address) public view returns (uint256) { 59: function getRawNonce(address _address) public view returns (uint256) { 67: function increaseMinNonce(uint256 _value) public onlySystemCall returns (uint256 oldMinNonce) { 84: function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 104: function getValueUnderNonce(uint256 _key) public view returns (uint256) { 112: function incrementMinNonceIfEquals(uint256 _expectedNonce) external onlySystemCall { 127: function getDeploymentNonce(address _address) external view returns (uint256 deploymentNonce) { 137: function incrementDeploymentNonce(address _address) external onlySystemCall returns (uint256 prevDeploymentNonce) { 161: function validateNonceUsage(address _address, uint256 _key, bool _shouldBeUsed) external view { ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L46-L46), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L57-L57), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L65-L65), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82-L82), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L102-L102), [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L110-L110), [127](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L125-L125), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L135-L135), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L159-L159) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 89: function setTxOrigin(address _newOrigin) external onlyCallFromBootloader { 95: function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader { 105: function getBlockHashEVM(uint256 _block) external view returns (bytes32 hash) { 139: function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash) { 145: function getBatchNumberAndTimestamp() public view returns (uint128 batchNumber, uint128 batchTimestamp) { 153: function getL2BlockNumberAndTimestamp() public view returns (uint128 blockNumber, uint128 blockTimestamp) { 163: function getBlockNumber() public view returns (uint128) { 171: function getBlockTimestamp() public view returns (uint128) { 314 function setL2Block( 315 uint128 _l2BlockNumber, 316 uint128 _l2BlockTimestamp, 317 bytes32 _expectedPrevL2BlockHash, 318 bool _isFirstInBatch, 319 uint128 _maxVirtualBlocksToCreate 320: ) external onlyCallFromBootloader { 375: function appendTransactionToCurrentL2Block(bytes32 _txHash) external onlyCallFromBootloader { 381: function publishTimestampDataToL1() external onlyCallFromBootloader { 418 function setNewBatch( 419 bytes32 _prevBatchHash, 420 uint128 _newTimestamp, 421 uint128 _expectedNewNumber, 422 uint256 _baseFee 423: ) external onlyCallFromBootloader { 445 function unsafeOverrideBatch( 446 uint256 _newTimestamp, 447 uint256 _number, 448 uint256 _baseFee 449: ) external onlyCallFromBootloader { 470: function currentBlockInfo() external view returns (uint256 blockInfo) { 477: function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp) { 483: function blockHash(uint256 _blockNumber) external view returns (bytes32 hash) { ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L87-L87), [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L93-L93), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L103-L103), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L137-L137), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L143-L143), [153](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L151-L151), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L161-L161), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L169-L169), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L312-L318), [375](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L373-L373), [381](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L379-L379), [418](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L416-L421), [445](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L443-L447), [470](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L468-L468), [477](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L475-L475), [483](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L481-L481) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 22 function validateTransaction( 23 bytes32 _txHash, 24 bytes32 _suggestedSignedHash, 25 Transaction calldata _transaction 26: ) external payable returns (bytes4 magic); ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L20-L24) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 70 function create( 71 bytes32 _salt, 72 bytes32 _bytecodeHash, 73 bytes calldata _input 74: ) external payable returns (address newAddress); 78 function createAccount( 79 bytes32 _salt, 80 bytes32 _bytecodeHash, 81 bytes calldata _input, 82 AccountAbstractionVersion _aaVersion 83: ) external payable returns (address newAddress); 86: function getAccountInfo(address _address) external view returns (AccountInfo memory info); 89: function updateAccountVersion(AccountAbstractionVersion _version) external; 92: function updateNonceOrdering(AccountNonceOrdering _nonceOrdering) external; ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L68-L72), [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L76-L81), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L84-L84), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L87-L87), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L90-L90) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 19: function getMinNonce(address _address) external view returns (uint256); 23: function getRawNonce(address _address) external view returns (uint256); 26: function increaseMinNonce(uint256 _value) external returns (uint256); 29: function setValueUnderNonce(uint256 _key, uint256 _value) external; 32: function getValueUnderNonce(uint256 _key) external view returns (uint256); 36: function incrementMinNonceIfEquals(uint256 _expectedNonce) external; 39: function getDeploymentNonce(address _address) external view returns (uint256); 42: function incrementDeploymentNonce(address _address) external returns (uint256); 45: function validateNonceUsage(address _address, uint256 _key, bool _shouldBeUsed) external view; 48: function isNonceUsed(address _address, uint256 _nonce) external view returns (bool); ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L17-L17), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L21-L21), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L24-L24), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L27-L27), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L30-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L34-L34), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L37-L37), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L40-L40), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L43-L43), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L46-L46) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 30 function validateAndPayForPaymasterTransaction( 31 bytes32 _txHash, 32 bytes32 _suggestedSignedHash, 33 Transaction calldata _transaction 34: ) external payable returns (bytes4 magic, bytes memory context); 45 function postTransaction( 46 bytes calldata _context, 47 Transaction calldata _transaction, 48 bytes32 _txHash, 49 bytes32 _suggestedSignedHash, 50 ExecutionResult _txResult, 51 uint256 _maxRefundedGas 52: ) external payable; ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L28-L32), [45](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L43-L50)
### [D‑40] ~~NatSpec: Invalid comment style~~ This isn't attempting to be NatSpec *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 33: // solhint-disable-next-line max-line-length ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L31) ### [D‑41] ~~Nesting `if`-statements is cheaper than using `&&`~~ Nesting when there's an `else`-block uses _more_ gas, not less *There are 5 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 104 if (codeHash == 0x00 && NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(account) > 0) { 105 codeHash = EMPTY_STRING_KECCAK; 106 } 107 // The contract is still on the constructor, which means it is not deployed yet, 108 // so set `keccak256("")` as a code hash. The EVM has the same behavior. 109 else if (Utils.isContractConstructing(codeHash)) { 110 codeHash = EMPTY_STRING_KECCAK; 111: } ``` *GitHub*: [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L102-L109) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 164 if (isUsed && !_shouldBeUsed) { 165 revert("Reusing the same nonce twice"); 166 } else if (!isUsed && _shouldBeUsed) { 167 revert("The nonce was not set as used"); 168: } ``` *GitHub*: [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L162-L166) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 123 } else if ( 124 _block >= currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block && 125 currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block > 0 126 ) { 127 hash = _getLatest257L2blockHash(_block); 128 } else { 129 // Important: we do not want this number to ever collide with the L2 block hash (either new or old one) and so 130 // that's why the legacy L2 blocks' hashes are keccak256(abi.encodePacked(uint32(_block))), while these are equivalent to 131 // keccak256(abi.encodePacked(_block)) 132 hash = keccak256(abi.encode(_block)); 133: } 250 if (currentVirtualL2BlockInfo.number == 0 && virtualBlockInfo.timestamp == 0) { 251 uint128 currentBatchNumber = currentBatchInfo.number; 252 253 // The virtual block is set for the first time. We can count it as 1 creation of a virtual block. 254 // Note, that when setting the virtual block number we use the batch number to make a smoother upgrade from batch number to 255 // the L2 block number. 256 virtualBlockInfo.number = currentBatchNumber; 257 // Remembering the batch number on which the upgrade to the virtual blocks has been done. 258 virtualBlockUpgradeInfo.virtualBlockStartBatch = currentBatchNumber; 259 260 require(_maxVirtualBlocksToCreate > 0, "Can't initialize the first virtual block"); 261 _maxVirtualBlocksToCreate -= 1; 262 } else if (_maxVirtualBlocksToCreate == 0) { 263 // The virtual blocks have been already initialized, but the operator didn't ask to create 264 // any new virtual blocks. So we can just return. 265 return; 266: } 333 if (currentL2BlockNumber == 0 && currentL2BlockTimestamp == 0) { 334 // Since currentL2BlockNumber and currentL2BlockTimestamp are zero it means that it is 335 // the first ever batch with L2 blocks, so we need to initialize those. 336 _upgradeL2Blocks(_l2BlockNumber, _expectedPrevL2BlockHash, _isFirstInBatch); 337 338 _setNewL2BlockData(_l2BlockNumber, _l2BlockTimestamp, _expectedPrevL2BlockHash); 339 } else if (currentL2BlockNumber == _l2BlockNumber) { 340 require(!_isFirstInBatch, "Can not reuse L2 block number from the previous batch"); 341 require(currentL2BlockTimestamp == _l2BlockTimestamp, "The timestamp of the same L2 block must be same"); 342 require( 343 _expectedPrevL2BlockHash == _getLatest257L2blockHash(_l2BlockNumber - 1), 344 "The previous hash of the same L2 block must be same" 345 ); 346 require(_maxVirtualBlocksToCreate == 0, "Can not create virtual blocks in the middle of the miniblock"); 347 } else if (currentL2BlockNumber + 1 == _l2BlockNumber) { 348 // From the checks in _upgradeL2Blocks it is known that currentL2BlockNumber can not be 0 349 bytes32 prevL2BlockHash = _getLatest257L2blockHash(currentL2BlockNumber - 1); 350 351 bytes32 pendingL2BlockHash = _calculateL2BlockHash( 352 currentL2BlockNumber, 353 currentL2BlockTimestamp, 354 prevL2BlockHash, 355 currentL2BlockTxsRollingHash 356 ); 357 358 require(_expectedPrevL2BlockHash == pendingL2BlockHash, "The current L2 block hash is incorrect"); 359 require( 360 _l2BlockTimestamp > currentL2BlockTimestamp, 361 "The timestamp of the new L2 block must be greater than the timestamp of the previous L2 block" 362 ); 363 364 // Since the new block is created, we'll clear out the rolling hash 365 _setNewL2BlockData(_l2BlockNumber, _l2BlockTimestamp, _expectedPrevL2BlockHash); 366 } else { 367 revert("Invalid new L2 block number"); 368: } ``` *GitHub*: [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L121-L131), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L248-L264), [333](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L331-L366) ### [D‑42] ~~Non-assembly method available~~ The `revert()` here is too immeshed in the assembly block to feasibly refactor it into a normal revert statement *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol /// @audit `return()` 35 assembly { 36 // The pointer to the free memory slot 37 let ptr := mload(0x40) 38 // Copy function signature and arguments from calldata at zero position into memory at pointer position 39 calldatacopy(ptr, 0, calldatasize()) 40 // Delegatecall method of the implementation contract returns 0 on error 41 let result := delegatecall(gas(), facetAddress, ptr, calldatasize(), 0, 0) 42 // Get the size of the last return data 43 let size := returndatasize() 44 // Copy the size length of bytes from return data at zero position to pointer position 45 returndatacopy(ptr, 0, size) 46 // Depending on the result value 47 switch result 48 case 0 { 49 // End execution and revert state changes 50 revert(ptr, size) 51 } 52 default { 53 // Return data with length of size at pointers position 54 return(ptr, size) 55 } 56: } ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L33-L54) ### [D‑43] ~~Non-library/interface files should use fixed compiler versions, not floating ones~~ Interfaces should not use fixed compiler versions, since they may be used by projects using a different version *There are 59 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/L2ContractAddresses.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L1-L1) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 1: pragma solidity ^0.8.13; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 1: pragma solidity ^0.8; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 1: pragma solidity ^0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 1: pragma solidity >=0.8.0; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L1-L1) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 1: pragma solidity ^0.8.1; ``` *GitHub*: [1](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L1-L1)
### [D‑44] ~~Not initializing local variables to zero saves gas~~ This is only true for state variables, and does not save gas for [local variables](https://gist.github.com/IllIllI000/e075d189c1b23dce256cd166e28f3397). The examples below are for local variables and therefore do not save gas, and are invalid. *There are 33 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 64: for (uint256 i = 0; i < targetsLength; i = i.uncheckedInc()) { 98: for (uint256 i = 0; i < callersLength; i = i.uncheckedInc()) { ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L62-L62), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L96-L96) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 227: for (uint256 i = 0; i < _calls.length; ++i) { ``` *GitHub*: [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L225-L225) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 206: for (uint256 i = 0; i < _factoryDeps.length; ++i) { ``` *GitHub*: [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L204-L204) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 87: for (uint256 i = 0; i < _newBatchesData.length; ++i) { 118: for (uint256 i = 0; i < _newBatchesData.length; ++i) { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L85-L85), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L116-L116) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 125: for (uint256 i = 0; i < emittedL2Logs.length; i = i.uncheckedAdd(L2_TO_L1_LOG_SERIALIZE_SIZE)) { 211: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 243: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 265: for (uint256 i = 0; i < _nPriorityOps; i = i.uncheckedInc()) { 295: for (uint256 i = 0; i < nBatches; i = i.uncheckedInc()) { 332: for (uint256 i = 0; i < committedBatchesLength; i = i.uncheckedInc()) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L123-L123), [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L209-L209), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L241-L241), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L263-L263), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L293-L293), [332](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L330-L330) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 184: for (uint256 i = 0; i < facetsLen; i = i.uncheckedInc()) { ``` *GitHub*: [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L182-L182) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 397: for (uint256 i = 0; i < factoryDepsLen; i = i.uncheckedInc()) { ``` *GitHub*: [397](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L395-L395) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 102: for (uint256 i = 0; i < facetCutsLength; i = i.uncheckedInc()) { 140: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 161: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 181: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L100-L100), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L138-L138), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L159-L159), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L179-L179) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 94: uint256 costForPubdata = 0; ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L92-L92) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 70: for (uint256 encodedDataPointer = 0; encodedDataPointer < encodedData.length; encodedDataPointer += 2) { 133: uint256 numInitialWritesProcessed = 0; 136: for (uint256 i = 0; i < _numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; i += STATE_DIFF_ENTRY_SIZE) { 168: for (uint256 i = 0; i < _numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; i += STATE_DIFF_ENTRY_SIZE) { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L68-L68), [133](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L131-L131), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L134-L134), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L166-L166) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 249: uint256 sumOfValues = 0; 250: for (uint256 i = 0; i < deploymentsLength; ++i) { 255: for (uint256 i = 0; i < deploymentsLength; ++i) { ``` *GitHub*: [249](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L247-L247), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L248-L248), [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L253-L253) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 40: for (uint256 i = 0; i < immutablesLength; ++i) { ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L38-L38) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 33: for (uint256 i = 0; i < hashesLen; ++i) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L31-L31) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 204: uint256 calldataPtr = 0; 213: for (uint256 i = 0; i < numberOfL2ToL1Logs; ++i) { 231: for (uint256 i = 0; i < nodesOnCurrentLevel; ++i) { 243: for (uint256 i = 0; i < numberOfMessages; ++i) { 261: for (uint256 i = 0; i < numberOfBytecodes; ++i) { ``` *GitHub*: [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L202-L202), [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L211-L211), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L229-L229), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L241-L241), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L259-L259)
### [D‑45] ~~Not using the named return variables anywhere in the function is confusing~~ The variable is in fact used, so the instances below are invalid *There are 29 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol /// @audit result /// @audit offset 21: function readUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32 result, uint256 offset) { /// @audit result /// @audit offset 28: function readAddress(bytes memory _bytes, uint256 _start) internal pure returns (address result, uint256 offset) { /// @audit result /// @audit offset 35: function readUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256 result, uint256 offset) { /// @audit result /// @audit offset 42: function readBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32 result, uint256 offset) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol /// @audit result 42: function _efficientHash(bytes32 _lhs, bytes32 _rhs) private pure returns (bytes32 result) { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L40-L40) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol /// @audit codeHash 80: function getRawCodeHash(address _address) public view override returns (bytes32 codeHash) { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L78-L78) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit marker 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L66-L66) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol /// @audit success 132: ) internal returns (bool success) { /// @audit success 161: function rawStaticCall(uint256 _gas, address _address, bytes calldata _data) internal view returns (bool success) { /// @audit success 175: function rawDelegateCall(uint256 _gas, address _address, bytes calldata _data) internal returns (bool success) { /// @audit success 200: ) internal returns (bool success) { ``` *GitHub*: [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L130-L130), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L159-L159), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L173-L173), [200](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L198-L198) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit addr 92: function getCodeAddress() internal view returns (address addr) { /// @audit success 177: function unsafePrecompileCall(uint256 _rawParams, uint32 _gasToBurn) internal view returns (bool success) { /// @audit success 191: function setValueForNextFarCall(uint128 _value) internal returns (bool success) { /// @audit meta 225: function getZkSyncMetaBytes() internal view returns (uint256 meta) { /// @audit callFlags 314: function getCallFlags() internal view returns (uint256 callFlags) { /// @audit ptr 325: function getCalldataPtr() internal view returns (uint256 ptr) { /// @audit extraAbiData 336: function getExtraAbiData(uint256 index) internal view returns (uint256 extraAbiData) { ``` *GitHub*: [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L90-L90), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L175-L175), [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L189-L189), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L223-L223), [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L312-L312), [325](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L323-L323), [336](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L334-L334) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol /// @audit success 78: function systemCall(uint32 gasLimit, address to, uint256 value, bytes memory data) internal returns (bool success) { ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L76-L76) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit success 397: function payToTheBootloader(Transaction calldata _transaction) internal returns (bool success) { ``` *GitHub*: [397](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L395-L395) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol /// @audit result 21: function readUint16(bytes calldata _bytes, uint256 _start) internal pure returns (uint16 result) { /// @audit result 28: function readUint32(bytes calldata _bytes, uint256 _start) internal pure returns (uint32 result) { /// @audit result 35: function readUint64(bytes calldata _bytes, uint256 _start) internal pure returns (uint64 result) { /// @audit result 42: function readBytes32(bytes calldata _bytes, uint256 _start) internal pure returns (bytes32 result) { /// @audit result 48: function readUint256(bytes calldata _bytes, uint256 _start) internal pure returns (uint256 result) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46)
### [D‑46] ~~Numeric values having to do with time should use time units for readability~~ There are [units](https://docs.soliditylang.org/en/latest/units-and-global-variables.html#time-units) for seconds, minutes, hours, days, and weeks, and since they're defined, they should be used *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol /// @audit 99000 72 /// For now, it is somewhat lower than the maximum number of pubdata allowed for an L2 transaction, 73 /// to ensure that the transaction is definitely processable on L2 despite any potential overhead. 74: uint256 constant PRIORITY_TX_MAX_PUBDATA = 99000; /// @audit 1200000 77 uint256 constant FAIR_L2_GAS_PRICE = 500000000; 78 79 /// @dev Even though the price for 1 byte of pubdata is 16 L1 gas, we have a slightly increased 80 /// value. 81 uint256 constant L1_GAS_PER_PUBDATA_BYTE = 17; 82 83 /// @dev The computational overhead of processing an L2 batch. 84: uint256 constant BATCH_OVERHEAD_L2_GAS = 1200000; ``` *GitHub*: [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L70-L72), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L75-L82) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol /// @audit 240 263: farCallAbiWithEmptyFatPtr |= (1 << 240); ``` *GitHub*: [263](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L261) ### [D‑47] ~~Operator += costs more gas than = + for state variables~~ Not using `+=` for non-basic-typed state variables costs an extra **[40 gas](https://gist.github.com/IllIllI000/4fc5f83a9edc6ed16677258bf58f32a5)** due to having to recalculate the mapping's value's hash *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 350: totalDepositedAmountPerUser[_l1Token][_depositor] += _amount; 347: totalDepositedAmountPerUser[_l1Token][_depositor] -= _amount; ``` *GitHub*: [350](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L348-L348), [347](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L345-L345) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 282: s.totalDepositedAmountPerUser[_depositor] += _amount; ``` *GitHub*: [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L280-L280) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 48: balance[_to] += _amount; 68: balance[_account] += _amount; 108: balance[address(this)] -= amount; ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L46-L46), [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L66-L66), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L106-L106) ### [D‑48] ~~Overly complicated arithmetic~~ At least one bot is incorrectly flagging code comments as 'complicated arithmetic' *There is one instance of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 14: /* solhint-disable max-line-length */ ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L12) ### [D‑49] ~~Public functions not used internally can be marked as external to save gas~~ After Solidity version 0.6.9 both `public` and `external` functions save the [same amount of gas](https://ethereum.stackexchange.com/a/107939), and since these files are >0.6.9, these findings are invalid *There are 18 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 355: function l2TokenAddress(address _l1Token) public view returns (address) { ``` *GitHub*: [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L353) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L302) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 69: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public virtual returns (bytes32) { ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L67) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 84 function proveL1ToL2TransactionStatus( 85 bytes32 _l2TxHash, 86 uint256 _l2BatchNumber, 87 uint256 _l2MessageIndex, 88 uint16 _l2TxNumberInBatch, 89 bytes32[] calldata _merkleProof, 90 TxStatus _status 91: ) public view override returns (bool) { 168 function l2TransactionBaseCost( 169 uint256 _gasPrice, 170 uint256 _l2GasLimit, 171 uint256 _l2GasPerPubdataByteLimit 172: ) public pure returns (uint256) { ``` *GitHub*: [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L82-L89), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L166-L170) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 125: function name() public view override returns (string memory) { 131: function symbol() public view override returns (string memory) { 137: function decimals() public view override returns (uint8) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L123), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L129), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 112: function l1TokenAddress(address _l2Token) public view override returns (address l1Token) { 117: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L110), [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L115) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 42: function extendedAccountVersion(address _address) public view returns (AccountAbstractionVersion) { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L40) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 59: function getRawNonce(address _address) public view returns (uint256) { 67: function increaseMinNonce(uint256 _value) public onlySystemCall returns (uint256 oldMinNonce) { 84: function setValueUnderNonce(uint256 _key, uint256 _value) public onlySystemCall { 104: function getValueUnderNonce(uint256 _key) public view returns (uint256) { ``` *GitHub*: [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L57), [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L65), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L82), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L102) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 163: function getBlockNumber() public view returns (uint128) { 171: function getBlockTimestamp() public view returns (uint128) { ``` *GitHub*: [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L161), [171](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L169)
### [D‑50] ~~Re-org attack~~ No specific vulnerability has been outlined, other than the fact that block chains have re-orgs, and nothing is being cloned *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 54: address l2StandardToken = address(new L2StandardERC20{salt: bytes32(0)}()); 55: l2TokenBeacon = new UpgradeableBeacon{salt: bytes32(0)}(l2StandardToken); ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L52-L52), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L53-L53) ### [D‑51] ~~Remove or replace unused state variables~~ While these are not used for storing state, they are in fact used for storage slot spacing, and cannot be removed *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 56 mapping(address => uint256) public __DEPRECATED_lastWithdrawalLimitReset; 57 58 /// @dev A mapping L1 token address => the accumulated withdrawn amount during the withdrawal limit window 59 mapping(address => uint256) public __DEPRECATED_withdrawnAmountInWindow; 60 61 /// @dev The accumulated deposited amount per user. 62 /// @dev A mapping L1 token address => user address => the total deposited amount by the user 63: mapping(address => mapping(address => uint256)) public totalDepositedAmountPerUser; 59: mapping(address => uint256) public __DEPRECATED_withdrawnAmountInWindow; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L54-L61), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L57) ### [D‑52] ~~Save gas with the use of specific import statements~~ Importing whole files rather than specific identifiers [does not waste gas](https://ethereum.stackexchange.com/questions/138876/does-solidity-optimizer-eliminate-unused-internal-functions-of-libraries), so this finding is invalid *There are 124 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 7: import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; 8: import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; 10: import "./interfaces/IL1BridgeLegacy.sol"; 11: import "./interfaces/IL1Bridge.sol"; 12: import "./interfaces/IL2Bridge.sol"; 13: import "./interfaces/IL2ERC20Bridge.sol"; 15: import "./libraries/BridgeInitializationHelper.sol"; 17: import "../zksync/interfaces/IZkSync.sol"; 18: import "../common/interfaces/IAllowList.sol"; 19: import "../common/AllowListed.sol"; 20: import "../common/libraries/UnsafeBytes.sol"; 21: import "../common/libraries/L2ContractHelper.sol"; 22: import "../common/ReentrancyGuard.sol"; 23: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L13-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L17-L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L18-L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L19-L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L20-L20), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 7: import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; 9: import "./interfaces/IL1Bridge.sol"; 10: import "./interfaces/IL2WethBridge.sol"; 11: import "./interfaces/IL2Bridge.sol"; 12: import "./interfaces/IWETH9.sol"; 13: import "../zksync/interfaces/IZkSync.sol"; 14: import "../common/interfaces/IAllowList.sol"; 16: import "./libraries/BridgeInitializationHelper.sol"; 18: import "../common/AllowListed.sol"; 19: import "../common/libraries/UnsafeBytes.sol"; 20: import "../common/ReentrancyGuard.sol"; 21: import "../common/libraries/L2ContractHelper.sol"; 23: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L12-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L14-L14), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L17-L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L18-L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L19-L19), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 7: import "../../zksync/interfaces/IZkSync.sol"; 8: import "../../vendor/AddressAliasHelper.sol"; 9: import "../../common/libraries/L2ContractHelper.sol"; 11: import "../../common/interfaces/IL2ContractDeployer.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L7-L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 7: import "@openzeppelin/contracts/access/Ownable2Step.sol"; 9: import "./interfaces/IAllowList.sol"; 10: import "./libraries/UncheckedMath.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L8-L8) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 7: import "./interfaces/IAllowList.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 7: import "../zksync/facets/Base.sol"; 8: import "../zksync/interfaces/IMailbox.sol"; 9: import "../zksync/interfaces/IVerifier.sol"; 10: import "../common/libraries/L2ContractHelper.sol"; 11: import "../zksync/libraries/TransactionValidator.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 7: import "../zksync/libraries/Diamond.sol"; 8: import "./BaseZkSyncUpgrade.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 7: import "./../zksync/interfaces/IVerifier.sol"; 8: import "../common/interfaces/IAllowList.sol"; 9: import "./libraries/PriorityQueue.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 7: import "@openzeppelin/contracts/access/Ownable2Step.sol"; 8: import "./libraries/LibMap.sol"; 9: import "./interfaces/IExecutor.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 7: import "../interfaces/IAdmin.sol"; 8: import "../libraries/Diamond.sol"; 9: import "../../common/libraries/L2ContractHelper.sol"; 11: import "./Base.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L7-L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 7: import "../Storage.sol"; 8: import "../../common/ReentrancyGuard.sol"; 9: import "../../common/AllowListed.sol"; 11: import "@openzeppelin/contracts/access/Ownable.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L7-L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L9-L9) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 7: import "./Base.sol"; 8: import "../libraries/Diamond.sol"; 9: import "../libraries/PriorityQueue.sol"; 10: import "../../common/libraries/UncheckedMath.sol"; 11: import "../interfaces/IGetters.sol"; 12: import "../interfaces/ILegacyGetters.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 7: import "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 7: import "../libraries/PriorityQueue.sol"; 9: import "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 7: import "../libraries/PriorityQueue.sol"; 8: import "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 8: import "./IBase.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 7: import "./IMailbox.sol"; 8: import "./IAdmin.sol"; 9: import "./IExecutor.sol"; 10: import "./IGetters.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L8-L8) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 7: import "@openzeppelin/contracts/utils/math/SafeCast.sol"; 8: import "../../common/libraries/UncheckedMath.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 7: import "../../common/libraries/UncheckedMath.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 7: import "@openzeppelin/contracts/utils/math/Math.sol"; 9: import "../interfaces/IMailbox.sol"; 10: import "../Config.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 7: import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; 8: import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; 10: import "./interfaces/IL1Bridge.sol"; 11: import "./interfaces/IL2Bridge.sol"; 12: import "./interfaces/IL2StandardToken.sol"; 14: import "./L2StandardERC20.sol"; 15: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L10-L10), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L13-L13) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 7: import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol"; 8: import "./interfaces/IL2StandardToken.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 7: import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol"; 9: import "./interfaces/IL2Weth.sol"; 10: import "./interfaces/IL2StandardToken.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 7: import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; 9: import "./interfaces/IL2Bridge.sol"; 10: import "./interfaces/IL2Weth.sol"; 11: import "./interfaces/IL2StandardToken.sol"; 14: import "../vendor/AddressAliasHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L9-L9), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 7: import "./interfaces/IAccountCodeStorage.sol"; 8: import "./libraries/Utils.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 7: import "./interfaces/IBootloaderUtilities.sol"; 8: import "./libraries/TransactionHelper.sol"; 9: import "./libraries/RLPEncoder.sol"; 10: import "./libraries/EfficientCall.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 7: import "./interfaces/IAccount.sol"; 8: import "./libraries/TransactionHelper.sol"; 9: import "./libraries/SystemContractHelper.sol"; 10: import "./libraries/EfficientCall.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 7: import "./interfaces/IImmutableSimulator.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 7: import "./libraries/Utils.sol"; 8: import "./libraries/EfficientCall.sol"; 9: import "./interfaces/ISystemContract.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 7: import "./interfaces/INonceHolder.sol"; 8: import "./interfaces/IContractDeployer.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 7: import "../libraries/TransactionHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 7: import "../libraries/TransactionHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 7: import "../libraries/TransactionHelper.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 7: import "./SystemContractHelper.sol"; 8: import "./Utils.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 8: import "./Utils.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 7: import "../openzeppelin/token/ERC20/IERC20.sol"; 8: import "../openzeppelin/token/ERC20/utils/SafeERC20.sol"; 10: import "../interfaces/IPaymasterFlow.sol"; 11: import "../interfaces/IContractDeployer.sol"; 13: import "./RLPEncoder.sol"; 14: import "./EfficientCall.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L9-L9), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 6: import "./EfficientCall.sol"; ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L4-L4)
### [D‑53] ~~Shorten the array rather than copying to a new one~~ None of these examples are of filtering out entries from an array. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 211 bytes32[] memory l2ToL1LogsTreeArray = new bytes32[](L2_TO_L1_LOGS_MERKLE_TREE_LEAVES); 212 bytes32 reconstructedChainedLogsHash; 213 for (uint256 i = 0; i < numberOfL2ToL1Logs; ++i) { 214: bytes32 hashedLog = EfficientCall.keccak( ``` *GitHub*: [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L209-L212) ### [D‑54] ~~State variable read in a loop~~ these references to the variable cannot be cached, or that are `constant`/`immutable` *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit committedBatchTimestamp 88: committedBatchTimestamp.set(_newBatchesData[i].batchNumber, timestamp); /// @audit committedBatchTimestamp 119: uint256 commitBatchTimestamp = committedBatchTimestamp.get(_newBatchesData[i].batchNumber); ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L86-L86), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L117-L117) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol /// @audit immutableDataStorage 43: immutableDataStorage[uint256(uint160(_dest))][index] = value; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L41-L41) ### [D‑55] ~~State variables not capped at reasonable values~~ These assignments already have the necessary checks *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 89: s.priorityTxMaxGasLimit = _newPriorityTxMaxGasLimit; ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L87-L87) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 396: s.totalBatchesVerified = _newLastBatch; 398: s.totalBatchesCommitted = _newLastBatch; ``` *GitHub*: [396](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L394-L394), [398](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L396-L396) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 48: balance[_to] += _amount; ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L46-L46) ### [D‑56] ~~Storage Write Removal Bug On Conditional Early Termination~~ In solidity versions 0.8.13 through 0.8.16, there is a [bug](https://blog.soliditylang.org/2022/09/08/storage-write-removal-before-conditional-termination/) involving the use of the Yul functions `return()` and `stop()`. If those functions aren't called, or if the Solidity version doesn't match, the finding is not low severity. *There are 60 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 54 assembly { 55 lockSlotOldValue := sload(LOCK_FLAG_ADDRESS) 56 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 57: } 72 assembly { 73 _status := sload(LOCK_FLAG_ADDRESS) 74: } 80 assembly { 81 sstore(LOCK_FLAG_ADDRESS, _ENTERED) 82: } 88 assembly { 89 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 90: } ``` *GitHub*: [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L52-L55), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L70-L72), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L78-L80), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L86-L88) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 22 assembly { 23 offset := add(_start, 4) 24 result := mload(add(_bytes, offset)) 25: } 29 assembly { 30 offset := add(_start, 20) 31 result := mload(add(_bytes, offset)) 32: } 36 assembly { 37 offset := add(_start, 32) 38 result := mload(add(_bytes, offset)) 39: } 43 assembly { 44 offset := add(_start, 32) 45 result := mload(add(_bytes, offset)) 46: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L20-L23), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L27-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L34-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L41-L44) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 231 assembly { 232 revert(add(returnData, 0x20), mload(returnData)) 233: } ``` *GitHub*: [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L229-L231) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 118 assembly { 119 callSuccess := call(gas(), _to, _amount, 0, 0, 0, 0) 120: } 401 assembly { 402 mstore(add(hashedFactoryDeps, mul(add(i, 1), 32)), hashedBytecode) 403: } ``` *GitHub*: [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L116-L118), [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L399-L401) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 90 assembly { 91 diamondStorage.slot := position 92: } 297 assembly { 298 revert(add(data, 0x20), mload(data)) 299: } ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L88-L90), [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L295-L297) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 43 assembly { 44 mstore(0x00, _lhs) 45 mstore(0x20, _rhs) 46 result := keccak256(0x00, 0x40) 47: } ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L41-L45) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 72 assembly { 73 sstore(addressAsKey, _hash) 74: } 83 assembly { 84 codeHash := sload(addressAsKey) 85: } ``` *GitHub*: [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L70-L72), [83](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L81-L83) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 28 assembly { 29 if iszero(success) { 30 revert(add(returnData, 0x20), mload(returnData)) 31 } 32: } ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L26-L30) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 172 assembly { 173 r := mload(add(_signature, 0x20)) 174 s := mload(add(_signature, 0x40)) 175 v := and(mload(add(_signature, 0x41)), 0xff) 176: } ``` *GitHub*: [172](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L170-L174) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 58 assembly { 59 sstore(_bytecodeHash, 1) 60: } 69 assembly { 70 marker := sload(_hash) 71: } ``` *GitHub*: [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L56-L58), [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L67-L69) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 50 assembly { 51 revert(0, 0) 52: } ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L48-L50) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 150 assembly { 151 success := call(msgValueSimulator, callAddr, _value, _address, 0xFFFF, forwardMask, 0) 152: } 137 assembly { 138 success := call(_address, callAddr, 0, 0, 0xFFFF, 0, 0) 139: } 165 assembly { 166 success := staticcall(_address, callAddr, 0, 0xFFFF, 0, 0) 167: } 179 assembly { 180 success := delegatecall(_address, callAddr, 0, 0xFFFF, 0, 0) 181: } 205 assembly { 206 // Clearing values before usage in assembly, since Solidity 207 // doesn't do it by default 208 _whoToMimic := and(_whoToMimic, cleanupMask) 209 210 success := call(_address, callAddr, 0, 0, _whoToMimic, 0, 0) 211: } 220 assembly { 221 size := returndatasize() 222: } 225 assembly { 226 returndatacopy(add(returnData, 0x20), 0, size) 227: } 235 assembly { 236 let size := returndatasize() 237 returndatacopy(0, 0, size) 238 revert(0, size) 239: } 256 assembly { 257 dataOffset := _data.offset 258: } ``` *GitHub*: [150](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L148-L150), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L135-L137), [165](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L163-L165), [179](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L177-L179), [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L203-L209), [220](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L218-L220), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L223-L225), [235](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L233-L237), [256](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L254-L256) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 18 assembly { 19 // In the first byte we write the encoded length as 0x80 + 0x14 == 0x94. 20 mstore(add(encoded, 0x20), 0x9400000000000000000000000000000000000000000000000000000000000000) 21 // Write address data without stripping zeros. 22 mstore(add(encoded, 0x21), shiftedVal) 23: } 41 assembly { 42 mstore(add(encoded, 0x21), shiftedVal) 43: } 76 assembly { 77 mstore(add(encoded, 0x21), shiftedVal) 78: } ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L16-L21), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L39-L41), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L74-L76) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 79 assembly { 80 // Ensuring that the type is bool 81 _isService := and(_isService, 1) 82 // This `success` is always 0, but the method always succeeds 83 // (except for the cases when there is not enough gas) 84 let success := call(_isService, callAddr, _key, _value, 0xFFFF, 0, 0) 85: } 94 assembly { 95 addr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 96: } 105 assembly { 106 pop(staticcall(0, callAddr, 0, 0xFFFF, 0, 0)) 107: } 116 assembly { 117 pop(staticcall(_farCallAbi, callAddr, 0, 0xFFFF, 0, 0)) 118: } 126 assembly { 127 // Clearing input params as they are not cleaned by Solidity by default 128 _value := and(_value, cleanupMask) 129 pop(staticcall(_value, callAddr, 0, 0xFFFF, 0, 0)) 130: } 138 assembly { 139 // Clearing input params as they are not cleaned by Solidity by default 140 _shrink := and(_shrink, cleanupMask) 141 pop(staticcall(_shrink, callAddr, 0, 0xFFFF, 0, 0)) 142: } 181 assembly { 182 // Clearing input params as they are not cleaned by Solidity by default 183 _gasToBurn := and(_gasToBurn, cleanupMask) 184 success := staticcall(_rawParams, callAddr, _gasToBurn, 0xFFFF, 0, 0) 185: } 194 assembly { 195 // Clearing input params as they are not cleaned by Solidity by default 196 _value := and(_value, cleanupMask) 197 success := call(0, callAddr, _value, 0, 0xFFFF, 0, 0) 198: } 206 assembly { 207 pop(call(initializer, callAddr, value1, 0, 0xFFFF, 0, 0)) 208: } 216 assembly { 217 pop(call(value1, callAddr, value2, 0, 0xFFFF, 0, 0)) 218: } 227 assembly { 228 meta := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 229: } 316 assembly { 317 callFlags := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 318: } 327 assembly { 328 ptr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0) 329: } 340 assembly { 341 extraAbiData := staticcall(index, callAddr, 0, 0xFFFF, 0, 0) 342: } ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L77-L83), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L92-L94), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L103-L105), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L114-L116), [126](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L124-L128), [138](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L136-L140), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L179-L183), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L192-L196), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L204-L206), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L214-L216), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L225-L227), [316](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L314-L316), [327](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L325-L327), [340](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L338-L340) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 82 assembly { 83 dataStart := add(data, 0x20) 84: } 111 assembly { 112 success := call(msgValueSimulator, callAddr, value, to, farCallAbi, forwardMask, 0) 113: } 102 assembly { 103 success := call(to, callAddr, 0, 0, farCallAbi, 0, 0) 104: } 134 assembly { 135 size := returndatasize() 136: } 139 assembly { 140 returndatacopy(add(returnData, 0x20), 0, size) 141: } 162 assembly { 163 let size := mload(returnData) 164 revert(add(returnData, 0x20), size) 165: } ``` *GitHub*: [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L80-L82), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L109-L111), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L100-L102), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L132-L134), [139](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L137-L139), [162](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L160-L163) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 401 assembly { 402 success := call(gas(), bootloaderAddr, amount, 0, 0, 0, 0) 403: } ``` *GitHub*: [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L399-L401) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 22 assembly { 23 let offset := sub(_bytes.offset, 30) 24 result := calldataload(add(offset, _start)) 25: } 29 assembly { 30 let offset := sub(_bytes.offset, 28) 31 result := calldataload(add(offset, _start)) 32: } 36 assembly { 37 let offset := sub(_bytes.offset, 24) 38 result := calldataload(add(offset, _start)) 39: } 43 assembly { 44 result := calldataload(add(_bytes.offset, _start)) 45: } 49 assembly { 50 result := calldataload(add(_bytes.offset, _start)) 51: } ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L20-L23), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L27-L30), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L34-L37), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L41-L43), [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L47-L49) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 302 assembly { 303 let returndata_size := mload(returndata) 304 revert(add(32, returndata), returndata_size) 305: } ``` *GitHub*: [302](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L300-L303)
### [D‑57] ~~Style guide: `constant`/`immutable` variable names should use capital letters and underscores~~ These are already CONSTANT_CASE *There are 50 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 20: uint256 constant DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT = 10000000; 23: uint256 constant REQUIRED_L2_GAS_PRICE_PER_PUBDATA = 800; ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L18-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/common/L2ContractAddresses.sol 8: address constant L2_DEPLOYER_SYSTEM_CONTRACT_ADDR = address(0x8006); 17: address constant L2_FORCE_DEPLOYER_ADDR = address(0x8007); 20: address constant L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR = address(0x8008); 23: address constant L2_BOOTLOADER_ADDRESS = address(0x8001); 26: address constant L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR = address(0x800a); 29: address constant L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR = address(0x8004); 32: address constant L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR = address(0x800b); 35: address constant L2_BYTECODE_COMPRESSOR_SYSTEM_CONTRACT_ADDR = address(0x800e); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L6-L6), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L15-L15), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L18-L18), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L21-L21), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L24-L24), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L27-L27), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L30-L30), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/L2ContractAddresses.sol#L33-L33) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 14: bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2"); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L12-L12) ```solidity File: cache/solpp-generated-contracts/zksync/Config.sol 13: uint256 constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88; 16: uint256 constant MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES = 4 + L2_TO_L1_LOG_SERIALIZE_SIZE * 512; 21: bytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e520241c4744aff26ed411f4c4b00f8af09adada43ba; 38: bytes32 constant DEFAULT_L2_LOGS_TREE_ROOT_HASH = bytes32(0); 41: uint256 constant PRIORITY_OPERATION_L2_TX_TYPE = 255; 44: uint256 constant SYSTEM_UPGRADE_L2_TX_TYPE = 254; 66: uint256 constant L2_TX_MAX_GAS_LIMIT = 80000000; 77: uint256 constant FAIR_L2_GAS_PRICE = 500000000; 81: uint256 constant L1_GAS_PER_PUBDATA_BYTE = 17; 84: uint256 constant BATCH_OVERHEAD_L2_GAS = 1200000; 87: uint256 constant BATCH_OVERHEAD_L1_GAS = 1000000; 99: uint256 constant L1_TX_INTRINSIC_L2_GAS = 167157; 102: uint256 constant L1_TX_INTRINSIC_PUBDATA = 88; 105: uint256 constant L1_TX_MIN_L2_GAS_BASE = 173484; 108: uint256 constant L1_TX_DELTA_544_ENCODING_BYTES = 1656; 111: uint256 constant L1_TX_DELTA_FACTORY_DEPS_L2_GAS = 2473; 114: uint256 constant L1_TX_DELTA_FACTORY_DEPS_PUBDATA = 64; 120: uint256 constant REQUIRED_L2_GAS_PRICE_PER_PUBDATA = 800; 124: uint256 constant PACKED_L2_BLOCK_TIMESTAMP_MASK = 0xffffffffffffffffffffffffffffffff; ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L11-L11), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L14-L14), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L19-L19), [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L36-L36), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L39-L39), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L42-L42), [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L64-L64), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L75-L75), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L79-L79), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L82-L82), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L85-L85), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L97-L97), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L100-L100), [105](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L103-L103), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L106-L106), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L109-L109), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L112-L112), [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L118-L118), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Config.sol#L122-L122) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 22: uint256 constant L2_LOG_ADDRESS_OFFSET = 4; 25: uint256 constant L2_LOG_KEY_OFFSET = 24; 28: uint256 constant L2_LOG_VALUE_OFFSET = 56; ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L20-L20), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L23-L23), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L26-L26) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol 28: address constant SHA256_SYSTEM_CONTRACT = address(0x02); 53: IL1Messenger constant L1_MESSENGER_CONTRACT = IL1Messenger(address(SYSTEM_CONTRACTS_OFFSET + 0x08)); 58: address constant KECCAK256_SYSTEM_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x10); 79: bytes32 constant CREATE2_PREFIX = 0x2020dba91b30cc0006188af794c2fb30dd8520db7e2c088b7fc7c103c00ca494; 104: uint256 constant L2_TO_L1_LOGS_MERKLE_TREE_LEAVES = 2048; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L26-L26), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L51-L51), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L56-L56), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L77-L77), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L102-L102) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 65: uint256 internal constant SHA256_ROUND_GAS_COST = 7; 68: uint256 internal constant SHA256_ROUND_NUMBER_OF_BYTES = 64; ``` *GitHub*: [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L63-L63), [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L66-L66) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 27: uint256 constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88; 32: bytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e520241c4744aff26ed411f4c4b00f8af09adada43ba; ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L25-L25), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L30-L30) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 38: uint256 constant UINT32_MASK = 0xffffffff; 39: uint256 constant UINT128_MASK = 0xffffffffffffffffffffffffffffffff; ``` *GitHub*: [38](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L36-L36), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L37-L37) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 14: address constant TO_L1_CALL_ADDRESS = address((1 << 16) - 1); ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 17: uint8 constant EIP_712_TX_TYPE = 0x71; 22: uint8 constant EIP_2930_TX_TYPE = 0x01; 24: uint8 constant EIP_1559_TX_TYPE = 0x02; 84: bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId)"); 86 bytes32 constant EIP712_TRANSACTION_TYPE_HASH = 87 keccak256( 88 "Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)" 89: ); ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L15-L15), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L20-L20), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L22-L22), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L82-L82), [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L84-L87)
### [D‑58] ~~Style guide: Contract does not follow the Solidity style guide's suggested layout ordering~~ There are no issues with contract layout in these contracts *There are 75 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 30: contract L1ERC20Bridge is IL1Bridge, IL1BridgeLegacy, AllowListed, ReentrancyGuard { ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L28) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1BridgeLegacy.sol 8: interface IL1BridgeLegacy { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1BridgeLegacy.sol#L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2Bridge.sol#L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2ERC20Bridge.sol 8: interface IL2ERC20Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2ERC20Bridge.sol#L6) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL2WethBridge.sol 7: interface IL2WethBridge { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL2WethBridge.sol#L5) ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IWETH9.sol 6: interface IWETH9 { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IWETH9.sol#L4) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol 16: library BridgeInitializationHelper { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L14) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 20: contract AllowList is IAllowList, Ownable2Step { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L18) ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 11: abstract contract AllowListed { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L9) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IL2ContractDeployer.sol 11: interface IL2ContractDeployer { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IL2ContractDeployer.sol#L9) ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol 12: library L2ContractHelper { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L10) ```solidity File: cache/solpp-generated-contracts/common/libraries/UncheckedMath.sol 12: library UncheckedMath { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UncheckedMath.sol#L10) ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol 20: library UnsafeBytes { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L18) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 17: abstract contract BaseZkSyncUpgrade is Base { ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L15) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 12: contract DefaultUpgrade is BaseZkSyncUpgrade { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L10) ```solidity File: cache/solpp-generated-contracts/vendor/AddressAliasHelper.sol 23: library AddressAliasHelper { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/vendor/AddressAliasHelper.sol#L21) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 21: contract DiamondInit is Base { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L19) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 12: contract DiamondProxy { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L10) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 16: contract AdminFacet is Base, IAdmin { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 16: contract Base is ReentrancyGuard, AllowListed { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L14) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 20: contract ExecutorFacet is Base, IExecutor { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L18) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 17: contract GettersFacet is Base, IGetters, ILegacyGetters { ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L15) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 39: contract MailboxFacet is Base, IMailbox { ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L37) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IBase.sol 6: interface IBase { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IBase.sol#L4) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 11: interface IGetters is IBase { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L9) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/ILegacyGetters.sol 13: interface ILegacyGetters is IBase { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol#L11) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IZkSync.sol 12: interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IZkSync.sol#L10) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 8: library LibMap { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L6) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 11: library Merkle { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L9) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 22: library PriorityQueue { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L20) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 15: library TransactionValidator { ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L13) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 22: contract L2ERC20Bridge is IL2Bridge, Initializable { ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L20) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 8: interface IL1Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL1Bridge.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 8: interface IL2Bridge { ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L6) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 6: interface IL2Weth { ``` *GitHub*: [6](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L4) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 24: contract AccountCodeStorage is IAccountCodeStorage { ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L22) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 18: contract BootloaderUtilities is IBootloaderUtilities { ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L16) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 16: contract ComplexUpgrader is IComplexUpgrader { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L14) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 36: contract Compressor is ICompressor, ISystemContract { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L34) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 25: contract ContractDeployer is IContractDeployer, ISystemContract { ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L23) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 21: contract DefaultAccount is IAccount { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L19) ```solidity File: cache-zk/solpp-generated-contracts/EmptyContract.sol 13: contract EmptyContract { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/EmptyContract.sol#L11) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 20: contract ImmutableSimulator is IImmutableSimulator { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L18) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 21: contract KnownCodesStorage is IKnownCodesStorage, ISystemContract { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L19) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 20: contract L2EthToken is IEthToken, ISystemContract { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L18) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 21: contract MsgValueSimulator is ISystemContract { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L19) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 29: contract NonceHolder is INonceHolder, ISystemContract { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L27) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 19: contract SystemContext is ISystemContext, ISystemContextDeprecated, ISystemContract { ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L17) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccount.sol 11: interface IAccount { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccount.sol#L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IAccountCodeStorage.sol 7: interface IAccountCodeStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IAccountCodeStorage.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IBootloaderUtilities.sol 9: interface IBootloaderUtilities { ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IBootloaderUtilities.sol#L7) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IComplexUpgrader.sol 7: interface IComplexUpgrader { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IComplexUpgrader.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ICompressor.sol 14: interface ICompressor { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ICompressor.sol#L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 7: interface IContractDeployer { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 12: interface IImmutableSimulator { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 7: interface IKnownCodesStorage { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 37: interface IL1Messenger { ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L35) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL2StandardToken.sol 7: interface IL2StandardToken { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL2StandardToken.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IMailbox.sol 7: interface IMailbox { ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IMailbox.sol#L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 15: interface INonceHolder { ``` *GitHub*: [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L13) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymaster.sol 16: interface IPaymaster { ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymaster.sol#L14) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IPaymasterFlow.sol 14: interface IPaymasterFlow { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IPaymasterFlow.sol#L12) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 12: interface ISystemContext { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L10) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContextDeprecated.sol 11: interface ISystemContextDeprecated { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContextDeprecated.sol#L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 14: abstract contract ISystemContract { ``` *GitHub*: [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L12) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol 34: library EfficientCall { ``` *GitHub*: [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L32) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 12: library RLPEncoder { ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L10) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol 70: library SystemContractHelper { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L68) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol 70: library SystemContractsCaller { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L68) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 80: library TransactionHelper { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L78) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol 20: library UnsafeBytesCalldata { ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L18) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 13: library Utils { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L11) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 11: library Address { ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L9)
### [D‑59] ~~Style guide: Do not use underscore at the end of variable name~~ The style guide says to add a trailing underscore to a variable name in order to prevent the shadowing of [another variable](https://docs.soliditylang.org/en/latest/style-guide.html#avoiding-naming-collisions) or function name, as is the case with the examples below. *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 29: uint8 private decimals_; ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L27-L27) ### [D‑60] ~~Style guide: Function Names Not in mixedCase~~ According to the Solidity Style Guide, non-`external`/`public` function names should begin with an [underscore](https://docs.soliditylang.org/en/latest/style-guide.html#underscore-prefix-for-non-external-functions-and-variables), and all of these fall into that category *There are 83 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 218: function _depositFunds(address _from, IERC20 _token, uint256 _amount) internal returns (uint256) { 227 function _getDepositL2Calldata( 228 address _l1Sender, 229 address _l2Receiver, 230 address _l1Token, 231 uint256 _amount 232: ) internal view returns (bytes memory txCalldata) { 325 function _parseL2WithdrawalMessage( 326 bytes memory _l2ToL1message 327: ) internal pure returns (address l1Receiver, address l1Token, uint256 amount) { 342: function _verifyDepositLimit(address _l1Token, address _depositor, uint256 _amount, bool _claiming) internal { ``` *GitHub*: [218](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L216-L216), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L225-L230), [325](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L323-L325), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L340-L340) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 201 function _getDepositL2Calldata( 202 address _l1Sender, 203 address _l2Receiver, 204 address _l1Token, 205 uint256 _amount 206: ) internal pure returns (bytes memory txCalldata) { 274 function _parseL2EthWithdrawalMessage( 275 bytes memory _message 276: ) internal view returns (address l1WethReceiver, uint256 ethAmount) { ``` *GitHub*: [201](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L199-L204), [274](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L272-L274) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 70: function _setAccessMode(address _target, AccessMode _accessMode) internal { 118: function _setPermissionToCall(address _caller, address _target, bytes4 _functionSig, bool _enable) internal { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L68-L68), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L116-L116) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 48: function _initializeReentrancyGuard() private { ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L46-L46) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 217: function _schedule(bytes32 _id, uint256 _delay) internal { 226: function _execute(Call[] calldata _calls) internal { 241: function _checkPredecessorDone(bytes32 _predecessorId) internal view { ``` *GitHub*: [217](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L215-L215), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L224-L224), [241](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L239-L239) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 79: function _setL2DefaultAccountBytecodeHash(bytes32 _l2DefaultAccountBytecodeHash) private { 96: function _setL2BootloaderBytecodeHash(bytes32 _l2BootloaderBytecodeHash) private { 113: function _setVerifier(IVerifier _newVerifier) private { 129: function _setVerifierParams(VerifierParams calldata _newVerifierParams) private { 146: function _upgradeVerifier(address _newVerifier, VerifierParams calldata _verifierParams) internal { 154: function _setBaseSystemContracts(bytes32 _bootloaderHash, bytes32 _defaultAccountHash) internal { 163 function _setL2SystemContractUpgrade( 164 IMailbox.L2CanonicalTransaction calldata _l2ProtocolUpgradeTx, 165 bytes[] calldata _factoryDeps, 166 uint256 _newProtocolVersion 167: ) internal returns (bytes32) { 202: function _verifyFactoryDeps(bytes[] calldata _factoryDeps, uint256[] calldata _expectedHashes) private pure { 216: function _setNewProtocolVersion(uint256 _newProtocolVersion) internal { 236: function _setAllowList(IAllowList _newAllowList) internal { ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L77-L77), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L94-L94), [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L111-L111), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L127-L127), [146](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L144-L144), [154](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L152-L152), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L161-L165), [202](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L200-L200), [216](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L214-L214), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L234-L234) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 17: function _upgradeL1Contract(bytes calldata _customCallDataForUpgrade) internal virtual {} 23: function _postUpgrade(bytes calldata _customCallDataForUpgrade) internal virtual {} ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L15-L15), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L21-L21) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 134: function _propagateToZkSync() internal { ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L132-L132) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 29 function _commitOneBatch( 30 StoredBatchInfo memory _previousBatch, 31 CommitBatchInfo calldata _newBatch, 32 bytes32 _expectedSystemContractUpgradeTxHash 33: ) internal view returns (StoredBatchInfo memory) { 76 function _verifyBatchTimestamp( 77 uint256 _packedBatchAndL2BlockTimestamp, 78 uint256 _expectedBatchTimestamp, 79 uint256 _previousBatchTimestamp 80: ) internal view { 103 function _processL2Logs(CommitBatchInfo calldata _newBatch, bytes32 _expectedSystemContractUpgradeTxHash) 104 internal 105 pure 106 returns ( 107 uint256 numberOfLayer1Txs, 108 bytes32 chainedPriorityTxsHash, 109 bytes32 previousBatchHash, 110 bytes32 stateDiffHash, 111 bytes32 l2LogsTreeRoot, 112 uint256 packedBatchAndL2BlockTimestamp 113 ) 114: { 207 function _commitBatchesWithoutSystemContractsUpgrade( 208 StoredBatchInfo memory _lastCommittedBatchData, 209 CommitBatchInfo[] calldata _newBatchesData 210: ) internal { 227 function _commitBatchesWithSystemContractsUpgrade( 228 StoredBatchInfo memory _lastCommittedBatchData, 229 CommitBatchInfo[] calldata _newBatchesData, 230 bytes32 _systemContractUpgradeTxHash 231: ) internal { 262: function _collectOperationsFromPriorityQueue(uint256 _nPriorityOps) internal returns (bytes32 concatHash) { 275: function _executeOneBatch(StoredBatchInfo memory _storedBatch, uint256 _executedBatchIdx) internal { 369 function _getBatchProofPublicInput( 370 bytes32 _prevBatchCommitment, 371 bytes32 _currentBatchCommitment, 372 VerifierParams memory _verifierParams 373: ) internal pure returns (uint256) { 410: function _maxU256(uint256 a, uint256 b) internal pure returns (uint256) { 415 function _createBatchCommitment(CommitBatchInfo calldata _newBatchData, bytes32 _stateDiffHash) 416 internal 417 view 418 returns (bytes32) 419: { 427: function _batchPassThroughData(CommitBatchInfo calldata _batch) internal pure returns (bytes memory) { 437: function _batchMetaParameters() internal view returns (bytes memory) { 441 function _batchAuxiliaryOutput(CommitBatchInfo calldata _batch, bytes32 _stateDiffHash) 442 internal 443 pure 444 returns (bytes memory) 445: { 460: function _hashStoredBatchInfo(StoredBatchInfo memory _storedBatchInfo) internal pure returns (bytes32) { 465: function _checkBit(uint256 _bitMap, uint8 _index) internal pure returns (bool) { 470: function _setBit(uint256 _bitMap, uint8 _index) internal pure returns (uint256) { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L27-L31), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L74-L78), [103](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L101-L112), [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L205-L208), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L225-L229), [262](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L260-L260), [275](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L273-L273), [369](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L367-L371), [410](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L408-L408), [415](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L413-L417), [427](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L425-L425), [437](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L435-L435), [441](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L439-L443), [460](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L458-L458), [465](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L463-L463), [470](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L468-L468) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 115: function _withdrawFunds(address _to, uint256 _amount) internal { 125 function _proveL2LogInclusion( 126 uint256 _batchNumber, 127 uint256 _index, 128 L2Log memory _log, 129 bytes32[] calldata _proof 130: ) internal view returns (bool) { 181: function _deriveL2GasPrice(uint256 _l1GasPrice, uint256 _gasPricePerPubdata) internal pure returns (uint256) { 277: function _verifyDepositLimit(address _depositor, uint256 _amount) internal { 285 function _requestL2Transaction( 286 address _sender, 287 address _contractAddressL2, 288 uint256 _l2Value, 289 bytes calldata _calldata, 290 uint256 _l2GasLimit, 291 uint256 _l2GasPerPubdataByteLimit, 292 bytes[] calldata _factoryDeps, 293 bool _isFree, 294 address _refundRecipient 295: ) internal returns (bytes32 canonicalTxHash) { 331 function _serializeL2Transaction( 332 WritePriorityOpParams memory _priorityOpParams, 333 bytes calldata _calldata, 334 bytes[] calldata _factoryDeps 335: ) internal pure returns (L2CanonicalTransaction memory transaction) { 358 function _writePriorityOp( 359 WritePriorityOpParams memory _priorityOpParams, 360 bytes calldata _calldata, 361 bytes[] calldata _factoryDeps 362: ) internal returns (bytes32 canonicalTxHash) { 390 function _hashFactoryDeps(bytes[] calldata _factoryDeps) 391 internal 392 pure 393 returns (uint256[] memory hashedFactoryDeps) 394: { 408 function _parseL2WithdrawalMessage(bytes memory _message) 409 internal 410 pure 411 returns (address l1Receiver, uint256 amount) 412: { ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L113-L113), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L123-L128), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L179-L179), [277](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L275-L275), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L283-L293), [331](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L329-L333), [358](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L356-L360), [390](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L388-L392), [408](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L406-L410) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 93: function _deployL2Token(address _l1Token, bytes calldata _data) internal returns (address) { 124 function _getL1WithdrawMessage( 125 address _to, 126 address _l1Token, 127 uint256 _amount 128: ) internal pure returns (bytes memory) { 142: function _getCreate2Salt(address _l1Token) internal pure returns (bytes32 salt) { 149: function _deployBeaconProxy(bytes32 salt) internal returns (BeaconProxy proxy) { ``` *GitHub*: [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L91-L91), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L122-L126), [142](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L140-L140), [149](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L147-L147) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 70: function _storeCodeHash(address _address, bytes32 _hash) internal { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L68-L68) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 204 function _decodeRawBytecode( 205 bytes calldata _rawCompressedData 206: ) internal pure returns (bytes calldata dictionary, bytes calldata encodedData) { 227 function _verifyValueCompression( 228 uint256 _initialValue, 229 uint256 _finalValue, 230 uint256 _operation, 231 bytes calldata _compressedValue 232: ) internal pure { 252: function _sliceToUint256(bytes calldata _calldataSlice) internal pure returns (uint256 number) { ``` *GitHub*: [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L202-L204), [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L225-L230), [252](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L250-L250) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 57: function _storeAccountInfo(address _address, AccountInfo memory _newInfo) internal { 260 function _nonSystemDeployOnAddress( 261 bytes32 _bytecodeHash, 262 address _newAddress, 263 AccountAbstractionVersion _aaVersion, 264 bytes calldata _input 265: ) internal { 285 function _performDeployOnAddress( 286 bytes32 _bytecodeHash, 287 address _newAddress, 288 AccountAbstractionVersion _aaVersion, 289 bytes calldata _input 290: ) internal { 304: function _ensureBytecodeIsKnown(bytes32 _bytecodeHash) internal view { 312: function _storeConstructingByteCodeHashOnAddress(address _newAddress, bytes32 _bytecodeHash) internal { 324 function _constructContract( 325 address _sender, 326 address _newAddress, 327 bytes32 _bytecodeHash, 328 bytes calldata _input, 329 bool _isSystem, 330 bool _callConstructor 331: ) internal { ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L55-L55), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L258-L263), [285](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L283-L288), [304](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L302-L302), [312](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L310-L310), [324](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L322-L329) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 80 function _validateTransaction( 81 bytes32 _suggestedSignedHash, 82 Transaction calldata _transaction 83: ) internal returns (bytes4 magic) { 135: function _execute(Transaction calldata _transaction) internal { 163: function _isValidSignature(bytes32 _hash, bytes memory _signature) internal view returns (bool) { ``` *GitHub*: [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L78-L81), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L133-L133), [163](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L161-L161) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 49: function _markBytecodeAsPublished(bytes32 _bytecodeHash, bool _shouldSendToL1) internal { 77: function _validateBytecode(bytes32 _bytecodeHash) internal pure { ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L47-L47), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L75-L75) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 100: function _processL2ToL1Log(L2ToL1Log memory _l2ToL1Log) internal returns (uint256 logIdInMerkleTree) { ``` *GitHub*: [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L98-L98) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 101: function _burnMsgValue() internal returns (uint256 amount) { 114: function _getL1WithdrawMessage(address _to, uint256 _amount) internal pure returns (bytes memory) { 119 function _getExtendedWithdrawMessage( 120 address _to, 121 uint256 _amount, 122 address _sender, 123 bytes memory _additionalData 124: ) internal pure returns (bytes memory) { ``` *GitHub*: [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L99-L99), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L112-L112), [119](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L117-L122) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol 27: function _getAbiParams() internal view returns (uint256 value, bool isSystemCall, address to) { ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L25-L25) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 174: function _splitRawNonce(uint256 _rawMinNonce) internal pure returns (uint256 deploymentNonce, uint256 minNonce) { ``` *GitHub*: [174](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L172-L172) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 178: function _getLatest257L2blockHash(uint256 _block) internal view returns (bytes32) { 185: function _setL2BlockHash(uint256 _block, bytes32 _hash) internal { 194 function _calculateL2BlockHash( 195 uint128 _blockNumber, 196 uint128 _blockTimestamp, 197 bytes32 _prevL2BlockHash, 198 bytes32 _blockTxsRollingHash 199: ) internal pure returns (bytes32) { 206: function _calculateLegacyL2BlockHash(uint128 _blockNumber) internal pure returns (bytes32) { 214: function _upgradeL2Blocks(uint128 _l2BlockNumber, bytes32 _expectedPrevL2BlockHash, bool _isFirstInBatch) internal { 236 function _setVirtualBlock( 237 uint128 _l2BlockNumber, 238 uint128 _maxVirtualBlocksToCreate, 239 uint128 _newTimestamp 240: ) internal { 287: function _setNewL2BlockData(uint128 _l2BlockNumber, uint128 _l2BlockTimestamp, bytes32 _prevL2BlockHash) internal { 401: function _ensureBatchConsistentWithL2Block(uint128 _newTimestamp) internal view { ``` *GitHub*: [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L176-L176), [185](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L183-L183), [194](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L192-L197), [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L204-L204), [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L212-L212), [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L234-L238), [287](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L285-L285), [401](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L399-L399)
### [D‑61] ~~Style guide: Prefer double quotes for string quoting~~ The examples below are not strings. Furthermore it's perfectly reasonable to use single quotes within text ([p. 16](https://www.ox.ac.uk/sites/files/oxford/media_wysiwyg/University%20of%20Oxford%20Style%20Guide.pdf)). *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 79: /// NOTE: variables prefixed with '__DEPRECATED_' are deprecated and shouldn't be used. ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L77) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 46: /// @dev The function can only be called once during contract deployment due to the 'initializer' modifier. ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L44) ### [D‑62] ~~The result of function calls should be cached rather than re-calling the function~~ These cannot be cached *There are 6 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 49: emit ChangeSecurityCouncil(address(0), _securityCouncil); 52: emit ChangeMinDelay(0, _minDelay); ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L47-L47), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L50-L50) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 39: emit NewPendingGovernor(pendingGovernor, address(0)); 40: emit NewGovernor(previousGovernor, pendingGovernor); 63: emit NewPendingAdmin(pendingAdmin, address(0)); 64: emit NewAdmin(previousAdmin, pendingAdmin); ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L37-L37), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L38-L38), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L61-L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L62-L62) ### [D‑63] ~~Timestamp may be manipulation~~ Use of `block.timestamp`, in and of itself, is not evidence of an issue; there must be an incorrect usage in the code in order for there to be a vulnerability. There should also be a corresponding suggested fix. *There are 8 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 113: } else if (timestamp > block.timestamp) { 221: timestamps[_id] = block.timestamp + _delay; ``` *GitHub*: [113](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L111-L111), [221](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L219-L219) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 74: require(block.timestamp >= _proposedUpgrade.upgradeTimestamp, "Upgrade is not ready yet"); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L72-L72) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 86: uint32 timestamp = uint32(block.timestamp); 125: require(block.timestamp >= commitBatchTimestamp + delay, "5c"); // The delay is not passed ``` *GitHub*: [86](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L84-L84), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L123-L123) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 95: require(block.timestamp - COMMIT_TIMESTAMP_NOT_OLDER <= batchTimestamp, "h1"); // New batch timestamp is too small 96: require(lastL2BlockTimestamp <= block.timestamp + COMMIT_TIMESTAMP_APPROXIMATION_DELTA, "h2"); // The last L2 block timestamp is too big ``` *GitHub*: [95](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L93-L93), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L94-L94) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 297: uint64 expirationTimestamp = uint64(block.timestamp + PRIORITY_EXPIRATION); // Safe to cast ``` *GitHub*: [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L295-L295) ### [D‑64] ~~Tokens may be minted to `address(0x0)`~~ In the cases below, `_mint()` prevents minting to `address(0x0)` *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 111 function bridgeMint(address _to, uint256 _amount) external override onlyBridge { 112 _mint(_to, _amount); 113 emit BridgeMint(_to, _amount); 114: } ``` *GitHub*: [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L109-L112) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 100 function depositTo(address _to) public payable override { 101 _mint(_to, msg.value); 102: } ``` *GitHub*: [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L98-L100) ### [D‑65] ~~Unnecessary look up in if condition~~ *There are 26 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 313: require(msg.sender == l1WethAddress || msg.sender == address(zkSync), "pn"); ``` *GitHub*: [313](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L311-L311) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 44 accessMode == AccessMode.Public || 45: (accessMode == AccessMode.SpecialAccessOnly && hasSpecialAccessToCall[_caller][_target][_functionSig]); ``` *GitHub*: [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L42-L43) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 74: msg.sender == owner() || msg.sender == securityCouncil, 93: return state == OperationState.Waiting || state == OperationState.Ready; 242: require(_predecessorId == bytes32(0) || isOperationDone(_predecessorId), "Predecessor operation not completed"); ``` *GitHub*: [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L72-L72), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L91-L91), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L240-L240) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 131 _newVerifierParams.recursionNodeLevelVkHash == bytes32(0) || 132 _newVerifierParams.recursionLeafLevelVkHash == bytes32(0) || 133: _newVerifierParams.recursionCircuitsSetVksHash == bytes32(0) 131 _newVerifierParams.recursionNodeLevelVkHash == bytes32(0) || 132: _newVerifierParams.recursionLeafLevelVkHash == bytes32(0) || ``` *GitHub*: [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L129-L131), [131](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L129-L130) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol 27: require(msg.data.length >= 4 || msg.data.length == 0, "Ut"); 33: require(!diamondStorage.isFrozen || !facet.isFreezable, "q1"); // Facet is frozen ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L25-L25), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L31-L31) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 27: require(msg.sender == s.governor || msg.sender == s.admin, "Only by governor or admin"); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L25-L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 191: if (systemContractsUpgradeTxHash == bytes32(0) || s.l2SystemContractsUpgradeBatchNumber != 0) { ``` *GitHub*: [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L189-L189) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 94: require(vInt == 27 || vInt == 28, "Invalid v value"); 193: require(vInt == 27 || vInt == 28, "Invalid v value"); 288: require(vInt == 27 || vInt == 28, "Invalid v value"); ``` *GitHub*: [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L92-L92), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L191-L191), [288](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L286-L286) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 236: if (_operation == 0 || _operation == 3) { ``` *GitHub*: [236](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L234-L234) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 242: msg.sender == FORCE_DEPLOYER || msg.sender == address(COMPLEX_UPGRADER_CONTRACT), ``` *GitHub*: [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L240-L240) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 148 selector == DEPLOYER_SYSTEM_CONTRACT.create.selector || 149 selector == DEPLOYER_SYSTEM_CONTRACT.create2.selector || 150 selector == DEPLOYER_SYSTEM_CONTRACT.createAccount.selector || 151: selector == DEPLOYER_SYSTEM_CONTRACT.create2Account.selector; 148 selector == DEPLOYER_SYSTEM_CONTRACT.create.selector || 149 selector == DEPLOYER_SYSTEM_CONTRACT.create2.selector || 150: selector == DEPLOYER_SYSTEM_CONTRACT.createAccount.selector || 148 selector == DEPLOYER_SYSTEM_CONTRACT.create.selector || 149: selector == DEPLOYER_SYSTEM_CONTRACT.create2.selector || 177: require(v == 27 || v == 28, "v is neither 27 nor 28"); ``` *GitHub*: [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L146-L149), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L146-L148), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L146-L147), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L175-L175) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 36 msg.sender == MSG_VALUE_SYSTEM_CONTRACT || 37 msg.sender == address(DEPLOYER_SYSTEM_CONTRACT) || 38: msg.sender == BOOTLOADER_FORMAL_ADDRESS, 36 msg.sender == MSG_VALUE_SYSTEM_CONTRACT || 37: msg.sender == address(DEPLOYER_SYSTEM_CONTRACT) || ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L34-L36), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L34-L35) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 151: return (_nonce < getMinNonce(_address) || nonceValues[addressAsKey][_nonce] > 0); ``` *GitHub*: [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L149-L149) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 117: if (blockNumber <= _block || blockNumber - _block > 256) { ``` *GitHub*: [117](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L115-L115) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 19: SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender), ``` *GitHub*: [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L17-L17) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 97: return _addr == uint256(uint160(address(ETH_TOKEN_SYSTEM_CONTRACT))) || _addr == 0; ``` *GitHub*: [97](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L95-L95)
### [D‑66] ~~Unsafe downcast~~ When a type is downcast to a smaller type, the higher order bits are truncated, effectively applying a modulo to the original value. Without any other checks, this wrapping will lead to unexpected behavior and bugs *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/libraries/L2ContractHelper.sol /// @audit uint8 42: uint8 version = uint8(_bytecodeHash[0]); ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/L2ContractHelper.sol#L40) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit uint64 432: uint64(0), // index repeated storage changes in zkPorter ``` *GitHub*: [432](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L430) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit uint192 375: layer2Tip: uint192(0) // TODO: Restore after fee modeling will be stable. (SMA-1230) ``` *GitHub*: [375](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L373) ### [D‑67] ~~Unused `event` definition~~ These events are referenced by contracts other than the one that defined it *There are 46 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/interfaces/IL1Bridge.sol 9 event DepositInitiated( 10 bytes32 indexed l2DepositTxHash, 11 address indexed from, 12 address indexed to, 13 address l1Token, 14 uint256 amount 15: ); 17: event WithdrawalFinalized(address indexed to, address indexed l1Token, uint256 amount); 19: event ClaimedFailedDeposit(address indexed to, address indexed l1Token, uint256 amount); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L7-L13), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L15-L15), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/interfaces/IL1Bridge.sol#L17-L17) ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 13: event UpdateAccessMode(address indexed target, AccessMode previousMode, AccessMode newMode); 16: event UpdateCallPermission(address indexed caller, address indexed target, bytes4 indexed functionSig, bool status); ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L11-L11), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L14-L14) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 67: event TransparentOperationScheduled(bytes32 indexed _id, uint256 delay, Operation _operation); 70: event ShadowOperationScheduled(bytes32 indexed _id, uint256 delay); 73: event OperationExecuted(bytes32 indexed _id); 76: event ChangeSecurityCouncil(address _securityCouncilBefore, address _securityCouncilAfter); 79: event ChangeMinDelay(uint256 _delayBefore, uint256 _delayAfter); 82: event OperationCancelled(bytes32 indexed _id); ``` *GitHub*: [67](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L65-L65), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L68-L68), [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L71-L71), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L74-L74), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L77-L77), [82](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L80-L80) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 63: event UpgradeComplete(uint256 indexed newProtocolVersion, bytes32 indexed l2UpgradeTxHash, ProposedUpgrade upgrade); ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L61-L61) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol 33: event IsPorterAvailableStatusUpdate(bool isPorterAvailable); 36: event ValidatorStatusUpdate(address indexed validatorAddress, bool isActive); 40: event NewPendingGovernor(address indexed oldPendingGovernor, address indexed newPendingGovernor); 43: event NewGovernor(address indexed oldGovernor, address indexed newGovernor); 47: event NewPendingAdmin(address indexed oldPendingAdmin, address indexed newPendingAdmin); 50: event NewAdmin(address indexed oldAdmin, address indexed newAdmin); 53: event NewPriorityTxMaxGasLimit(uint256 oldPriorityTxMaxGasLimit, uint256 newPriorityTxMaxGasLimit); 56: event ExecuteUpgrade(Diamond.DiamondCutData diamondCut); 59: event Freeze(); 62: event Unfreeze(); ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L31-L31), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L34-L34), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L38-L38), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L41-L41), [47](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L45-L45), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L48-L48), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L51-L51), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L54-L54), [59](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L57-L57), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L60-L60) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 96: event BlockCommit(uint256 indexed batchNumber, bytes32 indexed batchHash, bytes32 indexed commitment); 100: event BlocksVerification(uint256 indexed previousLastVerifiedBatch, uint256 indexed currentLastVerifiedBatch); 104: event BlockExecution(uint256 indexed batchNumber, bytes32 indexed batchHash, bytes32 indexed commitment); 108: event BlocksRevert(uint256 totalBatchesCommitted, uint256 totalBatchesVerified, uint256 totalBatchesExecuted); ``` *GitHub*: [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L94-L94), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L98-L98), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L102-L102), [108](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L106-L106) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 144 event NewPriorityRequest( 145 uint256 txId, 146 bytes32 txHash, 147 uint64 expirationTimestamp, 148 L2CanonicalTransaction transaction, 149 bytes[] factoryDeps 150: ); 155: event EthWithdrawalFinalized(address indexed to, uint256 amount); ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L142-L148), [155](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L153-L153) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Bridge.sol 9 event FinalizeDeposit( 10 address indexed l1Sender, 11 address indexed l2Receiver, 12 address indexed l2Token, 13 uint256 amount 14: ); 16 event WithdrawalInitiated( 17 address indexed l2Sender, 18 address indexed l1Receiver, 19 address indexed l2Token, 20 uint256 amount 21: ); ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L7-L12), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Bridge.sol#L14-L19) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2StandardToken.sol 8: event BridgeInitialize(address indexed l1Token, string name, string symbol, uint8 decimals); 10: event BridgeMint(address indexed _account, uint256 _amount); 12: event BridgeBurn(address indexed _account, uint256 _amount); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L6-L6), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L8-L8), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2StandardToken.sol#L10-L10) ```solidity File: cache-zk/solpp-generated-contracts/bridge/interfaces/IL2Weth.sol 7: event Initialize(string name, string symbol, uint8 decimals); ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/interfaces/IL2Weth.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 35 event ContractDeployed( 36 address indexed deployerAddress, 37 bytes32 indexed bytecodeHash, 38 address indexed contractAddress 39: ); 41: event AccountNonceOrderingUpdated(address indexed accountAddress, AccountNonceOrdering nonceOrdering); 43: event AccountVersionUpdated(address indexed accountAddress, AccountAbstractionVersion aaVersion); ``` *GitHub*: [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L33-L37), [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L39-L39), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L41-L41) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 26: event Mint(address indexed account, uint256 amount); 28: event Transfer(address indexed from, address indexed to, uint256 value); 30: event Withdrawal(address indexed _l2Sender, address indexed _l1Receiver, uint256 _amount); 32 event WithdrawalWithMessage( 33 address indexed _l2Sender, 34 address indexed _l1Receiver, 35 uint256 _amount, 36 bytes _additionalData 37: ); ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L24-L24), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L26-L26), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L28-L28), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L30-L35) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IKnownCodesStorage.sol 8: event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1); ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IKnownCodesStorage.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 40: event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message); 42: event L2ToL1LogSent(L2ToL1Log _l2log); 44: event BytecodeL1PublicationRequested(bytes32 _bytecodeHash); ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L38-L38), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L40-L40), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L42-L42) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/INonceHolder.sol 16: event ValueSetUnderNonce(address indexed accountAddress, uint256 indexed key, uint256 value); ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/INonceHolder.sol#L14-L14)
### [D‑68] ~~Unused `struct` definition~~ These structs are used outside of the defining contract *There are 27 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/interfaces/IAllowList.sol 31 struct Deposit { 32 bool depositLimitation; 33 uint256 depositCap; 34: } ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/interfaces/IAllowList.sol#L29-L32) ```solidity File: cache/solpp-generated-contracts/governance/IGovernance.sol 24 struct Call { 25 address target; 26 uint256 value; 27 bytes data; 28: } 34 struct Operation { 35 Call[] calls; 36 bytes32 predecessor; 37 bytes32 salt; 38: } ``` *GitHub*: [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L22-L26), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/IGovernance.sol#L32-L36) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 33 struct ProposedUpgrade { 34 IMailbox.L2CanonicalTransaction l2ProtocolUpgradeTx; 35 bytes[] factoryDeps; 36 bytes32 bootloaderHash; 37 bytes32 defaultAccountHash; 38 address verifier; 39 VerifierParams verifierParams; 40 bytes l1ContractsUpgradeCalldata; 41 bytes postUpgradeCalldata; 42 uint256 upgradeTimestamp; 43 uint256 newProtocolVersion; 44 address newAllowList; 45: } ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L31-L43) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 49 struct L2Log { 50 uint8 l2ShardId; 51 bool isService; 52 uint16 txNumberInBatch; 53 address sender; 54 bytes32 key; 55 bytes32 value; 56: } 63 struct L2Message { 64 uint16 txNumberInBatch; 65 address sender; 66 bytes data; 67: } 70 struct VerifierParams { 71 bytes32 recursionNodeLevelVkHash; 72 bytes32 recursionLeafLevelVkHash; 73 bytes32 recursionCircuitsSetVksHash; 74: } 81 struct AppStorage { 82 /// @dev Storage of variables needed for deprecated diamond cut facet 83 uint256[7] __DEPRECATED_diamondCutStorage; 84 /// @notice Address which will exercise critical changes to the Diamond Proxy (upgrades, freezing & unfreezing) 85 address governor; 86 /// @notice Address that the governor proposed as one that will replace it 87 address pendingGovernor; 88 /// @notice List of permitted validators 89 mapping(address => bool) validators; 90 /// @dev Verifier contract. Used to verify aggregated proof for batches 91 IVerifier verifier; 92 /// @notice Total number of executed batches i.e. batches[totalBatchesExecuted] points at the latest executed batch 93 /// (batch 0 is genesis) 94 uint256 totalBatchesExecuted; 95 /// @notice Total number of proved batches i.e. batches[totalBatchesProved] points at the latest proved batch 96 uint256 totalBatchesVerified; 97 /// @notice Total number of committed batches i.e. batches[totalBatchesCommitted] points at the latest committed 98 /// batch 99 uint256 totalBatchesCommitted; 100 /// @dev Stored hashed StoredBatch for batch number 101 mapping(uint256 => bytes32) storedBatchHashes; 102 /// @dev Stored root hashes of L2 -> L1 logs 103 mapping(uint256 => bytes32) l2LogsRootHashes; 104 /// @dev Container that stores transactions requested from L1 105 PriorityQueue.Queue priorityQueue; 106 /// @dev The smart contract that manages the list with permission to call contract functions 107 IAllowList allowList; 108 /// @notice Part of the configuration parameters of ZKP circuits. Used as an input for the verifier smart contract 109 VerifierParams verifierParams; 110 /// @notice Bytecode hash of bootloader program. 111 /// @dev Used as an input to zkp-circuit. 112 bytes32 l2BootloaderBytecodeHash; 113 /// @notice Bytecode hash of default account (bytecode for EOA). 114 /// @dev Used as an input to zkp-circuit. 115 bytes32 l2DefaultAccountBytecodeHash; 116 /// @dev Indicates that the porter may be touched on L2 transactions. 117 /// @dev Used as an input to zkp-circuit. 118 bool zkPorterIsAvailable; 119 /// @dev The maximum number of the L2 gas that a user can request for L1 -> L2 transactions 120 /// @dev This is the maximum number of L2 gas that is available for the "body" of the transaction, i.e. 121 /// without overhead for proving the batch. 122 uint256 priorityTxMaxGasLimit; 123 /// @dev Storage of variables needed for upgrade facet 124 UpgradeStorage __DEPRECATED_upgrades; 125 /// @dev A mapping L2 batch number => message number => flag. 126 /// @dev The L2 -> L1 log is sent for every withdrawal, so this mapping is serving as 127 /// a flag to indicate that the message was already processed. 128 /// @dev Used to indicate that eth withdrawal was already processed 129 mapping(uint256 => mapping(uint256 => bool)) isEthWithdrawalFinalized; 130 /// @dev The most recent withdrawal time and amount reset 131 uint256 __DEPRECATED_lastWithdrawalLimitReset; 132 /// @dev The accumulated withdrawn amount during the withdrawal limit window 133 uint256 __DEPRECATED_withdrawnAmountInWindow; 134 /// @dev A mapping user address => the total deposited amount by the user 135 mapping(address => uint256) totalDepositedAmountPerUser; 136 /// @dev Stores the protocol version. Note, that the protocol version may not only encompass changes to the 137 /// smart contracts, but also to the node behavior. 138 uint256 protocolVersion; 139 /// @dev Hash of the system contract upgrade transaction. If 0, then no upgrade transaction needs to be done. 140 bytes32 l2SystemContractsUpgradeTxHash; 141 /// @dev Batch number where the upgrade transaction has happened. If 0, then no upgrade transaction has happened 142 /// yet. 143 uint256 l2SystemContractsUpgradeBatchNumber; 144 /// @dev Address which will exercise non-critical changes to the Diamond Proxy (changing validator set & unfreezing) 145 address admin; 146 /// @notice Address that the governor or admin proposed as one that will replace admin role 147 address pendingAdmin; 148: } ``` *GitHub*: [49](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L47-L54), [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L61-L65), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L68-L72), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L79-L146) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol 40 struct StoredBatchInfo { 41 uint64 batchNumber; 42 bytes32 batchHash; 43 uint64 indexRepeatedStorageChanges; 44 uint256 numberOfLayer1Txs; 45 bytes32 priorityOperationsHash; 46 bytes32 l2LogsTreeRoot; 47 uint256 timestamp; 48 bytes32 commitment; 49: } 62 struct CommitBatchInfo { 63 uint64 batchNumber; 64 uint64 timestamp; 65 uint64 indexRepeatedStorageChanges; 66 bytes32 newStateRoot; 67 uint256 numberOfLayer1Txs; 68 bytes32 priorityOperationsHash; 69 bytes32 bootloaderHeapInitialContentsHash; 70 bytes32 eventsQueueStateHash; 71 bytes systemLogs; 72 bytes totalL2ToL1Pubdata; 73: } 76 struct ProofInput { 77 uint256[] recursiveAggregationInput; 78 uint256[] serializedProof; 79: } ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L38-L47), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L60-L71), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L74-L77) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol 69 struct Facet { 70 address addr; 71 bytes4[] selectors; 72: } ``` *GitHub*: [69](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L67-L70) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol 37 struct L2CanonicalTransaction { 38 uint256 txType; 39 uint256 from; 40 uint256 to; 41 uint256 gasLimit; 42 uint256 gasPerPubdataByteLimit; 43 uint256 maxFeePerGas; 44 uint256 maxPriorityFeePerGas; 45 uint256 paymaster; 46 uint256 nonce; 47 uint256 value; 48 // In the future, we might want to add some 49 // new fields to the struct. The `txData` struct 50 // is to be passed to account and any changes to its structure 51 // would mean a breaking change to these accounts. To prevent this, 52 // we should keep some fields as "reserved". 53 // It is also recommended that their length is fixed, since 54 // it would allow easier proof integration (in case we will need 55 // some special circuit for preprocessing transactions). 56 uint256[4] reserved; 57 bytes data; 58 bytes signature; 59 uint256[] factoryDeps; 60 bytes paymasterInput; 61 // Reserved dynamic type for the future use-case. Using it should be avoided, 62 // But it is still here, just in case we want to enable some additional functionality. 63 bytes reservedDynamic; 64: } 78 struct WritePriorityOpParams { 79 address sender; 80 uint256 txId; 81 uint256 l2Value; 82 address contractAddressL2; 83 uint64 expirationTimestamp; 84 uint256 l2GasLimit; 85 uint256 l2GasPrice; 86 uint256 l2GasPricePerPubdata; 87 uint256 valueToMint; 88 address refundRecipient; 89: } ``` *GitHub*: [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L35-L62), [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L76-L87) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 31 struct SelectorToFacet { 32 address facetAddress; 33 uint16 selectorPosition; 34 bool isFreezable; 35: } 40 struct FacetToSelectors { 41 bytes4[] selectors; 42 uint16 facetPosition; 43: } 51 struct DiamondStorage { 52 mapping(bytes4 => SelectorToFacet) selectorToFacet; 53 mapping(address => FacetToSelectors) facetToSelectors; 54 address[] facets; 55 bool isFrozen; 56: } 74 struct DiamondCutData { 75 FacetCut[] facetCuts; 76 address initAddress; 77 bytes initCalldata; 78: } ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L29-L33), [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L38-L41), [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L49-L54), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L72-L76) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/LibMap.sol 10 struct Uint32Map { 11 mapping(uint256 => uint256) map; 12: } ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/LibMap.sol#L8-L10) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 12 struct PriorityOperation { 13 bytes32 canonicalTxHash; 14 uint64 expirationTimestamp; 15 uint192 layer2Tip; 16: } 29 struct Queue { 30 mapping(uint256 => PriorityOperation) data; 31 uint256 tail; 32 uint256 head; 33: } ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L10-L14), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L27-L31) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IContractDeployer.sol 30 struct AccountInfo { 31 AccountAbstractionVersion supportedAAVersion; 32 AccountNonceOrdering nonceOrdering; 33: } ``` *GitHub*: [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IContractDeployer.sol#L28-L31) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IImmutableSimulator.sol 7 struct ImmutableData { 8 uint256 index; 9 bytes32 value; 10: } ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IImmutableSimulator.sol#L5-L8) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IL1Messenger.sol 16 struct L2ToL1Log { 17 uint8 l2ShardId; 18 bool isService; 19 uint16 txNumberInBlock; 20 address sender; 21 bytes32 key; 22 bytes32 value; 23: } ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IL1Messenger.sol#L14-L21) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContext.sol 13 struct BlockInfo { 14 uint128 timestamp; 15 uint128 number; 16: } 20 struct VirtualBlockUpgradeInfo { 21 /// @notice In order to maintain consistent results for `blockhash` requests, we'll 22 /// have to remember the number of the batch when the upgrade to the virtual blocks has been done. 23 /// The hashes for virtual blocks before the upgrade are identical to the hashes of the corresponding batches. 24 uint128 virtualBlockStartBatch; 25 /// @notice L2 block when the virtual blocks have caught up with the L2 blocks. Starting from this block, 26 /// all the information returned to users for block.timestamp/number, etc should be the information about the L2 blocks and 27 /// not virtual blocks. 28 uint128 virtualBlockFinishL2Block; 29: } ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L11-L14), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContext.sol#L18-L27) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 27 struct Transaction { 28 // The type of the transaction. 29 uint256 txType; 30 // The caller. 31 uint256 from; 32 // The callee. 33 uint256 to; 34 // The gasLimit to pass with the transaction. 35 // It has the same meaning as Ethereum's gasLimit. 36 uint256 gasLimit; 37 // The maximum amount of gas the user is willing to pay for a byte of pubdata. 38 uint256 gasPerPubdataByteLimit; 39 // The maximum fee per gas that the user is willing to pay. 40 // It is akin to EIP1559's maxFeePerGas. 41 uint256 maxFeePerGas; 42 // The maximum priority fee per gas that the user is willing to pay. 43 // It is akin to EIP1559's maxPriorityFeePerGas. 44 uint256 maxPriorityFeePerGas; 45 // The transaction's paymaster. If there is no paymaster, it is equal to 0. 46 uint256 paymaster; 47 // The nonce of the transaction. 48 uint256 nonce; 49 // The value to pass with the transaction. 50 uint256 value; 51 // In the future, we might want to add some 52 // new fields to the struct. The `txData` struct 53 // is to be passed to account and any changes to its structure 54 // would mean a breaking change to these accounts. In order to prevent this, 55 // we should keep some fields as "reserved". 56 // It is also recommended that their length is fixed, since 57 // it would allow easier proof integration (in case we will need 58 // some special circuit for preprocessing transactions). 59 uint256[4] reserved; 60 // The transaction's calldata. 61 bytes data; 62 // The signature of the transaction. 63 bytes signature; 64 // The properly formatted hashes of bytecodes that must be published on L1 65 // with the inclusion of this transaction. Note, that a bytecode has been published 66 // before, the user won't pay fees for its republishing. 67 bytes32[] factoryDeps; 68 // The input to the paymaster. 69 bytes paymasterInput; 70 // Reserved dynamic type for the future use-case. Using it should be avoided, 71 // But it is still here, just in case we want to enable some additional functionality. 72 bytes reservedDynamic; 73: } ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L25-L71)
### [D‑69] ~~Unused function parameter~~ The variable is in fact used, so the instances below are invalid *There are 43 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/libraries/UnsafeBytes.sol /// @audit _bytes /// @audit _start 21: function readUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32 result, uint256 offset) { /// @audit _bytes /// @audit _start 28: function readAddress(bytes memory _bytes, uint256 _start) internal pure returns (address result, uint256 offset) { /// @audit _bytes /// @audit _start 35: function readUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256 result, uint256 offset) { /// @audit _bytes /// @audit _start 42: function readBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32 result, uint256 offset) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/libraries/UnsafeBytes.sol#L40-L40) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit _to /// @audit _amount 115: function _withdrawFunds(address _to, uint256 _amount) internal { ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L113-L113), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L113-L113) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol /// @audit _lhs /// @audit _rhs 42: function _efficientHash(bytes32 _lhs, bytes32 _rhs) private pure returns (bytes32 result) { ``` *GitHub*: [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L40-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L40-L40) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol /// @audit _hash 70: function _storeCodeHash(address _address, bytes32 _hash) internal { ``` *GitHub*: [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L68-L68) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit _hash 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [68](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L66-L66) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol /// @audit _address 128: address _address, /// @audit _address 161: function rawStaticCall(uint256 _gas, address _address, bytes calldata _data) internal view returns (bool success) { /// @audit _address 175: function rawDelegateCall(uint256 _gas, address _address, bytes calldata _data) internal returns (bool success) { /// @audit _address 195: address _address, /// @audit _whoToMimic 197: address _whoToMimic, ``` *GitHub*: [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L126-L126), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L159-L159), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L173-L173), [195](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L193-L193), [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L195-L195) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit _isService /// @audit _key /// @audit _value 77: function toL1(bool _isService, bytes32 _key, bytes32 _value) internal { /// @audit _farCallAbi 114: function ptrPackIntoActivePtr(uint256 _farCallAbi) internal view { /// @audit _value 123: function ptrAddIntoActive(uint32 _value) internal view { /// @audit _shrink 135: function ptrShrinkIntoActive(uint32 _shrink) internal view { /// @audit _rawParams /// @audit _gasToBurn 177: function unsafePrecompileCall(uint256 _rawParams, uint32 _gasToBurn) internal view returns (bool success) { /// @audit _value 191: function setValueForNextFarCall(uint128 _value) internal returns (bool success) { /// @audit initializer /// @audit value1 204: function eventInitialize(uint256 initializer, uint256 value1) internal { /// @audit value1 /// @audit value2 214: function eventWrite(uint256 value1, uint256 value2) internal { ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L75-L75), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L75-L75), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L75-L75), [114](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L112-L112), [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L121-L121), [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L133-L133), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L175-L175), [177](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L175-L175), [191](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L189-L189), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L202-L202), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L202-L202), [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L212-L212), [214](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L212-L212) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol /// @audit to 78: function systemCall(uint32 gasLimit, address to, uint256 value, bytes memory data) internal returns (bool success) { ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L76-L76) ```solidity File: cache-zk/solpp-generated-contracts/libraries/UnsafeBytesCalldata.sol /// @audit _bytes /// @audit _start 21: function readUint16(bytes calldata _bytes, uint256 _start) internal pure returns (uint16 result) { /// @audit _bytes /// @audit _start 28: function readUint32(bytes calldata _bytes, uint256 _start) internal pure returns (uint32 result) { /// @audit _bytes /// @audit _start 35: function readUint64(bytes calldata _bytes, uint256 _start) internal pure returns (uint64 result) { /// @audit _bytes /// @audit _start 42: function readBytes32(bytes calldata _bytes, uint256 _start) internal pure returns (bytes32 result) { /// @audit _bytes /// @audit _start 48: function readUint256(bytes calldata _bytes, uint256 _start) internal pure returns (uint256 result) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L19-L19), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L26-L26), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L33-L33), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [42](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L40-L40), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46), [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/UnsafeBytesCalldata.sol#L46-L46)
### [D‑70] ~~Unused import~~ These instances _are_ used *There are 212 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol /// @audit L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR 22: import {L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR} from "../common/L2ContractAddresses.sol"; ``` *GitHub*: [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L20-L20) ```solidity File: cache/solpp-generated-contracts/bridge/libraries/BridgeInitializationHelper.sol /// @audit L2_DEPLOYER_SYSTEM_CONTRACT_ADDR 10: import {L2_DEPLOYER_SYSTEM_CONTRACT_ADDR} from "../../common/L2ContractAddresses.sol"; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/libraries/BridgeInitializationHelper.sol#L8-L8) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit Ownable2Step 7: import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; /// @audit IGovernance 8: import {IGovernance} from "./IGovernance.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol /// @audit SYSTEM_UPGRADE_L2_TX_TYPE /// @audit MAX_NEW_FACTORY_DEPS 12: import {SYSTEM_UPGRADE_L2_TX_TYPE, MAX_NEW_FACTORY_DEPS} from "../zksync/Config.sol"; ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L10-L10), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L10-L10) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol /// @audit IAllowList 7: import {IAllowList} from "../common/interfaces/IAllowList.sol"; /// @audit IVerifier 8: import {IVerifier} from "./interfaces/IVerifier.sol"; /// @audit IExecutor 9: import {IExecutor} from "./interfaces/IExecutor.sol"; /// @audit Diamond 10: import {Diamond} from "./libraries/Diamond.sol"; /// @audit Base 11: import {Base} from "./facets/Base.sol"; /// @audit Verifier 12: import {Verifier} from "./Verifier.sol"; /// @audit VerifierParams 13: import {VerifierParams} from "./Storage.sol"; /// @audit L2_TO_L1_LOG_SERIALIZE_SIZE /// @audit EMPTY_STRING_KECCAK /// @audit DEFAULT_L2_LOGS_TREE_ROOT_HASH /// @audit L2_TX_MAX_GAS_LIMIT 15: import {L2_TO_L1_LOG_SERIALIZE_SIZE, EMPTY_STRING_KECCAK, DEFAULT_L2_LOGS_TREE_ROOT_HASH, L2_TX_MAX_GAS_LIMIT} from "./Config.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L11-L11), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L13-L13) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondProxy.sol /// @audit Diamond 7: import {Diamond} from "./libraries/Diamond.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondProxy.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol /// @audit L2_TX_MAX_GAS_LIMIT 10: import {L2_TX_MAX_GAS_LIMIT} from "../Config.sol"; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L8-L8) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol /// @audit Base 7: import {Base} from "./Base.sol"; /// @audit COMMIT_TIMESTAMP_NOT_OLDER /// @audit COMMIT_TIMESTAMP_APPROXIMATION_DELTA /// @audit EMPTY_STRING_KECCAK /// @audit L2_TO_L1_LOG_SERIALIZE_SIZE /// @audit INPUT_MASK /// @audit MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES /// @audit MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES /// @audit MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES /// @audit PACKED_L2_BLOCK_TIMESTAMP_MASK 8: import {COMMIT_TIMESTAMP_NOT_OLDER, COMMIT_TIMESTAMP_APPROXIMATION_DELTA, EMPTY_STRING_KECCAK, L2_TO_L1_LOG_SERIALIZE_SIZE, INPUT_MASK, MAX_INITIAL_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_REPEATED_STORAGE_CHANGES_COMMITMENT_BYTES, MAX_L2_TO_L1_LOGS_COMMITMENT_BYTES, PACKED_L2_BLOCK_TIMESTAMP_MASK} from "../Config.sol"; /// @audit IExecutor /// @audit L2_LOG_ADDRESS_OFFSET /// @audit L2_LOG_KEY_OFFSET /// @audit L2_LOG_VALUE_OFFSET /// @audit SystemLogKey 9: import {IExecutor, L2_LOG_ADDRESS_OFFSET, L2_LOG_KEY_OFFSET, L2_LOG_VALUE_OFFSET, SystemLogKey} from "../interfaces/IExecutor.sol"; /// @audit PriorityQueue /// @audit PriorityOperation 10: import {PriorityQueue, PriorityOperation} from "../libraries/PriorityQueue.sol"; /// @audit UncheckedMath 11: import {UncheckedMath} from "../../common/libraries/UncheckedMath.sol"; /// @audit UnsafeBytes 12: import {UnsafeBytes} from "../../common/libraries/UnsafeBytes.sol"; /// @audit L2ContractHelper 13: import {L2ContractHelper} from "../../common/libraries/L2ContractHelper.sol"; /// @audit VerifierParams 14: import {VerifierParams} from "../Storage.sol"; /// @audit L2_BOOTLOADER_ADDRESS /// @audit L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR /// @audit L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR /// @audit L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR 15: import {L2_BOOTLOADER_ADDRESS, L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, L2_SYSTEM_CONTEXT_SYSTEM_CONTRACT_ADDR, L2_KNOWN_CODE_STORAGE_SYSTEM_CONTRACT_ADDR} from "../../common/L2ContractAddresses.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L8-L8), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L13-L13), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L13-L13) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit Math 7: import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; /// @audit IMailbox /// @audit TxStatus 9: import {IMailbox, TxStatus} from "../interfaces/IMailbox.sol"; /// @audit Merkle 10: import {Merkle} from "../libraries/Merkle.sol"; /// @audit PriorityQueue /// @audit PriorityOperation 11: import {PriorityQueue, PriorityOperation} from "../libraries/PriorityQueue.sol"; /// @audit TransactionValidator 12: import {TransactionValidator} from "../libraries/TransactionValidator.sol"; /// @audit L2Message /// @audit L2Log 13: import {L2Message, L2Log} from "../Storage.sol"; /// @audit UncheckedMath 14: import {UncheckedMath} from "../../common/libraries/UncheckedMath.sol"; /// @audit UnsafeBytes 15: import {UnsafeBytes} from "../../common/libraries/UnsafeBytes.sol"; /// @audit L2ContractHelper 16: import {L2ContractHelper} from "../../common/libraries/L2ContractHelper.sol"; /// @audit AddressAliasHelper 17: import {AddressAliasHelper} from "../../vendor/AddressAliasHelper.sol"; /// @audit IAllowList 18: import {IAllowList} from "../../common/interfaces/IAllowList.sol"; /// @audit Base 19: import {Base} from "./Base.sol"; /// @audit REQUIRED_L2_GAS_PRICE_PER_PUBDATA 21: REQUIRED_L2_GAS_PRICE_PER_PUBDATA, /// @audit FAIR_L2_GAS_PRICE 22: FAIR_L2_GAS_PRICE, /// @audit L1_GAS_PER_PUBDATA_BYTE 23: L1_GAS_PER_PUBDATA_BYTE, /// @audit L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH 24: L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, /// @audit PRIORITY_OPERATION_L2_TX_TYPE 25: PRIORITY_OPERATION_L2_TX_TYPE, /// @audit PRIORITY_EXPIRATION 26: PRIORITY_EXPIRATION, /// @audit MAX_NEW_FACTORY_DEPS 27: MAX_NEW_FACTORY_DEPS /// @audit L2_BOOTLOADER_ADDRESS 30: L2_BOOTLOADER_ADDRESS, /// @audit L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR 31: L2_TO_L1_MESSENGER_SYSTEM_CONTRACT_ADDR, /// @audit L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR 32: L2_ETH_TOKEN_SYSTEM_CONTRACT_ADDR ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L5-L5), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L9-L9), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L11-L11), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L17-L17), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L19-L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L20-L20), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L21-L21), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L22-L22), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L23-L23), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L24-L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L25-L25), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L28-L28), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L29-L29), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L30-L30) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IAdmin.sol /// @audit Diamond 9: import {Diamond} from "../libraries/Diamond.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IAdmin.sol#L7-L7) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IExecutor.sol /// @audit IBase 7: import {IBase} from "./IBase.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IExecutor.sol#L5-L5) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IGetters.sol /// @audit VerifierParams /// @audit UpgradeState 8: import {VerifierParams, UpgradeState} from "../Storage.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L6-L6), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IGetters.sol#L6-L6) ```solidity File: cache/solpp-generated-contracts/zksync/interfaces/IMailbox.sol /// @audit L2Log /// @audit L2Message 7: import {L2Log, L2Message} from "../Storage.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/interfaces/IMailbox.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol /// @audit L2ContractHelper /// @audit DEPLOYER_SYSTEM_CONTRACT /// @audit IContractDeployer 16: import {L2ContractHelper, DEPLOYER_SYSTEM_CONTRACT, IContractDeployer} from "../L2ContractHelper.sol"; /// @audit SystemContractsCaller 17: import {SystemContractsCaller} from "../SystemContractsCaller.sol"; ``` *GitHub*: [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L14-L14), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L14-L14), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L15-L15) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol /// @audit L2_ETH_ADDRESS 13: import {L2_ETH_ADDRESS} from "../L2ContractHelper.sol"; ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L11-L11) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol /// @audit DEPLOYER_SYSTEM_CONTRACT /// @audit NONCE_HOLDER_SYSTEM_CONTRACT /// @audit CURRENT_MAX_PRECOMPILE_ADDRESS 9: import {DEPLOYER_SYSTEM_CONTRACT, NONCE_HOLDER_SYSTEM_CONTRACT, CURRENT_MAX_PRECOMPILE_ADDRESS} from "./Constants.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol /// @audit IComplexUpgrader 7: import {IComplexUpgrader} from "./interfaces/IComplexUpgrader.sol"; /// @audit FORCE_DEPLOYER 8: import {FORCE_DEPLOYER} from "./Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol /// @audit ICompressor /// @audit OPERATION_BITMASK /// @audit LENGTH_BITS_OFFSET /// @audit MAX_ENUMERATION_INDEX_SIZE 7: import {ICompressor, OPERATION_BITMASK, LENGTH_BITS_OFFSET, MAX_ENUMERATION_INDEX_SIZE} from "./interfaces/ICompressor.sol"; /// @audit ISystemContract 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; /// @audit Utils 9: import {Utils} from "./libraries/Utils.sol"; /// @audit UnsafeBytesCalldata 10: import {UnsafeBytesCalldata} from "./libraries/UnsafeBytesCalldata.sol"; /// @audit EfficientCall 11: import {EfficientCall} from "./libraries/EfficientCall.sol"; /// @audit L1_MESSENGER_CONTRACT 13: L1_MESSENGER_CONTRACT, /// @audit INITIAL_WRITE_STARTING_POSITION 14: INITIAL_WRITE_STARTING_POSITION, /// @audit COMPRESSED_INITIAL_WRITE_SIZE 15: COMPRESSED_INITIAL_WRITE_SIZE, /// @audit STATE_DIFF_ENTRY_SIZE 16: STATE_DIFF_ENTRY_SIZE, /// @audit STATE_DIFF_ENUM_INDEX_OFFSET 17: STATE_DIFF_ENUM_INDEX_OFFSET, /// @audit STATE_DIFF_FINAL_VALUE_OFFSET 18: STATE_DIFF_FINAL_VALUE_OFFSET, /// @audit STATE_DIFF_DERIVED_KEY_OFFSET 19: STATE_DIFF_DERIVED_KEY_OFFSET, /// @audit DERIVED_KEY_LENGTH 20: DERIVED_KEY_LENGTH, /// @audit VALUE_LENGTH 21: VALUE_LENGTH, /// @audit ENUM_INDEX_LENGTH 22: ENUM_INDEX_LENGTH, /// @audit KNOWN_CODE_STORAGE_CONTRACT 23: KNOWN_CODE_STORAGE_CONTRACT ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L9-L9), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L17-L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L18-L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L19-L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L20-L20), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L21-L21) ```solidity File: cache-zk/solpp-generated-contracts/Constants.sol /// @audit IAccountCodeStorage 7: import {IAccountCodeStorage} from "./interfaces/IAccountCodeStorage.sol"; /// @audit INonceHolder 8: import {INonceHolder} from "./interfaces/INonceHolder.sol"; /// @audit IContractDeployer 9: import {IContractDeployer} from "./interfaces/IContractDeployer.sol"; /// @audit IKnownCodesStorage 10: import {IKnownCodesStorage} from "./interfaces/IKnownCodesStorage.sol"; /// @audit IImmutableSimulator 11: import {IImmutableSimulator} from "./interfaces/IImmutableSimulator.sol"; /// @audit IEthToken 12: import {IEthToken} from "./interfaces/IEthToken.sol"; /// @audit IL1Messenger 13: import {IL1Messenger} from "./interfaces/IL1Messenger.sol"; /// @audit ISystemContext 14: import {ISystemContext} from "./interfaces/ISystemContext.sol"; /// @audit ICompressor 15: import {ICompressor} from "./interfaces/ICompressor.sol"; /// @audit IComplexUpgrader 16: import {IComplexUpgrader} from "./interfaces/IComplexUpgrader.sol"; /// @audit IBootloaderUtilities 17: import {IBootloaderUtilities} from "./interfaces/IBootloaderUtilities.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Constants.sol#L15-L15) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit ImmutableData 7: import {ImmutableData} from "./interfaces/IImmutableSimulator.sol"; /// @audit IContractDeployer 8: import {IContractDeployer} from "./interfaces/IContractDeployer.sol"; /// @audit CREATE2_PREFIX /// @audit CREATE_PREFIX /// @audit NONCE_HOLDER_SYSTEM_CONTRACT /// @audit ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT /// @audit FORCE_DEPLOYER /// @audit MAX_SYSTEM_CONTRACT_ADDRESS /// @audit KNOWN_CODE_STORAGE_CONTRACT /// @audit ETH_TOKEN_SYSTEM_CONTRACT /// @audit IMMUTABLE_SIMULATOR_SYSTEM_CONTRACT /// @audit COMPLEX_UPGRADER_CONTRACT 9: import {CREATE2_PREFIX, CREATE_PREFIX, NONCE_HOLDER_SYSTEM_CONTRACT, ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT, FORCE_DEPLOYER, MAX_SYSTEM_CONTRACT_ADDRESS, KNOWN_CODE_STORAGE_CONTRACT, ETH_TOKEN_SYSTEM_CONTRACT, IMMUTABLE_SIMULATOR_SYSTEM_CONTRACT, COMPLEX_UPGRADER_CONTRACT} from "./Constants.sol"; /// @audit Utils 11: import {Utils} from "./libraries/Utils.sol"; /// @audit EfficientCall 12: import {EfficientCall} from "./libraries/EfficientCall.sol"; /// @audit SystemContractHelper 13: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; /// @audit ISystemContract 14: import {ISystemContract} from "./interfaces/ISystemContract.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L7-L7), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L12-L12) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol /// @audit BOOTLOADER_FORMAL_ADDRESS /// @audit NONCE_HOLDER_SYSTEM_CONTRACT /// @audit DEPLOYER_SYSTEM_CONTRACT /// @audit INonceHolder 11: import {BOOTLOADER_FORMAL_ADDRESS, NONCE_HOLDER_SYSTEM_CONTRACT, DEPLOYER_SYSTEM_CONTRACT, INonceHolder} from "./Constants.sol"; ``` *GitHub*: [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L9-L9), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L9-L9), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L9-L9), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol /// @audit DEPLOYER_SYSTEM_CONTRACT 8: import {DEPLOYER_SYSTEM_CONTRACT} from "./Constants.sol"; ``` *GitHub*: [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol /// @audit IKnownCodesStorage 7: import {IKnownCodesStorage} from "./interfaces/IKnownCodesStorage.sol"; /// @audit ISystemContract 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; /// @audit Utils 9: import {Utils} from "./libraries/Utils.sol"; /// @audit SystemContractHelper 10: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; /// @audit COMPRESSOR_CONTRACT /// @audit L1_MESSENGER_CONTRACT 11: import {COMPRESSOR_CONTRACT, L1_MESSENGER_CONTRACT} from "./Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L9-L9), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol /// @audit IL1Messenger /// @audit L2ToL1Log /// @audit L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH /// @audit L2_TO_L1_LOG_SERIALIZE_SIZE /// @audit STATE_DIFF_COMPRESSION_VERSION_NUMBER 7: import {IL1Messenger, L2ToL1Log, L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, L2_TO_L1_LOG_SERIALIZE_SIZE, STATE_DIFF_COMPRESSION_VERSION_NUMBER} from "./interfaces/IL1Messenger.sol"; /// @audit ISystemContract 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; /// @audit SystemContractHelper 9: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; /// @audit EfficientCall 10: import {EfficientCall} from "./libraries/EfficientCall.sol"; /// @audit Utils 11: import {Utils} from "./libraries/Utils.sol"; /// @audit SystemLogKey 13: SystemLogKey, /// @audit SYSTEM_CONTEXT_CONTRACT 14: SYSTEM_CONTEXT_CONTRACT, /// @audit KNOWN_CODE_STORAGE_CONTRACT 15: KNOWN_CODE_STORAGE_CONTRACT, /// @audit COMPRESSOR_CONTRACT 16: COMPRESSOR_CONTRACT, /// @audit STATE_DIFF_ENTRY_SIZE 17: STATE_DIFF_ENTRY_SIZE, /// @audit MAX_ALLOWED_PUBDATA_PER_BATCH 18: MAX_ALLOWED_PUBDATA_PER_BATCH, /// @audit L2_TO_L1_LOGS_MERKLE_TREE_LEAVES 19: L2_TO_L1_LOGS_MERKLE_TREE_LEAVES ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L9-L9), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L17-L17) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol /// @audit IEthToken 7: import {IEthToken} from "./interfaces/IEthToken.sol"; /// @audit ISystemContract 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; /// @audit MSG_VALUE_SYSTEM_CONTRACT /// @audit DEPLOYER_SYSTEM_CONTRACT /// @audit BOOTLOADER_FORMAL_ADDRESS /// @audit L1_MESSENGER_CONTRACT 9: import {MSG_VALUE_SYSTEM_CONTRACT, DEPLOYER_SYSTEM_CONTRACT, BOOTLOADER_FORMAL_ADDRESS, L1_MESSENGER_CONTRACT} from "./Constants.sol"; /// @audit IMailbox 10: import {IMailbox} from "./interfaces/IMailbox.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/MsgValueSimulator.sol /// @audit SystemContractHelper 10: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; /// @audit MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT /// @audit ETH_TOKEN_SYSTEM_CONTRACT 11: import {MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, ETH_TOKEN_SYSTEM_CONTRACT} from "./Constants.sol"; ``` *GitHub*: [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L9-L9), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/MsgValueSimulator.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol /// @audit ISystemContract 9: import {ISystemContract} from "./interfaces/ISystemContract.sol"; /// @audit DEPLOYER_SYSTEM_CONTRACT 10: import {DEPLOYER_SYSTEM_CONTRACT} from "./Constants.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L8-L8) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol /// @audit ISystemContext 7: import {ISystemContext} from "./interfaces/ISystemContext.sol"; /// @audit ISystemContract 8: import {ISystemContract} from "./interfaces/ISystemContract.sol"; /// @audit ISystemContextDeprecated 9: import {ISystemContextDeprecated} from "./interfaces/ISystemContextDeprecated.sol"; /// @audit SystemContractHelper 10: import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; /// @audit BOOTLOADER_FORMAL_ADDRESS /// @audit SystemLogKey 11: import {BOOTLOADER_FORMAL_ADDRESS, SystemLogKey} from "./Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L6-L6), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L7-L7), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L9-L9), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L9-L9) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol /// @audit SystemContractHelper 7: import {SystemContractHelper} from "../libraries/SystemContractHelper.sol"; /// @audit BOOTLOADER_FORMAL_ADDRESS 8: import {BOOTLOADER_FORMAL_ADDRESS} from "../Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L5-L5), [8](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L6-L6) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol /// @audit SHA256_SYSTEM_CONTRACT /// @audit KECCAK256_SYSTEM_CONTRACT /// @audit MSG_VALUE_SYSTEM_CONTRACT 9: import {SHA256_SYSTEM_CONTRACT, KECCAK256_SYSTEM_CONTRACT, MSG_VALUE_SYSTEM_CONTRACT} from "../Constants.sol"; ``` *GitHub*: [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L7-L7), [9](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L7-L7) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit MAX_SYSTEM_CONTRACT_ADDRESS 7: import {MAX_SYSTEM_CONTRACT_ADDRESS} from "../Constants.sol"; /// @audit SystemContractsCaller 10: SystemContractsCaller, /// @audit CalldataForwardingMode 11: CalldataForwardingMode, /// @audit CALLFLAGS_CALL_ADDRESS 12: CALLFLAGS_CALL_ADDRESS, /// @audit CODE_ADDRESS_CALL_ADDRESS 13: CODE_ADDRESS_CALL_ADDRESS, /// @audit EVENT_WRITE_ADDRESS 14: EVENT_WRITE_ADDRESS, /// @audit EVENT_INITIALIZE_ADDRESS 15: EVENT_INITIALIZE_ADDRESS, /// @audit GET_EXTRA_ABI_DATA_ADDRESS 16: GET_EXTRA_ABI_DATA_ADDRESS, /// @audit LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS 17: LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS, /// @audit META_CODE_SHARD_ID_OFFSET 18: META_CODE_SHARD_ID_OFFSET, /// @audit META_CALLER_SHARD_ID_OFFSET 19: META_CALLER_SHARD_ID_OFFSET, /// @audit META_SHARD_ID_OFFSET 20: META_SHARD_ID_OFFSET, /// @audit META_AUX_HEAP_SIZE_OFFSET 21: META_AUX_HEAP_SIZE_OFFSET, /// @audit META_HEAP_SIZE_OFFSET 22: META_HEAP_SIZE_OFFSET, /// @audit META_GAS_PER_PUBDATA_BYTE_OFFSET 23: META_GAS_PER_PUBDATA_BYTE_OFFSET, /// @audit MIMIC_CALL_BY_REF_CALL_ADDRESS 24: MIMIC_CALL_BY_REF_CALL_ADDRESS, /// @audit META_CALL_ADDRESS 25: META_CALL_ADDRESS, /// @audit MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT 26: MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, /// @audit PTR_CALLDATA_CALL_ADDRESS 27: PTR_CALLDATA_CALL_ADDRESS, /// @audit PTR_ADD_INTO_ACTIVE_CALL_ADDRESS 28: PTR_ADD_INTO_ACTIVE_CALL_ADDRESS, /// @audit PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS 29: PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS, /// @audit PTR_PACK_INTO_ACTIVE_CALL_ADDRESS 30: PTR_PACK_INTO_ACTIVE_CALL_ADDRESS, /// @audit RAW_FAR_CALL_BY_REF_CALL_ADDRESS 31: RAW_FAR_CALL_BY_REF_CALL_ADDRESS, /// @audit PRECOMPILE_CALL_ADDRESS 32: PRECOMPILE_CALL_ADDRESS, /// @audit SET_CONTEXT_VALUE_CALL_ADDRESS 33: SET_CONTEXT_VALUE_CALL_ADDRESS, /// @audit SYSTEM_CALL_BY_REF_CALL_ADDRESS 34: SYSTEM_CALL_BY_REF_CALL_ADDRESS, /// @audit TO_L1_CALL_ADDRESS 35: TO_L1_CALL_ADDRESS ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L5-L5), [10](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L8-L8), [11](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L9-L9), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L10-L10), [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L11-L11), [14](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L12-L12), [15](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L13-L13), [16](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L14-L14), [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L15-L15), [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L16-L16), [19](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L17-L17), [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L18-L18), [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L19-L19), [22](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L20-L20), [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L21-L21), [24](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L22-L22), [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L23-L23), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L24-L24), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L25-L25), [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L26-L26), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L27-L27), [30](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L28-L28), [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L29-L29), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L30-L30), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L31-L31), [34](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L32-L32), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L33-L33) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol /// @audit MSG_VALUE_SYSTEM_CONTRACT /// @audit MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT 7: import {MSG_VALUE_SYSTEM_CONTRACT, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT} from "../Constants.sol"; ``` *GitHub*: [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L5-L5), [7](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L5-L5) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit ETH_TOKEN_SYSTEM_CONTRACT /// @audit BOOTLOADER_FORMAL_ADDRESS 12: import {ETH_TOKEN_SYSTEM_CONTRACT, BOOTLOADER_FORMAL_ADDRESS} from "../Constants.sol"; ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L10-L10), [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L10-L10)
### [D‑71] ~~Unused local variable~~ *There are 43 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol /// @audit returnData 228: (bool success, bytes memory returnData) = _calls[i].target.call{value: _calls[i].value}(_calls[i].data); ``` *GitHub*: [228](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L226-L226) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol /// @audit contractAddress 135: address contractAddress = zkSyncContract; ``` *GitHub*: [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L133-L133) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol /// @audit hashedBytecode 398: bytes32 hashedBytecode = L2ContractHelper.hashL2Bytecode(_factoryDeps[i]); ``` *GitHub*: [398](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L396-L396) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol /// @audit position 89: bytes32 position = DIAMOND_STORAGE_POSITION; ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L87-L87) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol /// @audit addressAsKey 71: uint256 addressAsKey = uint256(uint160(_address)); /// @audit addressAsKey 81: uint256 addressAsKey = uint256(uint160(_address)); ``` *GitHub*: [71](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L69-L69), [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L79-L79) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol /// @audit success /// @audit returnData 27: (bool success, bytes memory returnData) = _delegateTo.delegatecall(_calldata); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L25-L25), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L25-L25) ```solidity File: cache-zk/solpp-generated-contracts/libraries/EfficientCall.sol /// @audit msgValueSimulator 144: address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT; /// @audit callAddr 145: address callAddr = SYSTEM_CALL_BY_REF_CALL_ADDRESS; /// @audit forwardMask 148: uint256 forwardMask = _isSystem ? MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT : 0; /// @audit callAddr 136: address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS; /// @audit callAddr 164: address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS; /// @audit callAddr 178: address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS; /// @audit callAddr 203: address callAddr = MIMIC_CALL_BY_REF_CALL_ADDRESS; /// @audit cleanupMask 204: uint256 cleanupMask = ADDRESS_MASK; ``` *GitHub*: [144](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L142-L142), [145](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L143-L143), [148](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L146-L146), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L134-L134), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L162-L162), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L176-L176), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L201-L201), [204](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/EfficientCall.sol#L202-L202) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol /// @audit shiftedVal 17: bytes20 shiftedVal = bytes20(_val); /// @audit shiftedVal 39: uint256 shiftedVal = _val << (lbs * 8); /// @audit shiftedVal 74: uint256 shiftedVal = uint256(_len) << (lbs * 8); ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L15-L15), [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L37-L37), [74](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L72-L72) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractHelper.sol /// @audit callAddr 78: address callAddr = TO_L1_CALL_ADDRESS; /// @audit callAddr 93: address callAddr = CODE_ADDRESS_CALL_ADDRESS; /// @audit callAddr 104: address callAddr = LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS; /// @audit callAddr 115: address callAddr = PTR_PACK_INTO_ACTIVE_CALL_ADDRESS; /// @audit callAddr 124: address callAddr = PTR_ADD_INTO_ACTIVE_CALL_ADDRESS; /// @audit cleanupMask 125: uint256 cleanupMask = UINT32_MASK; /// @audit callAddr 136: address callAddr = PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS; /// @audit cleanupMask 137: uint256 cleanupMask = UINT32_MASK; /// @audit callAddr 178: address callAddr = PRECOMPILE_CALL_ADDRESS; /// @audit cleanupMask 180: uint256 cleanupMask = UINT32_MASK; /// @audit cleanupMask 192: uint256 cleanupMask = UINT128_MASK; /// @audit callAddr 193: address callAddr = SET_CONTEXT_VALUE_CALL_ADDRESS; /// @audit callAddr 205: address callAddr = EVENT_INITIALIZE_ADDRESS; /// @audit callAddr 215: address callAddr = EVENT_WRITE_ADDRESS; /// @audit callAddr 226: address callAddr = META_CALL_ADDRESS; /// @audit callAddr 315: address callAddr = CALLFLAGS_CALL_ADDRESS; /// @audit callAddr 326: address callAddr = PTR_CALLDATA_CALL_ADDRESS; /// @audit callAddr 339: address callAddr = GET_EXTRA_ABI_DATA_ADDRESS; ``` *GitHub*: [78](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L76-L76), [93](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L91-L91), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L102-L102), [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L113-L113), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L122-L122), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L123-L123), [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L134-L134), [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L135-L135), [178](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L176-L176), [180](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L178-L178), [192](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L190-L190), [193](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L191-L191), [205](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L203-L203), [215](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L213-L213), [226](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L224-L224), [315](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L313-L313), [326](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L324-L324), [339](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractHelper.sol#L337-L337) ```solidity File: cache-zk/solpp-generated-contracts/libraries/SystemContractsCaller.sol /// @audit callAddr 79: address callAddr = SYSTEM_CALL_CALL_ADDRESS; /// @audit farCallAbi 87: uint256 farCallAbi = SystemContractsCaller.getFarCallABI( /// @audit msgValueSimulator 106: address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT; /// @audit forwardMask 109: uint256 forwardMask = MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT; ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L77-L77), [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L85-L85), [106](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L104-L104), [109](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/SystemContractsCaller.sol#L107-L107) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol /// @audit bootloaderAddr 398: address bootloaderAddr = BOOTLOADER_FORMAL_ADDRESS; /// @audit amount 399: uint256 amount = _transaction.maxFeePerGas * _transaction.gasLimit; ``` *GitHub*: [398](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L396-L396), [399](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L397-L397)
### [D‑72] ~~Unused modifier~~ These modifiers are used by other contracts *There are 10 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/common/AllowListed.sol 12 modifier senderCanCallFunction(IAllowList _allowList) { 13 // Preventing the stack too deep error 14 { 15 require(_allowList.canCall(msg.sender, address(this), msg.sig), "nr"); 16 } 17 _; 18: } ``` *GitHub*: [12](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowListed.sol#L10-L16) ```solidity File: cache/solpp-generated-contracts/common/ReentrancyGuard.sol 43 modifier reentrancyGuardInitializer() { 44 _initializeReentrancyGuard(); 45 _; 46: } 70 modifier nonReentrant() { 71 uint256 _status; 72 assembly { 73 _status := sload(LOCK_FLAG_ADDRESS) 74 } 75 76 // On the first call to nonReentrant, _notEntered will be true 77 require(_status == _NOT_ENTERED, "r1"); 78 79 // Any calls to nonReentrant after this point will fail 80 assembly { 81 sstore(LOCK_FLAG_ADDRESS, _ENTERED) 82 } 83 84 _; 85 86 // By storing the original value once again, a refund is triggered (see 87 // https://eips.ethereum.org/EIPS/eip-2200) 88 assembly { 89 sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED) 90 } 91: } ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L41-L44), [70](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/ReentrancyGuard.sol#L68-L89) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Base.sol 20 modifier onlyGovernor() { 21 require(msg.sender == s.governor, "1g"); // only by governor 22 _; 23: } 26 modifier onlyGovernorOrAdmin() { 27 require(msg.sender == s.governor || msg.sender == s.admin, "Only by governor or admin"); 28 _; 29: } 32 modifier onlyValidator() { 33 require(s.validators[msg.sender], "1h"); // validator is not active 34 _; 35: } ``` *GitHub*: [20](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L18-L21), [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L24-L27), [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Base.sol#L30-L33) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/ISystemContract.sol 17 modifier onlySystemCall() { 18 require( 19 SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender), 20 "This method require system call flag" 21 ); 22 _; 23: } 27 modifier onlyCallFromSystemContract() { 28 require( 29 SystemContractHelper.isSystemContract(msg.sender), 30 "This method require the caller to be system contract" 31 ); 32 _; 33: } 37 modifier onlyCallFrom(address caller) { 38 require(msg.sender == caller, "Inappropriate caller"); 39 _; 40: } 44 modifier onlyCallFromBootloader() { 45 require(msg.sender == BOOTLOADER_FORMAL_ADDRESS, "Callable only by the bootloader"); 46 _; 47: } ``` *GitHub*: [17](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L15-L21), [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L25-L31), [37](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L35-L38), [44](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/ISystemContract.sol#L42-L45) ### [D‑73] ~~Unused named return variables without optimizer waste gas~~ Suggestions that only apply when the optimizer is _off_ are not useful to sponsors. Why would they pay for gas optimizations if they don't have the optimizer on, and don't plan to turn it on? Only a [small minority](https://github.com/search?q=org%3Acode-423n4+%22optimizer+%3D+false%22&type=code) have the optimizer off; the majority have it set to more than [200](https://github.com/search?q=org%3Acode-423n4+optimizer_runs&type=code) runs *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol /// @audit txHash 46: function encodeLegacyTransactionHash(Transaction calldata _transaction) internal view returns (bytes32 txHash) { ``` *GitHub*: [46](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L44) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol /// @audit info 36: function getAccountInfo(address _address) external view returns (AccountInfo memory info) { ``` *GitHub*: [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L34) ### [D‑74] ~~Unusual loop variable~~ These instances all properly use 'i' as the outer for-loop loop variable *There are 30 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 64: for (uint256 i = 0; i < targetsLength; i = i.uncheckedInc()) { 98: for (uint256 i = 0; i < callersLength; i = i.uncheckedInc()) { ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L62-L62), [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L96-L96) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 227: for (uint256 i = 0; i < _calls.length; ++i) { ``` *GitHub*: [227](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L225-L225) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 206: for (uint256 i = 0; i < _factoryDeps.length; ++i) { ``` *GitHub*: [206](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L204-L204) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 87: for (uint256 i = 0; i < _newBatchesData.length; ++i) { 118: for (uint256 i = 0; i < _newBatchesData.length; ++i) { ``` *GitHub*: [87](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L85-L85), [118](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L116-L116) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 125: for (uint256 i = 0; i < emittedL2Logs.length; i = i.uncheckedAdd(L2_TO_L1_LOG_SERIALIZE_SIZE)) { 211: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 243: for (uint256 i = 0; i < _newBatchesData.length; i = i.uncheckedInc()) { 265: for (uint256 i = 0; i < _nPriorityOps; i = i.uncheckedInc()) { 295: for (uint256 i = 0; i < nBatches; i = i.uncheckedInc()) { 332: for (uint256 i = 0; i < committedBatchesLength; i = i.uncheckedInc()) { ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L123-L123), [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L209-L209), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L241-L241), [265](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L263-L263), [295](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L293-L293), [332](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L330-L330) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Getters.sol 184: for (uint256 i = 0; i < facetsLen; i = i.uncheckedInc()) { ``` *GitHub*: [184](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Getters.sol#L182-L182) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 397: for (uint256 i = 0; i < factoryDepsLen; i = i.uncheckedInc()) { ``` *GitHub*: [397](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L395-L395) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 102: for (uint256 i = 0; i < facetCutsLength; i = i.uncheckedInc()) { 140: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 161: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { 181: for (uint256 i = 0; i < selectorsLength; i = i.uncheckedInc()) { ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L100-L100), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L138-L138), [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L159-L159), [181](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L179-L179) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Merkle.sol 31: for (uint256 i; i < pathLength; i = i.uncheckedInc()) { ``` *GitHub*: [31](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Merkle.sol#L29-L29) ```solidity File: cache-zk/solpp-generated-contracts/Compressor.sol 136: for (uint256 i = 0; i < _numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; i += STATE_DIFF_ENTRY_SIZE) { 168: for (uint256 i = 0; i < _numberOfStateDiffs * STATE_DIFF_ENTRY_SIZE; i += STATE_DIFF_ENTRY_SIZE) { ``` *GitHub*: [136](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L134-L134), [168](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/Compressor.sol#L166-L166) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 250: for (uint256 i = 0; i < deploymentsLength; ++i) { 255: for (uint256 i = 0; i < deploymentsLength; ++i) { ``` *GitHub*: [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L248-L248), [255](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L253-L253) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 40: for (uint256 i = 0; i < immutablesLength; ++i) { ``` *GitHub*: [40](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L38-L38) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 33: for (uint256 i = 0; i < hashesLen; ++i) { ``` *GitHub*: [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L31-L31) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 213: for (uint256 i = 0; i < numberOfL2ToL1Logs; ++i) { 225: for (uint256 i = numberOfL2ToL1Logs; i < L2_TO_L1_LOGS_MERKLE_TREE_LEAVES; ++i) { 231: for (uint256 i = 0; i < nodesOnCurrentLevel; ++i) { 243: for (uint256 i = 0; i < numberOfMessages; ++i) { 261: for (uint256 i = 0; i < numberOfBytecodes; ++i) { ``` *GitHub*: [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L211-L211), [225](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L223-L223), [231](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L229-L229), [243](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L241-L241), [261](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L259-L259)
### [D‑75] ~~Upgradeable contract not initialized~~ These contracts are in fact initialized *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol /// @audit __ERC20Permit_init() is called 13: contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken { ``` *GitHub*: [13](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L11) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol /// @audit __ERC20Permit_init() is called 23: contract L2Weth is ERC20PermitUpgradeable, IL2Weth, IL2StandardToken { ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L21) ### [D‑76] ~~Usage of ints/uints smaller than 32 bytes incurs overhead~~ The ERC20 standard says this must be a `uint8`, so changing this is not possible *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 137: function decimals() public view override returns (uint8) { ``` *GitHub*: [137](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L135-L135) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 142: function decimals() external pure override returns (uint8) { ``` *GitHub*: [142](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L140-L140) ```solidity File: cache-zk/solpp-generated-contracts/interfaces/IEthToken.sol 18: function decimals() external pure returns (uint8); ``` *GitHub*: [18](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/interfaces/IEthToken.sol#L16-L16) ### [D‑77] ~~Use != 0 instead of > 0 for unsigned integer comparison~~ Only valid prior to Solidity version 0.8.13, and only for `require()` statements, and at least one of those is not true for the examples below *There are 10 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 355: if (_proof.serializedProof.length > 0) { 466: return (_bitMap & (1 << _index)) > 0; ``` *GitHub*: [355](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L353-L353), [466](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L464-L464) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 314: if (refundRecipient.code.length > 0) { ``` *GitHub*: [314](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L312-L312) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 104: if (codeHash == 0x00 && NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(account) > 0) { ``` *GitHub*: [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L102-L102) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 335: if (value > 0) { 342: if (value > 0) { ``` *GitHub*: [335](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L333-L333), [342](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L340-L340) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 151: return (_nonce < getMinNonce(_address) || nonceValues[addressAsKey][_nonce] > 0); ``` *GitHub*: [151](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L149-L149) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 125: currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block > 0 ``` *GitHub*: [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L123-L123) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 43: return account.code.length > 0; 299: if (returndata.length > 0) { ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L41-L41), [299](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L297-L297)
### [D‑78] ~~Use `_safeMint` instead of `_mint` for ERC721~~ The contract here isn't an ERC721 - it's some other token. Note that ERC1155 defines `_mint()`, not `_safeMint()` *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 112: _mint(_to, _amount); ``` *GitHub*: [112](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L110-L110) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 101: _mint(_to, msg.value); ``` *GitHub*: [101](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L99-L99) ### [D‑79] ~~Use `@inheritdoc` rather than using a non-standard annotation~~ *There are 49 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 303 /// @return l2Token Address of an L2 token counterpart. 304: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [303](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L301-L302) ```solidity File: cache/solpp-generated-contracts/upgrades/DefaultUpgrade.sol 25 /// @notice The main function that will be called by the upgrade proxy. 26 /// @param _proposedUpgrade The upgrade to be executed. 27: function upgrade(ProposedUpgrade calldata _proposedUpgrade) public override returns (bytes32) { ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/DefaultUpgrade.sol#L23-L25) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 175 /// @notice Commit batch 176 /// @notice 1. Checks timestamp. 177 /// @notice 2. Process L2 logs. 178 /// @notice 3. Store batch commitments. 179 function commitBatches(StoredBatchInfo memory _lastCommittedBatchData, CommitBatchInfo[] calldata _newBatchesData) 180 external 181 override 182 nonReentrant 183 onlyValidator 184: { ``` *GitHub*: [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L173-L182) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 79 /// @param _l2TxNumberInBatch The L2 transaction number in the batch, in which the log was sent 80 /// @param _merkleProof The Merkle proof of the processing L1 -> L2 transaction 81 /// @param _status The execution status of the L1 -> L2 transaction (true - success & 0 - fail) 82 /// @return Whether the proof is correct and the transaction was actually executed with provided status 83 /// NOTE: It may return `false` for incorrect proof, but it doesn't mean that the L1 -> L2 transaction has an opposite status! 84 function proveL1ToL2TransactionStatus( 85 bytes32 _l2TxHash, 86 uint256 _l2BatchNumber, 87 uint256 _l2MessageIndex, 88 uint16 _l2TxNumberInBatch, 89 bytes32[] calldata _merkleProof, 90 TxStatus _status 91: ) public view override returns (bool) { 189 /// @param _l2BatchNumber The L2 batch number where the withdrawal was processed 190 /// @param _l2MessageIndex The position in the L2 logs Merkle tree of the l2Log that was sent with the message 191 /// @param _l2TxNumberInBatch The L2 transaction number in a batch, in which the log was sent 192 /// @param _message The L2 withdraw data, stored in an L2 -> L1 message 193 /// @param _merkleProof The Merkle proof of the inclusion L2 -> L1 message about withdrawal initialization 194 function finalizeEthWithdrawal( 195 uint256 _l2BatchNumber, 196 uint256 _l2MessageIndex, 197 uint16 _l2TxNumberInBatch, 198 bytes calldata _message, 199 bytes32[] calldata _merkleProof 200: ) external override nonReentrant senderCanCallFunction(s.allowList) { ``` *GitHub*: [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L77-L89), [189](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L187-L198) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 60 /// @param _l1Sender The account address that initiated the deposit on L1 61 /// @param _l2Receiver The account address that would receive minted ether 62 /// @param _l1Token The address of the token that was locked on the L1 63 /// @param _amount Total amount of tokens deposited from L1 64 /// @param _data The additional data that user can pass with the deposit 65 function finalizeDeposit( 66 address _l1Sender, 67 address _l2Receiver, 68 address _l1Token, 69 uint256 _amount, 70 bytes calldata _data 71: ) external payable override { 102 /// @notice Initiates a withdrawal by burning funds on the contract and sending the message to L1 103 /// where tokens would be unlocked 104 /// @param _l1Receiver The account address that should receive funds on L1 105 /// @param _l2Token The L2 token address which is withdrawn 106 /// @param _amount The total amount of tokens to be withdrawn 107 function withdraw( 108 address _l1Receiver, 109 address _l2Token, 110 uint256 _amount 111: ) external override { 132 /// @return Address of an L2 token counterpart 133: function l2TokenAddress(address _l1Token) public view override returns (address) { ``` *GitHub*: [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L58-L69), [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L100-L109), [132](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L130-L131) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 107 /// @dev Mint tokens to a given account. 108 /// @param _to The account that will receive the created tokens. 109 /// @param _amount The amount that will be created. 110 /// @notice Should be called by bridge after depositing tokens from L1. 111: function bridgeMint(address _to, uint256 _amount) external override onlyBridge { 116 /// @dev Burn tokens from a given account. 117 /// @param _from The account from which tokens will be burned. 118 /// @param _amount The amount that will be burned. 119 /// @notice Should be called by bridge before withdrawing tokens to L1. 120: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { ``` *GitHub*: [107](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L105-L109), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L114-L118) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 66 /// @notice Function for minting tokens on L2, implemented only to be compatible with IL2StandardToken interface. 67 /// Always reverts instead of minting anything! 68 /// Note: Use `deposit`/`depositTo` methods instead. 69 function bridgeMint( 70 address, // _account 71 uint256 // _amount 72: ) external view override { 76 /// @dev Burn tokens from a given account and send the same amount of Ether to the bridge. 77 /// @param _from The account from which tokens will be burned. 78 /// @param _amount The amount that will be burned. 79 /// @notice Should be called by the bridge before withdrawing tokens to L1. 80: function bridgeBurn(address _from, uint256 _amount) external override onlyBridge { 89 /// @notice Deposit Ether to mint WETH. 90: function deposit() external payable override { 94 /// @notice Withdraw WETH to get Ether. 95: function withdraw(uint256 _amount) external override { 99 /// @notice Deposit Ether to mint WETH to a given account. 100: function depositTo(address _to) public payable override { 104 /// @notice Withdraw WETH to get Ether to a given account. 105 /// burns sender's tokens and sends Ether to the given account 106: function withdrawTo(address _to, uint256 _amount) public override { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L64-L70), [76](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L74-L78), [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L87-L88), [94](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L92-L93), [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L97-L98), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L102-L104) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 61 /// @notice Initiate the withdrawal of WETH from L2 to L1 by sending a message to L1 and calling withdraw on L2EthToken contract 62 /// @param _l1Receiver The account address that would receive the WETH on L1 63 /// @param _l2Token Address of the L2 WETH token 64 /// @param _amount Total amount of WETH to withdraw 65 function withdraw( 66 address _l1Receiver, 67 address _l2Token, 68 uint256 _amount 69: ) external override { 85 /// @notice Finalize the deposit of WETH from L1 to L2 by calling deposit on L2Weth contract 86 /// @param _l1Sender The account address that initiated the deposit on L1 87 /// @param _l2Receiver The account address that would receive the WETH on L2 88 /// @param _l1Token Address of the L1 WETH token 89 /// @param _amount Total amount of WETH to deposit 90 function finalizeDeposit( 91 address _l1Sender, 92 address _l2Receiver, 93 address _l1Token, 94 uint256 _amount, 95 bytes calldata // _data 96: ) external payable override { 111 /// @return l1Token Address of an L1 token counterpart. 112: function l1TokenAddress(address _l2Token) public view override returns (address l1Token) { 116 /// @return l2Token Address of an L2 token counterpart. 117: function l2TokenAddress(address _l1Token) public view override returns (address l2Token) { ``` *GitHub*: [61](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L59-L67), [85](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L83-L94), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L109-L110), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L114-L115) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 32 /// @notice Stores the bytecodeHash of constructing contract. 33 /// @param _address The address of the account to set the codehash to. 34 /// @param _hash The new bytecode hash of the constructing account. 35 /// @dev This method trusts the ContractDeployer to make sure that the bytecode is known and well-formed, 36 /// but checks whether the bytecode hash corresponds to the constructing smart contract. 37: function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 43 /// @notice Stores the bytecodeHash of constructed contract. 44 /// @param _address The address of the account to set the codehash to. 45 /// @param _hash The new bytecode hash of the constructed account. 46 /// @dev This method trusts the ContractDeployer to make sure that the bytecode is known and well-formed, 47 /// but checks whether the bytecode hash corresponds to the constructed smart contract. 48: function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external override onlyDeployer { 54 /// @notice Marks the account bytecodeHash as constructed. 55 /// @param _address The address of the account to mark as constructed 56: function markAccountCodeHashAsConstructed(address _address) external override onlyDeployer { 77 /// @notice Get the codehash stored for an address. 78 /// @param _address The address of the account of which the codehash to return 79 /// @return codeHash The codehash stored for this account. 80: function getRawCodeHash(address _address) public view override returns (bytes32 codeHash) { 88 /// @notice Simulate the behavior of the `extcodehash` EVM opcode. 89 /// @param _input The 256-bit account address. 90 /// @return codeHash - hash of the bytecode according to the EIP-1052 specification. 91: function getCodeHash(uint256 _input) external view override returns (bytes32) { 116 /// @notice Simulate the behavior of the `extcodesize` EVM opcode. 117 /// @param _input The 256-bit account address. 118 /// @return codeSize - the size of the deployed smart contract in bytes. 119: function getCodeSize(uint256 _input) external view override returns (uint256 codeSize) { ``` *GitHub*: [32](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L30-L35), [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L41-L46), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L52-L54), [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L75-L78), [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L86-L89), [116](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L114-L117) ```solidity File: cache-zk/solpp-generated-contracts/BootloaderUtilities.sol 21 /// @notice Calculates the canonical transaction hash and the recommended transaction hash. 22 /// @param _transaction The transaction. 23 /// @return txHash and signedTxHash of the transaction, i.e. the transaction hash to be used in the explorer and commits to all 24 /// the fields of the transaction and the recommended hash to be signed for this transaction. 25 /// @dev txHash must be unique for all transactions. 26 function getTransactionHashes( 27 Transaction calldata _transaction 28: ) external view override returns (bytes32 txHash, bytes32 signedTxHash) { ``` *GitHub*: [21](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/BootloaderUtilities.sol#L19-L26) ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 89 /// @param _sender The account that deploys the contract. 90 /// @param _bytecodeHash The correctly formatted hash of the bytecode. 91 /// @param _salt The create2 salt. 92 /// @param _input The constructor data. 93 /// @return newAddress The derived address of the account. 94 function getNewAddressCreate2( 95 address _sender, 96 bytes32 _bytecodeHash, 97 bytes32 _salt, 98 bytes calldata _input 99: ) public view override returns (address newAddress) { 111 /// @notice Calculates the address of a deployed contract via create 112 /// @param _sender The account that deploys the contract. 113 /// @param _senderNonce The deploy nonce of the sender's account. 114 function getNewAddressCreate( 115 address _sender, 116 uint256 _senderNonce 117: ) public pure override returns (address newAddress) { 127 /// @notice Deploys a contract with similar address derivation rules to the EVM's `CREATE2` opcode. 128 /// @param _salt The CREATE2 salt 129 /// @param _bytecodeHash The correctly formatted hash of the bytecode. 130 /// @param _input The constructor calldata 131 /// @dev In case of a revert, the zero address should be returned. 132 function create2( 133 bytes32 _salt, 134 bytes32 _bytecodeHash, 135 bytes calldata _input 136: ) external payable override returns (address) { 143 /// @dev This method also accepts nonce as one of its parameters. 144 /// It is not used anywhere and it needed simply for the consistency for the compiler 145 /// @dev In case of a revert, the zero address should be returned. 146 /// Note: this method may be callable only in system mode, 147 /// that is checked in the `createAccount` by `onlySystemCall` modifier. 148 function create( 149 bytes32 _salt, 150 bytes32 _bytecodeHash, 151 bytes calldata _input 152: ) external payable override returns (address) { 159 /// @param _input The constructor calldata. 160 /// @param _aaVersion The account abstraction version to use. 161 /// @dev In case of a revert, the zero address should be returned. 162 /// Note: this method may be callable only in system mode, 163 /// that is checked in the `createAccount` by `onlySystemCall` modifier. 164 function create2Account( 165 bytes32 _salt, 166 bytes32 _bytecodeHash, 167 bytes calldata _input, 168 AccountAbstractionVersion _aaVersion 169: ) public payable override onlySystemCall returns (address) { 180 /// @param _input The constructor calldata. 181 /// @param _aaVersion The account abstraction version to use. 182 /// @dev This method also accepts salt as one of its parameters. 183 /// It is not used anywhere and it needed simply for the consistency for the compiler 184 /// @dev In case of a revert, the zero address should be returned. 185 function createAccount( 186 bytes32, // salt 187 bytes32 _bytecodeHash, 188 bytes calldata _input, 189 AccountAbstractionVersion _aaVersion 190: ) public payable override onlySystemCall returns (address) { ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L87-L97), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L109-L115), [127](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L125-L134), [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L141-L150), [159](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L157-L167), [180](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L178-L188) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 64 /// @param _suggestedSignedHash The suggested hash of the transaction to be signed by the user. 65 /// This is the hash that is signed by the EOA by default. 66 /// @param _transaction The transaction structure itself. 67 /// @dev Besides the params above, it also accepts unused first paramter "_txHash", which 68 /// is the unique (canonical) hash of the transaction. 69 function validateTransaction( 70 bytes32, // _txHash 71 bytes32 _suggestedSignedHash, 72 Transaction calldata _transaction 73: ) external payable override ignoreNonBootloader ignoreInDelegateCall returns (bytes4 magic) { 111 /// @notice Method called by the bootloader to execute the transaction. 112 /// @param _transaction The transaction to execute. 113 /// @dev It also accepts unused _txHash and _suggestedSignedHash parameters: 114 /// the unique (canonical) hash of the transaction and the suggested signed 115 /// hash of the transaction. 116 function executeTransaction( 117 bytes32, // _txHash 118 bytes32, // _suggestedSignedHash 119 Transaction calldata _transaction 120: ) external payable override ignoreNonBootloader ignoreInDelegateCall { 124 /// @notice Method that should be used to initiate a transaction from this account by an external call. 125 /// @dev The custom account is supposed to implement this method to initiate a transaction on behalf 126 /// of the account via L1 -> L2 communication. However, the default account can initiate a transaction 127 /// from L1, so we formally implement the interface method, but it doesn't execute any logic. 128 /// @param _transaction The transaction to execute. 129 function executeTransactionFromOutside(Transaction calldata _transaction) external payable override { 130 // Behave the same as for fallback/receive, just execute nothing, returns nothing 131: } ``` *GitHub*: [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L62-L71), [111](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L109-L118), [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L122-L129) ```solidity File: cache-zk/solpp-generated-contracts/ImmutableSimulator.sol 25 /// @notice Method that returns the immutable with a certain index for a user. 26 /// @param _dest The address which the immutable belongs to. 27 /// @param _index The index of the immutable. 28 /// @return The value of the immutables. 29: function getImmutable(address _dest, uint256 _index) external view override returns (bytes32) { 33 /// @notice Method used by the contract deployer to store the immutables for an account 34 /// @param _dest The address which to store the immutables for. 35 /// @param _immutables The list of the immutables. 36: function setImmutables(address _dest, ImmutableData[] calldata _immutables) external override { ``` *GitHub*: [25](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L23-L27), [33](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ImmutableSimulator.sol#L31-L34) ```solidity File: cache-zk/solpp-generated-contracts/KnownCodesStorage.sol 66 /// @notice Returns the marker stored for a bytecode hash. 1 means that the bytecode hash is known 67 /// and can be used for deploying contracts. 0 otherwise. 68: function getMarker(bytes32 _hash) public view override returns (uint256 marker) { ``` *GitHub*: [66](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/KnownCodesStorage.sol#L64-L66) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 120 /// @notice Public functionality to send messages to L1. 121: function sendToL1(bytes calldata _message) external override returns (bytes32 hash) { 166 /// @dev Can be called only by KnownCodesStorage system contract. 167 function requestBytecodeL1Publication( 168 bytes32 _bytecodeHash 169: ) external override onlyCallFrom(address(KNOWN_CODE_STORAGE_CONTRACT)) { ``` *GitHub*: [120](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L118-L119), [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L164-L167) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 29 /// @param _to The address to transfer the ETH to. 30 /// @param _amount The amount of ETH in wei being transferred. 31 /// @dev This function can be called only by trusted system contracts. 32 /// @dev This function also emits "Transfer" event, which might be removed 33 /// later on. 34: function transferFromTo(address _from, address _to, uint256 _amount) external override { 54 /// @notice Returns ETH balance of an account 55 /// @dev It takes `uint256` as an argument to be able to properly simulate the behaviour of the 56 /// Ethereum's `BALANCE` opcode that accepts uint256 as an argument and truncates any upper bits 57 /// @param _account The address of the account to return the balance of. 58: function balanceOf(uint256 _account) external view override returns (uint256) { 62 /// @notice Increase the total supply of tokens and balance of the receiver. 63 /// @dev This method is only callable by the bootloader. 64 /// @param _account The address which to mint the funds to. 65 /// @param _amount The amount of ETH in wei to be minted. 66: function mint(address _account, uint256 _amount) external override onlyCallFromBootloader { 72 /// @notice Initiate the ETH withdrawal, funds will be available to claim on L1 `finalizeEthWithdrawal` method. 73 /// @param _l1Receiver The address on L1 to receive the funds. 74: function withdraw(address _l1Receiver) external payable override { 84 /// @notice Initiate the ETH withdrawal, with the sent message. The funds will be available to claim on L1 `finalizeEthWithdrawal` method. 85 /// @param _l1Receiver The address on L1 to receive the funds. 86 /// @param _additionalData Additional data to be sent to L1 with the withdrawal. 87: function withdrawWithMessage(address _l1Receiver, bytes memory _additionalData) external payable override { 128 /// @dev This method has not been stabilized and might be 129 /// removed later on. 130: function name() external pure override returns (string memory) { 134 /// @dev This method has not been stabilized and might be 135 /// removed later on. 136: function symbol() external pure override returns (string memory) { 140 /// @dev This method has not been stabilized and might be 141 /// removed later on. 142: function decimals() external pure override returns (uint8) { ``` *GitHub*: [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L27-L32), [54](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L52-L56), [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L60-L64), [72](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L70-L72), [84](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L82-L85), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L126-L128), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L132-L134), [140](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L138-L140)
### [D‑80] ~~Use `assembly` to write address/contract type storage values~~ Using this suggestion stomps over any value packed into the same slot as the address, so this advice is not safe. *There are 29 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 99: l2TokenBeacon = _l2TokenBeacon; 125 l2Bridge = BridgeInitializationHelper.requestDeployTransaction( 126 zkSync, 127 _deployBridgeProxyFee, 128 l2BridgeProxyBytecodeHash, 129 l2BridgeProxyConstructorData, 130 // No factory deps are needed for L2 bridge proxy, because it is already passed in previous step 131 new bytes[](0) 132: ); ``` *GitHub*: [99](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L97-L97), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L123-L130) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 98: l2WethAddress = _l2WethAddress; 128 l2Bridge = BridgeInitializationHelper.requestDeployTransaction( 129 zkSync, 130 _deployBridgeProxyFee, 131 l2WethBridgeProxyBytecodeHash, 132 l2WethBridgeProxyConstructorData, 133 // No factory deps are needed for L2 bridge proxy, because it is already passed in the previous step 134 new bytes[](0) 135: ); ``` *GitHub*: [98](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L96-L96), [128](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L126-L133) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 48: securityCouncil = _securityCouncil; 260: securityCouncil = _newSecurityCouncil; ``` *GitHub*: [48](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L46-L46), [260](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L258-L258) ```solidity File: cache/solpp-generated-contracts/upgrades/BaseZkSyncUpgrade.sol 123: s.verifier = _newVerifier; 242: s.allowList = _newAllowList; ``` *GitHub*: [123](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L121-L121), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol#L240-L240) ```solidity File: cache/solpp-generated-contracts/zksync/DiamondInit.sol 63: s.verifier = _initalizeData.verifier; 64: s.governor = _initalizeData.governor; 65: s.admin = _initalizeData.admin; 80: s.allowList = _initalizeData.allowList; ``` *GitHub*: [63](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L61-L61), [64](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L62-L62), [65](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L63-L63), [80](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/DiamondInit.sol#L78-L78) ```solidity File: cache/solpp-generated-contracts/zksync/ValidatorTimelock.sol 50: validator = _validator; 56: validator = _newValidator; ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L48-L48), [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/ValidatorTimelock.sol#L54-L54) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Admin.sol 26: s.pendingGovernor = _newPendingGovernor; 36: s.governor = pendingGovernor; 50: s.pendingAdmin = _newPendingAdmin; 60: s.admin = pendingAdmin; ``` *GitHub*: [26](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L24-L24), [36](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L34-L34), [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L48-L48), [60](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Admin.sol#L58-L58) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 51: l1Bridge = _l1Bridge; 55: l2TokenBeacon = new UpgradeableBeacon{salt: bytes32(0)}(l2StandardToken); ``` *GitHub*: [51](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L49-L49), [55](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L53-L53) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 50: l1Address = _l1Address; 52: l2Bridge = msg.sender; ``` *GitHub*: [50](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L48-L48), [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L50-L50) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2Weth.sol 57: l2Bridge = _l2Bridge; 58: l1Address = _l1Address; ``` *GitHub*: [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L55-L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2Weth.sol#L56-L56) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 56: l1Bridge = _l1Bridge; 57: l1WethAddress = _l1WethAddress; 58: l2WethAddress = _l2WethAddress; ``` *GitHub*: [56](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L54-L54), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L55-L55), [58](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L56-L56) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 43: address public coinbase = BOOTLOADER_FORMAL_ADDRESS; 90: origin = _newOrigin; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L41-L41), [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L88-L88)
### [D‑81] ~~Use `bytes.concat()` on bytes instead of `abi.encodePacked()` for clearer semantic meaning~~ These instances don't use only bytes/strings, so they're invalid *There are 10 instances of this issue:*
see instances ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 429 abi.encodePacked( 430 _batch.indexRepeatedStorageChanges, 431 _batch.newStateRoot, 432 uint64(0), // index repeated storage changes in zkPorter 433 bytes32(0) // zkPorter batch hash 434: ); 438: return abi.encodePacked(s.zkPorterIsAvailable, s.l2BootloaderBytecodeHash, s.l2DefaultAccountBytecodeHash); ``` *GitHub*: [429](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L427-L432), [438](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L436-L436) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 134: abi.encodePacked(_log.l2ShardId, _log.isService, _log.txNumberInBatch, _log.sender, _log.key, _log.value) ``` *GitHub*: [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L132-L132) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2ERC20Bridge.sol 129: return abi.encodePacked(IL1Bridge.finalizeWithdrawal.selector, _to, _l1Token, _amount); ``` *GitHub*: [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2ERC20Bridge.sol#L127-L127) ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2WethBridge.sol 77: bytes memory wethMessage = abi.encodePacked(_l1Receiver); ``` *GitHub*: [77](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2WethBridge.sol#L75-L75) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 102 abi.encodePacked( 103 _l2ToL1Log.l2ShardId, 104 _l2ToL1Log.isService, 105 _l2ToL1Log.txNumberInBlock, 106 _l2ToL1Log.sender, 107 _l2ToL1Log.key, 108 _l2ToL1Log.value 109: ) ``` *GitHub*: [102](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L100-L107) ```solidity File: cache-zk/solpp-generated-contracts/L2EthToken.sol 115: return abi.encodePacked(IMailbox.finalizeEthWithdrawal.selector, _to, _amount); 125: return abi.encodePacked(IMailbox.finalizeEthWithdrawal.selector, _to, _amount, _sender, _additionalData); ``` *GitHub*: [115](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L113-L113), [125](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L2EthToken.sol#L123-L123) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 207: return keccak256(abi.encodePacked(uint32(_blockNumber))); ``` *GitHub*: [207](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L205-L205) ```solidity File: cache-zk/solpp-generated-contracts/libraries/TransactionHelper.sol 135: keccak256(abi.encodePacked(_transaction.factoryDeps)), ``` *GitHub*: [135](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/TransactionHelper.sol#L133-L133)
### [D‑82] ~~Use assembly to emit events, in order to save gas~~ For these instances, the arguments are too large to fit in the scratch space, so the finding is invalid *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 213: emit DepositInitiated(l2TxHash, msg.sender, _l2Receiver, _l1Token, amount); ``` *GitHub*: [213](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L211-L211) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 197: emit DepositInitiated(txHash, msg.sender, _l2Receiver, _l1Token, _amount); ``` *GitHub*: [197](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L195-L195) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 297: emit BlockExecution(_batchesData[i].batchNumber, _batchesData[i].batchHash, _batchesData[i].commitment); 406: emit BlocksRevert(s.totalBatchesCommitted, s.totalBatchesVerified, s.totalBatchesExecuted); ``` *GitHub*: [297](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L295-L295), [406](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L404-L404) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 380 emit NewPriorityRequest( 381 _priorityOpParams.txId, 382 canonicalTxHash, 383 _priorityOpParams.expirationTimestamp, 384 transaction, 385 _factoryDeps 386: ); ``` *GitHub*: [380](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L378-L384) ### [D‑83] ~~Use constants instead of type(uintx).max~~ Does [not](https://gist.github.com/IllIllI000/1c514c830fc8990f36f579eb5c973d24) save any gas *There are 12 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/TransactionValidator.sol 52: require(_transaction.from <= type(uint16).max, "ua"); 53: require(_transaction.to <= type(uint160).max, "ub"); 57: require(_transaction.reserved[1] <= type(uint160).max, "uf"); ``` *GitHub*: [52](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L50-L50), [53](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L51-L51), [57](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/TransactionValidator.sol#L55-L55) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 39: uint256 public blockGasLimit = type(uint32).max; ``` *GitHub*: [39](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L37-L37) ```solidity File: cache-zk/solpp-generated-contracts/libraries/RLPEncoder.sol 88: if (_number > type(uint128).max) { 92: if (_number > type(uint64).max) { 96: if (_number > type(uint32).max) { 100: if (_number > type(uint16).max) { 104: if (_number > type(uint8).max) { ``` *GitHub*: [88](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L86-L86), [92](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L90-L90), [96](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L94-L94), [100](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L98-L98), [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/RLPEncoder.sol#L102-L102) ```solidity File: cache-zk/solpp-generated-contracts/libraries/Utils.sol 23: require(_x <= type(uint128).max, "Overflow"); 29: require(_x <= type(uint32).max, "Overflow"); 35: require(_x <= type(uint24).max, "Overflow"); ``` *GitHub*: [23](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L21-L21), [29](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L27-L27), [35](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/libraries/Utils.sol#L33-L33) ### [D‑84] ~~Use delete instead of setting mapping/state variable to zero, to save gas~~ Using delete instead of assigning zero to state variables does not save any extra gas with the optimizer [on](https://gist.github.com/IllIllI000/ef8ec3a70aede7f12433fe63dc418515#with-the-optimizer-set-at-200-runs) (saves 5-8 gas with optimizer completely off), so this finding is invalid, especially since if they were interested in gas savings, they'd have the optimizer enabled. *There are 2 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 335: numberOfLogsToProcess = 0; ``` *GitHub*: [335](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L333-L333) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 461: txNumberInBlock = 0; ``` *GitHub*: [461](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L459-L459) ### [D‑85] ~~Use multiple `require()` and `if` statements instead of `&&`~~ The suggestion in this rule is not logically equivalent for `if`-statements unless they're nested, and cannot be done if there's an `else`-block without spending more gas. It doesn't seem more readable for `require()`s either *There are 10 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 305 if (batchWhenUpgradeHappened != 0 && batchWhenUpgradeHappened <= newTotalBatchesExecuted) { 306 delete s.l2SystemContractsUpgradeTxHash; 307: delete s.l2SystemContractsUpgradeBatchNumber; ``` *GitHub*: [305](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L303-L305) ```solidity File: cache-zk/solpp-generated-contracts/AccountCodeStorage.sol 104 if (codeHash == 0x00 && NONCE_HOLDER_SYSTEM_CONTRACT.getRawNonce(account) > 0) { 105 codeHash = EMPTY_STRING_KECCAK; 106: } 134 uint160(account) > CURRENT_MAX_PRECOMPILE_ADDRESS && 135 codeHash != 0x00 && 136 !Utils.isContractConstructing(codeHash) 137 ) { 138: codeSize = Utils.bytecodeLenInBytes(codeHash); ``` *GitHub*: [104](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L102-L104), [134](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/AccountCodeStorage.sol#L132-L136) ```solidity File: cache-zk/solpp-generated-contracts/DefaultAccount.sol 143 if (to == address(DEPLOYER_SYSTEM_CONTRACT) && data.length >= 4) { 144 bytes4 selector = bytes4(data[:4]); 145: // Check that called function is the deployment method, ``` *GitHub*: [143](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/DefaultAccount.sol#L141-L143) ```solidity File: cache-zk/solpp-generated-contracts/NonceHolder.sol 90 if (accountInfo.nonceOrdering == IContractDeployer.AccountNonceOrdering.Sequential && _key != 0) { 91 require(isNonceUsed(msg.sender, _key - 1), "Previous nonce has not been used"); 92: } 164 if (isUsed && !_shouldBeUsed) { 165 revert("Reusing the same nonce twice"); 166: } else if (!isUsed && _shouldBeUsed) { 166 } else if (!isUsed && _shouldBeUsed) { 167 revert("The nonce was not set as used"); 168: } ``` *GitHub*: [90](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L88-L90), [164](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L162-L164), [166](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/NonceHolder.sol#L164-L166) ```solidity File: cache-zk/solpp-generated-contracts/SystemContext.sol 124 _block >= currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block && 125 currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block > 0 126 ) { 127: hash = _getLatest257L2blockHash(_block); 250 if (currentVirtualL2BlockInfo.number == 0 && virtualBlockInfo.timestamp == 0) { 251 uint128 currentBatchNumber = currentBatchInfo.number; 252: 333 if (currentL2BlockNumber == 0 && currentL2BlockTimestamp == 0) { 334 // Since currentL2BlockNumber and currentL2BlockTimestamp are zero it means that it is 335: // the first ever batch with L2 blocks, so we need to initialize those. ``` *GitHub*: [124](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L122-L125), [250](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L248-L250), [333](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/SystemContext.sol#L331-L333) ### [D‑86] ~~Use replace and pop instead of the delete keyword to removing an item from an array~~ The examples below are mappings, not arrays *There are 4 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 282: delete depositAmount[_depositSender][_l1Token][_l2TxHash]; ``` *GitHub*: [282](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L280-L280) ```solidity File: cache/solpp-generated-contracts/governance/Governance.sol 158: delete timestamps[_id]; ``` *GitHub*: [158](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/governance/Governance.sol#L156-L156) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 254: delete ds.selectorToFacet[_selector]; ``` *GitHub*: [254](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L252-L252) ```solidity File: cache/solpp-generated-contracts/zksync/libraries/PriorityQueue.sol 81: delete _queue.data[head]; ``` *GitHub*: [81](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/PriorityQueue.sol#L79-L79) ### [D‑87] ~~Using `calldata` instead of `memory` for read-only arguments in `external` functions saves gas~~ [Invalid](https://gist.github.com/IllIllI000/2ac9a647be917f58ffe5baa2cecbbc42) for arrays of non-word-sized types *There are 3 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol /// @audit _addFunctions(_selectors) 129: bytes4[] memory _selectors, /// @audit _replaceFunctions(_selectors) 153: bytes4[] memory _selectors, /// @audit _removeFunctions(_selectors) 175: function _removeFunctions(address _facet, bytes4[] memory _selectors) private { ``` *GitHub*: [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L127-L127), [153](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L151-L151), [175](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L173-L173) ### [D‑88] ~~Using `storage` instead of `memory` for structs/arrays saves gas~~ There is no storage being read from *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/facets/Executor.sol 326: uint256[] memory proofPublicInput = new uint256[](committedBatchesLength); ``` *GitHub*: [326](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L324-L324) ```solidity File: cache-zk/solpp-generated-contracts/L1Messenger.sol 211: bytes32[] memory l2ToL1LogsTreeArray = new bytes32[](L2_TO_L1_LOGS_MERKLE_TREE_LEAVES); ``` *GitHub*: [211](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/L1Messenger.sol#L209-L209) ### [D‑89] ~~Using `this` to access functions results in an external call, wasting gas~~ External calls are required in order to use a try-catch, as is being done here *There are 3 instances of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/bridge/L2StandardERC20.sol 73: try this.decodeString(nameBytes) returns (string memory nameString) { 79: try this.decodeString(symbolBytes) returns (string memory symbolString) { 91: try this.decodeUint8(decimalsBytes) returns (uint8 decimalsUint8) { ``` *GitHub*: [73](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L71-L71), [79](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L77-L77), [91](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/zksync/contracts/bridge/L2StandardERC20.sol#L89-L89) ### [D‑90] ~~Using `this` to access functions results in an external call, wasting gas~~ This is not an external call *There are 2 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 334: require(bytes4(functionSignature) == this.finalizeWithdrawal.selector, "nt"); ``` *GitHub*: [334](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L332-L332) ```solidity File: cache/solpp-generated-contracts/zksync/facets/Mailbox.sol 426: require(bytes4(functionSignature) == this.finalizeEthWithdrawal.selector, "is"); ``` *GitHub*: [426](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/facets/Mailbox.sol#L424-L424) ### [D‑91] ~~Using `storage` instead of `memory` for structs/arrays saves gas~~ The function signature would have to change in order to return storage instead *There is one instance of this issue:* ```solidity File: cache-zk/solpp-generated-contracts/ContractDeployer.sol 43: AccountInfo memory info = accountInfo[_address]; ``` *GitHub*: [43](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ContractDeployer.sol#L41-L41) ### [D‑92] ~~Using bitmap to store bool states can save gas~~ none of these are examples where bitmaps can be used *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/bridge/L1ERC20Bridge.sol 41: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; ``` *GitHub*: [41](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1ERC20Bridge.sol#L39-L39) ```solidity File: cache/solpp-generated-contracts/bridge/L1WethBridge.sol 62: mapping(uint256 => mapping(uint256 => bool)) public isWithdrawalFinalized; ``` *GitHub*: [62](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/bridge/L1WethBridge.sol#L60-L60) ```solidity File: cache/solpp-generated-contracts/common/AllowList.sol 28: mapping(address => mapping(address => mapping(bytes4 => bool))) public hasSpecialAccessToCall; ``` *GitHub*: [28](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/common/AllowList.sol#L26-L26) ```solidity File: cache/solpp-generated-contracts/zksync/Storage.sol 89: mapping(address => bool) validators; 129: mapping(uint256 => mapping(uint256 => bool)) isEthWithdrawalFinalized; ``` *GitHub*: [89](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L87-L87), [129](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/Storage.sol#L127-L127) ### [D‑93] ~~Using named function calls is a much safer~~ A named function cannot be used here, because it's not known to the current contract *There are 5 instances of this issue:* ```solidity File: cache/solpp-generated-contracts/zksync/libraries/Diamond.sol 290: (bool success, bytes memory data) = _init.delegatecall(_calldata); ``` *GitHub*: [290](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/contracts/ethereum/contracts/zksync/libraries/Diamond.sol#L288-L288) ```solidity File: cache-zk/solpp-generated-contracts/ComplexUpgrader.sol 27: (bool success, bytes memory returnData) = _delegateTo.delegatecall(_calldata); ``` *GitHub*: [27](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/ComplexUpgrader.sol#L25-L25) ```solidity File: cache-zk/solpp-generated-contracts/openzeppelin/utils/Address.sol 161: (bool success, bytes memory returndata) = target.call{value: value}( 203: (bool success, bytes memory returndata) = target.staticcall(data); 242: (bool success, bytes memory returndata) = target.delegatecall(data); ``` *GitHub*: [161](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L159-L159), [203](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L201-L201), [242](https://github.com/code-423n4/2023-10-zksync/blob/c857609bfdc41a0ee2c1b245217a785f66b42a56/code/system-contracts/contracts/openzeppelin/utils/Address.sol#L240-L240) ## Rubric See [this](https://illilli000.github.io/races/2023-07-lens/scorer.html) link for how to use this rubric: ```json {"salt":"6ae34f","hashes":["9b2a37841a","f96e869355","6974a277ae","1a112344fe","fc63471a10","643668855d","25ef7354a5","4cd01a390a","e64deed9e4","9221558dc7","14070d9bcd","25e682daf6","6cd8349aee","09adf7eef1","c4a9d6f194","ae4daeb5ec","6d50ddfed5","1616c4ae3f","350f530552","6e2bcc376d","2fb88a8ac5","8bbbb641cd","833e2c1ae8","fb323b7ea5","291b109a03","da6a61dcbc","aabdb0337a","98cc4363a7","c1384c0e09","c660fd82eb","264be84b0b","2c27e75446","484429768b","5a2547c75a","f14a2bbb58","55ac852e9a","231b908b65","f498e88d21","4a09105de8","e274da0eb4","db22fec19b","d5e9c4a633","6e9c468b1b","897e40fd3a","0eb1f21060","d6bb315127","d24ca9341b","8d076fad4a","c28d564d77","bb16582d6b","a57b7d4f8b","df3913a4ce","7bf15fea8f","19b4374e7b","94834f8036","430f266781","3e86327655","81e76f7e0a","a1869a4aee","ad4b715669","c4caf2d4e8","bf9e94dd94","e2d6bcdab3","948f49f194","892360bccc","7acb0b1cec","8507a01450","2077293efb","ca0614e1d9","27e4d898e3","13e2785796","3ab37bc777","f2129ed6f9","297ff84536","3391709fbd","0b21a984eb","6695f25a8b","55ac852e9a","231b908b65","f498e88d21","4a09105de8","e274da0eb4","db22fec19b","d5e9c4a633","55ac852e9a","231b908b65","f498e88d21","4a09105de8","e274da0eb4","db22fec19b","d5e9c4a633","6bc7238c1e","76ae9b10fa","a683c422c2","dad78a9442","af8e96a075","0c843b4890","0929b0c189","6bc7238c1e","76ae9b10fa","a683c422c2","dad78a9442","af8e96a075","0c843b4890","0929b0c189","1854eb6b2d","1ed2aaa90f","ef3d8192cd","9e7e7573e5","0a07e01fc8","857ebd9bf2","593ca53a8a","35f8cf0520","98b0953934","26b292955e","be74213719","a2d0187cec","eb62a2abe1","ff3fac06ac","e1e3d332d4","8f435b950e","1b560ceccf","d84157ce0a","76c9c384af","b47cda0e96","694c94eca2","a127280b96","ab1e21f86a","0c4d6fc50d","994b2a7c85","f8b9132f70","a5a63bc9fd","6383982508","b058ac7692","5214b68548","9eb4c70fca","5dda18a87d","91b06f20d9","009c42f860","087ec0c34f","19c8c446c7","820c3ca7af","4ce2c0534c","54957fd1ee","bdd7702d7a","3e6ccdb230","6a42581f6c","19c8c446c7","820c3ca7af","4ce2c0534c","54957fd1ee","bdd7702d7a","3e6ccdb230","6a42581f6c","ce090dbc64","90f418baed","f3b68e7817","5531448f64","1688dce103","205ab05fe5","ecc6356bb9","e852707c4d","a9c49e4799","3a48d83381","3867a65b05","bf81552f50","f73f10decf","d5f309b26e","69690be59a","5a197d3594","d05e391832","8970103c24","72e278f64a","fb468c2ea4","ce41174f75","cd0d3a48b7","9f00aa7b91","0337b90db4","11d004e90e","f41c7dd768","4d6e5b0b7d","afd314d7cb","708901a096","3c480b2738","1a14a9e3a5","6fba778b84","9154e58d47","4eab805ba4","093661a31d","708901a096","3c480b2738","1a14a9e3a5","6fba778b84","9154e58d47","4eab805ba4","093661a31d","c4ca4aca73","3f49b5c902","d68ada95ca","d3d86b3571","7aa00dd39d","4401423d7a","a30bb5bfc3","7078171031","98a4899546","8d5867f6de","d77c7666c5","d7d8452507","b8baa99828","7981cfe800","1f1f8569a7","d398998845","db222683a2","43c361d251","ef91ffe1ab","f3dde96646","13648b8050","c4ca4aca73","3f49b5c902","d68ada95ca","d3d86b3571","7aa00dd39d","4401423d7a","a30bb5bfc3","c4ca4aca73","3f49b5c902","d68ada95ca","d3d86b3571","7aa00dd39d","4401423d7a","a30bb5bfc3","2c1c197f70","60b433e804","2403dc0eec","75704b1517","2276a4f3f6","13e3ca25d2","d0d60e7302","74395297fc","110db6c1e7","c71e5485f7","74b55c5155","a74c2c7912","bb56188c96","0fe647c655","33ef9cc135","02b0b57c82","ef5450b875","8171509f46","62ece8f6ba","77f5d9326c","c625ff7811","33ef9cc135","02b0b57c82","ef5450b875","8171509f46","62ece8f6ba","77f5d9326c","c625ff7811","dcc596c8fd","2b42dc7736","f005db03af","363b57c7dd","76c4c2fcb1","1294a83df0","69e65d8460","dcc596c8fd","2b42dc7736","f005db03af","363b57c7dd","76c4c2fcb1","1294a83df0","69e65d8460","77edfd2cf6","c5d2acda06","ff549b4eb1","37cc398e95","9c8c480803","3ab54a8856","f89c4884db","10fef3825e","0395bddd5f","d80d5a2c1d","f21ab3d85f","9563bf79ac","947745796e","01f03eca10","10fef3825e","0395bddd5f","d80d5a2c1d","f21ab3d85f","9563bf79ac","947745796e","01f03eca10","14b745133f","1ae01396c0","80c12fbd06","51fba93a5b","2a057a9709","24567d352b","6001950e43","bfe9d5e303","3f1336a8cc","e97da79090","b685eb4fc7","ecb239ddb7","4c3fbccc47","6bc8d693eb","dfa1667837","bfd5235f4d","6db9cf06f9","663a647dc4","df0f150d05","c2c9a02483","a03bb47821","dfa1667837","bfd5235f4d","6db9cf06f9","663a647dc4","df0f150d05","c2c9a02483","a03bb47821","b853992680","de69c02104","fe23af4b7d","c2d41c0d1b","0b77d49e38","283711a7bd","4db240958b","58ab37b29e","925e6a3a84","15d629f10e","e047322392","77c91d0c03","540cd0e698","3c3b7b126f","00a79259ac","4371a2a8f9","faee92918c","f6c768cd26","de1bb33636","7221a97cf2","82b25d1493","17170ce768","4f9d88940c","09e9afa542","c2d0ba644b","3b50544f96","d34277309d","f32c6c6820","9eb971e76a","4d77f455ee","bed685c64f","822873af72","d7eafc8a17","7f4bbdb75c","74e155943f","b853992680","de69c02104","fe23af4b7d","c2d41c0d1b","0b77d49e38","283711a7bd","4db240958b","e0c2454fe6","4bd0ec928f","c20e95f59c","2e3d1021e8","3e1b2b883b","238e6cffd7","b03d36381a","27c90c8be7","c4fc7c0ba3","a44cbfbba7","c4e8a3a0db","bb7f0e94b8","65302d749c","d0b9d1a18d","0f7132485e","ee52dc9116","f2153f90f1","fb137464ad","67fd877537","f25e3d956c","a50246eb5c","0e464bfdde","e2b19c41fd","7774fef306","2771b6bf69","4c2b3ce4e8","ad1b239c74","507cf32732","7e87674161","d7e23a91eb","3f0ddd3a21","44a9f674ed","deff3634fc","ea5b06965c","43ddc98825","2ab08cc485","aa8968aeaf","164c3e0d43","4ca4c2fe51","7cd4f34e05","970d7c8ffc","35b7fd8f04","b720e18e1d","4a51bf2be4","cb69d0f9b3","db1a00de02","131a5a7bf0","d66105b7ee","e14e7550b2","2dbc9c200b","ba259d160b","b8fd77bd45","ba29500bd0","179c177c61","14cbb21143","33d1409273","0f7132485e","ee52dc9116","f2153f90f1","fb137464ad","67fd877537","f25e3d956c","a50246eb5c","94b6bdcfb3","9d3a251eff","9b2b1e16d9","d400e70d63","f37c05de34","47d7201f12","6b62dcbbea","ab6cb1e18f","815abb3c19","caa1cc36cb","3b98e45028","a52fcb7029","1f8995a3b9","fce11dd33c","b70ccdc0c0","8b72e7be3e","66a43273ff","41112f5e6e","cefcadb0b5","d33158cb61","f7a10ac9d1","4baae48e58","0e669a3ede","3a1d8ab2be","1a54b2a9d4","1f9a3e9eaf","8598fc858d","6edac564cc","84346f3ddc","1b476b2b85","53f251f264","ad93848192","03aa351e1a","d64044398f","de221fe534","eb2008fe1d","fd120bdabf","acce1bdbd2","627b238aff","e53caa1e1f","c3f3aba293","edf47b4ecf","4d68f29e91","60c974c855","0fbcaf4f17","97c79d1fb0","3122eddff3","e69d24b0cb","8a65970c84","3966878df2","e2d06bec6d","6125797691","df3c25752b","874c1dd64c","7407edb1dc","1f77c921dd","37215707c5","09e5d31e3f","7b7d97cc4a","33ebea7f01","364f31ee66","bb296afc4c","1d9416d652","0a6de36534","054c3ccc7c","f3de66f783","00e788b2a7","79f5f964d9","c0379f6d9f","bd5764657a","ccb9c3d8a4","27733d0123","016c682423","5b6a4955c2","79bdf700ea","ea8fe9c5e8","bfc1ce0d88","d24d8a6575","e02ac2ad15","9157a148d7","70e3ba0d36","424898fbfe","1738131368","a1fc6fea0b","d24d8a6575","e02ac2ad15","9157a148d7","70e3ba0d36","424898fbfe","1738131368","a1fc6fea0b","3cf0dfabe9","44bc2f62ca","de05fc9d4c","ad23f5e2ee","b7f389203a","054d7d44c9","b98c0bba7d","6aaabe75c6","ddfd31eb6f","e471af2920","2548d9ea4d","70363f0a0c","39cc1e4349","c17d982f55","6aaabe75c6","ddfd31eb6f","e471af2920","2548d9ea4d","70363f0a0c","39cc1e4349","c17d982f55","905abf11d1","19151b86e8","9648aeefc8","01bdc2b57e","9127ac756a","3280855eb1","5fdc540e0f","ca3ef865dd","e9c1710d64","f058a2c554","945bf70a2a","0581e7ed51","2c2e0c6302","496675553a","1d2ead2a5d","03f5313a41","9481d0e14c","be33a2a2a4","599840419c","98578c712e","23da2f0bb4","d0d8a5c213","4aacae2ad2","aae4faf24b","8212ba8298","081d327425","713db09e48","2d08512fa7","d0d8a5c213","4aacae2ad2","aae4faf24b","8212ba8298","081d327425","713db09e48","2d08512fa7","159ba6f0a1","db8820974d","4eea3371fe","f6c8e51a97","63d3b6cbde","5539c4e91d","c56efb043f","07a15e4acd","14fb7375ca","1e5bafc07e","27858d2057","0b982c865e","069fb4eaf1","63f56010d2","729150602b","68d38f8994","c414136c8b","6eae3af6ed","c4995689b1","ac9a15c732","700c425715","9fb8b305c0","c41f20812b","f6c8674e77","0aab526c21","330911b37c","d55e5bcd29","5256e73d59","e0ef0dd8ce","c648be27dc","962808649c","fb5d09df58","5c06555480","77d9e8b879","a2555bd0e9","458aae4b8a","d1ad4dae10","70eaad25e4","17bfa93c57","a81b165931","6acf52f8d3","bec800b47b","a157773133","2ade63a957","67f18ef2a4","d5b772f06b","82529d28af","1aa34719a9","777ac4957a","eb409a74bf","2c78a9ea53","2f9b7755d4","11f4d2fdd5","4cb27e48f6","2ce9fbc7ac","8472b7eeab","79b9ae1272","c6378e29dd","c2b9f724f3","142e520d0f","9330cf401b","1591b9424b","bb6627e4c9","be6f805636","63187821e5","a667852fa9","5479dfd19d","5ca842dc55","f26295a32d","f9ae276f25","729150602b","68d38f8994","c414136c8b","6eae3af6ed","c4995689b1","ac9a15c732","700c425715","729150602b","68d38f8994","c414136c8b","6eae3af6ed","c4995689b1","ac9a15c732","700c425715","46543e2076","b58ed20b88","9742cb3119","9174ca9cb1","4cccf9c426","976624c4a7","b8381a657f","b5b55837cd","270bf465e0","aeb5ce0375","8c2b8bd8d3","ec851cdd09","6759c00364","1fa710526d","7505ac6aa8","773076f813","44003bb43b","d18ea8d5fc","1729056e76","a1e5769d0f","edabe0e802","3c0004e563","68db2dbc94","c8010a9e8c","71717bd994","5c751a390f","92ba748def","83c85bb1c9","a3def3047c","dd250818c9","9421246672","bd21ed0fe7","6e4a87b7f1","829d5529c9","1c1598f697","4cd921d338","fc0123264a","b17df6a9f8","5f9e3a972d","196eb91537","dc0b85b7da","a8759706a7","a93ce4de57","53c9ccc139","32ee57a109","9eb5a15f0e","79bd6d418a","674b9bf333","a83e47dbfa","a85ba8bb6c","c7c8c7bacb","daaf249faa","2daf3bff51","9d8415c825","dd2635745e","9ad09daed0","7505ac6aa8","773076f813","44003bb43b","d18ea8d5fc","1729056e76","a1e5769d0f","edabe0e802","b7d9929b4f","a44308ff20","2dc8e114db","2e2e777180","7cf985a2e4","49d617a091","7a8a80168e","8e2aedd515","c28993d98d","75abbd0eaf","1a0ce7c331","de74c4dd89","07df3dd2f7","27b27a6363","99db90211d","0776913b49","f50c17fd10","33a5e62f58","a8ab4be7c9","588665266c","774600c6f2","99db90211d","0776913b49","f50c17fd10","33a5e62f58","a8ab4be7c9","588665266c","774600c6f2","a8830784e3","61e708721d","0251e83d04","98eb6227f2","307de9aecc","67c170a8eb","f1bcb1502e","a8830784e3","61e708721d","0251e83d04","98eb6227f2","307de9aecc","67c170a8eb","f1bcb1502e","5223a2953c","6a563810f7","043ff2652c","9fe7a0126e","7780795dad","a93ee70da8","2cb9acfe1c","5223a2953c","6a563810f7","043ff2652c","9fe7a0126e","7780795dad","a93ee70da8","2cb9acfe1c","e13db55c11","dd3a41f676","b264d0d523","6465fb86da","38faffaa73","28ce7ad787","c1e1c7d562","9b7f564efd","d8e545ae0e","36fec81ff2","a79f7b193e","ba5845183a","1a1712f8c9","56f7ad75a5","9b7f564efd","d8e545ae0e","36fec81ff2","a79f7b193e","ba5845183a","1a1712f8c9","56f7ad75a5","e3f1ff7aec","889c8f399c","908c9d192b","f850592560","65fb609690","34ab837a38","e90bd6766b","2053d0dad4","0ffbf8933e","8bed94df91","6b58119d17","a086ba42c9","c48a1bf3bb","b4cb0922b8","dd38c2f24b","5252a4a03e","b9c278b482","29afd71fcb","e5b7c0dc68","f6d69d8918","a085cf3da3","477b5aca4d","6882763fb1","780111ba95","c3c2ceb067","fd99c815d4","8baf318d5a","47825e6134","e97b724ca4","1b61ae837a","2d20503e02","6737d04ae5","a53b2d3fb1","07f6747ebc","504e301bfc","6bec57bc3a","1aa9f28da2","e2d8febd6f","7318cbbceb","a8ca28b20c","423fa5f6bd","333c931c36","90037e141b","b62e4cbf42","7442828b9c","0d178f9c3c","2d57dddaa8","908e8afd19","ae0472801f","e3f1ff7aec","889c8f399c","908c9d192b","f850592560","65fb609690","34ab837a38","e90bd6766b","35c57ad758","47c7375bba","f7326987cc","ffbef1c85d","c44b7400ea","e330c5844b","0519ddcd56","5f0e82b1e5","af1c05ff5a","51a513e2e3","4ba99f8e14","264e582bc0","d9bfeb6e5b","dab9fbca26","6ca8807166","88caf30200","dc8ca2c199","5082e133dd","07e55faade","b08bf7812e","e627c33300","1eb06be803","0028cae8e6","8563434976","77f338f754","2547d0cf64","42d7b9679a","4d22f25a6e","2c368c3597","b25964fd65","6b58e7a8ea","bb9bd6194e","a4de42ed56","37e1c22b1e","70bd2f84a9","734725ce84","9163d46b37","a7e588f0a2","a0820fe2e0","3edc39ef98","8a6053db54","859a4eaf77","e78c383ebc","b65dc71833","54036ac8f8","3c6096edc8","3ce55ff6f1","32e5636cf1","6ed3922cfa","d721a4892a","9c509b77d0","828bdc4dec","ab1fc8f3a2","de7e93fc18","b8977ea8bd","dcac718d86","8df046e99e","08440a030b","a01c1bcc63","6d274821ea","0daffb3989","e3312ad4e8","0020f95dd8","1e43e5aa8d","cec0d4f1dd","6c87d84cab","0078a9c6d8","0d413c38d1","d358f19681","9c47d47f74","1eb06be803","0028cae8e6","8563434976","77f338f754","2547d0cf64","42d7b9679a","4d22f25a6e","404e83f38d","ba1685f3b5","5b05db04a9","7f0454c0de","abd0e10893","8397df4059","f95b1ea379","9761802ec6","3994c212d1","0993f2fbce","9354b12950","1926eb3f98","ccab2f0307","9d122c06c4","c7872e8b24","99d7e58e33","b6f61e3514","37935dd06c","6aaab02b94","a8e1882463","bbac8b525a","c7872e8b24","99d7e58e33","b6f61e3514","37935dd06c","6aaab02b94","a8e1882463","bbac8b525a","6014adfbe0","43066ed0dc","26bdfa8299","dc26a5dfd2","d279287258","f294ccc0de","e8b1614f48","0455d776f8","171e67cc87","16fa0f696f","2fdee2c98d","418a1a2df1","f7e6f549f8","0fd1052f71","40ef7c3a22","9ae2ca1a03","60c087d562","ab360a37e7","417e844f9c","9b8156f851","686c6d1225","7d7bded39f","13afcd6f7e","f22386115b","a39df751f9","38ebcfa1a3","c72a711205","5ee65a4437","f9e648f693","432f239e6d","d88f205349","8db5a1eb5a","1d6d3ef678","98de3936e8","722e520d6e","c93d7de0cb","5e6c7ff571","41486d7851","9e787f16cc","a667a111e1","d5bfe136fc","7cc32b48d5","06993d1f57","360dfba596","0f0c2d1d01","83d48f71bb","bd5f12e69c","5b4f049780","72847c44d5","45eba9f8bb","0855006fad","bf19f5d1e6","0b7aa91e3f","d40a77cfb6","58d6baa0c8","29f2c89232","dd35dc5dfd","768e69a25b","29d8364440","0247534cce","50e6443cfb","72216a6a49","ae76c1edcb","5033b1426e","09e577700d","fcd1829213","311a722fb7","e4ebc3f866","4ef175c177","77b3287f1a","2e4c24fed1","7b65daf349","a67d2ea446","a1f8ba8a6a","8705a95d65","a515ca8f94","1c535a45f4","09f2c484af","ce2b38f7f3","4b94566d69","e3655e502d","bb70ed2e5f","ca6308188f","e3f051aded","b4068384d4","5deb2fddde","d5d53f5b1d","132a932baa","b53a9a3e12","06d5d12d27","787f89c1cb","59d8ea25d4","0b7dda6a77","ab309689cf","4de84b06d5","2020465fd8","e7adca0e93","7bfe75e87f","16d78c6263","ebd5373ae4","e126c75e2d","ca6c5f33a8","c634a8cadf","8b1f225e6c","76fc426643","06993d1f57","360dfba596","0f0c2d1d01","83d48f71bb","bd5f12e69c","5b4f049780","72847c44d5","06993d1f57","360dfba596","0f0c2d1d01","83d48f71bb","bd5f12e69c","5b4f049780","72847c44d5","5e10922c56","de103b7f15","ffe4d90a79","e34cfc558a","11f871fa32","1466d2d7b3","bf0034e250","2768a958b8","93e5f8885c","90bb70b219","e3f2a54cbc","dd172ca23b","13d825f444","245fff96d7","880bc167fe","dd7cdff064","aa031aab7b","d7c4efd6fb","aaa2b05419","11483b4019","78f22ee35e","34c699654f","85e47cf5bf","06d28f84a1","b422ca0778","caef190664","3222b2e6e7","d34818a0a7","c03e4fdbd7","f0a98e9a3b","2bdb1d3b0a","15f97fec9b","c3ba9fbf3b","79129a9f54","cef83e5da6","c03e4fdbd7","f0a98e9a3b","2bdb1d3b0a","15f97fec9b","c3ba9fbf3b","79129a9f54","cef83e5da6","3bffb03e07","ceb5e52589","5cda2ec827","c4bc9cb062","8caa711308","b4961cad32","1b46acb8a8","dbc5df438d","24daa8312f","4414bfa953","8f734a2fd4","0d1dc423bc","52a6e39835","6ab554ee61","84bc9858f2","80f39e027b","4a5230abf4","36f5524442","59e877c161","0daf9c228c","86b731856e","b3c6f3688c","3bb14b2ab7","6009ec847d","9f1fbbcf6a","1b8906522d","387c5677ba","2d17f82c05","100ef64dc3","25ca4da446","915f0750f8","0912ed100b","3de3a7fe87","ef68023014","c9742e4756","100ef64dc3","25ca4da446","915f0750f8","0912ed100b","3de3a7fe87","ef68023014","c9742e4756","1efcdab120","1bb2c1ad54","5ba673c75c","49c115c8ac","a6aec5dbeb","293e0d2dc3","3414889269","3e0cf2244b","30c6bece79","2427135920","11ad5244ab","64666564a9","26c681baf7","88cc8db6e9","17354a2f9c","0a9f6f0a07","93a3484fdc","d519c8b1d9","c82349cb9d","ecde32d5cb","863e0e03f2","17354a2f9c","0a9f6f0a07","93a3484fdc","d519c8b1d9","c82349cb9d","ecde32d5cb","863e0e03f2","33cd703081","2217964f31","eb4489711c","7fbfa6b3c9","468f70a2e2","49528355ba","56a85453a4","33cd703081","2217964f31","eb4489711c","7fbfa6b3c9","468f70a2e2","49528355ba","56a85453a4","a8ab528b9c","6136403b04","6207741f93","0e9f72cc2a","ae99a20660","428eced71c","5431ab932a","a8ab528b9c","6136403b04","6207741f93","0e9f72cc2a","ae99a20660","428eced71c","5431ab932a","cffff9aec8","95910b8dc3","ecc2fda0f2","e976027bb7","cd400dea4c","d41841fc95","3f227e5786","c844671d1c","e408c201c4","4e8d261385","e3cc49b24d","71cace9663","df0a4fb2e9","b70adc523f","dde466da2b","59c940328e","dc5f67d19a","9ed09f7b3a","27c7ce5ec2","51238e7839","b79a56cbb7","20fc0e0481","4eda4c9423","ed853baf2e","9069227fad","c3cb178a37","186910f2c8","85b2156509","60e0e78ff5","a73b205f74","60bc6b9b9a","f2a8cd0294","e92e3b41d4","91c4f0143d","0bef2d85d5","d716c1417e","4003dd3922","28a17cad2a","d6cf594cdc","4e0b5639a8","fe3afd8169","48af5b5db6","cffff9aec8","95910b8dc3","ecc2fda0f2","e976027bb7","cd400dea4c","d41841fc95","3f227e5786","cffff9aec8","95910b8dc3","ecc2fda0f2","e976027bb7","cd400dea4c","d41841fc95","3f227e5786","15e9f1a627","f327e3629a","c3ce34b7b6","ce6bbf5f48","f61e833239","ee308925d8","e4ea73cfff","3c26d0ac33","35edf14446","ab3ba08322","0cb33f4509","a2d62f84b0","3386dd738f","67be8b3a01","3c26d0ac33","35edf14446","ab3ba08322","0cb33f4509","a2d62f84b0","3386dd738f","67be8b3a01","624bfae8bb","9c6479d406","c752980a1e","c9aa3498be","a054af5d87","2f81767305","d71d2bfcd5","6063e8cb47","d8ae33c743","805c7765e1","679fbe4504","8ac332aa0d","f8fabd0028","9f16e025bb","060a9bc3a0","cc7a2ad4de","5120a82444","8b2997f928","ea20f3a326","676d02d126","b69f692bdb","2b283e534e","e2339e04dc","789c5fab10","11f9cce318","7b69a8d103","e64e0aef34","3b41eb0f7b","2b283e534e","e2339e04dc","789c5fab10","11f9cce318","7b69a8d103","e64e0aef34","3b41eb0f7b","5684850b1a","4f50a3d28a","27d1d6b0df","25c9b396a7","5df8d8a094","b64385f010","67132aa503","11c339456e","21dff9dc4c","2e8d5b6007","7b0de13ebb","77c95c15ff","f7956374ea","97339dcce7","11c339456e","21dff9dc4c","2e8d5b6007","7b0de13ebb","77c95c15ff","f7956374ea","97339dcce7","d32942345e","5523c55e85","8cbcc7ae6b","3ba563b8b3","edb82a68e7","723bed4e9d","f8a0ac0c19","b28570918b","9e2cb96a54","3bd2100839","9945b9577b","a18da86df2","c5eca0ac58","5381749ebc","8fa5049e41","28bb7da73b","c6a318968d","107da9ae45","b03d029b3d","c3018fa0de","c48d23f2a4","43d064c6ff","97d1d9c84c","f915c9b065","bf621d5d59","f9571669dc","218bb99842","54cf39b323","b19d620c5e","64bcb82dc5","5302d09bcd","61b6766e49","c69421b97d","27772dc9f2","103a73052a","e976831169","fafbba79d0","e36c363135","47b75422da","57e7f74135","0202d05b4a","13f52fbcaf","d03228a1f0","38111aac29","8278da3095","93d619506c","9feff232f6","c08bbd2ed9","232fe523f5","87e9b854c9","dd919b6a87","3f18bc13db","438dff28ca","8cbca74c26","90f9fed1bf","43d6784dba","87e9b854c9","dd919b6a87","3f18bc13db","438dff28ca","8cbca74c26","90f9fed1bf","43d6784dba","e605fc903f","7f090b7d8a","c0b3426529","8c1fdad095","86150f9d0a","1e25508bf5","c643a5d180","e19ee8aa57","b2927e0751","e446a7a47f","eb4873aa8e","ba789e0e3e","fd2e34ad72","39c914c363","e4008a7c4b","b74ead50f8","61541370f5","e813dcfe42","ce72aa2d8e","45f5020bde","f1e0ec1d96","cb6a0f4b79","766585f876","0aa81071ba","6bb8677922","3e8b3146df","0b8be9d65b","ae08c39e14","bd650a52df","f6d7ed7cb0","60f4a5f867","5972e8d0ba","bb74d40592","2a64afa210","c8be418ae4","752502890f","3630df4917","c449501694","372738b523","6ad79c3e89","80de8a1359","62d47810e1","9f42eee48f","46f239ce9c","75a25f88b3","f020d5ad90","935a69e4be","e5ecfc1e30","d857a818f1","cb823154a7","f7198dd1ea","96731c2786","3668a6a10e","2e06426bf1","ba284d0e84","68b62e1c6f","cb823154a7","f7198dd1ea","96731c2786","3668a6a10e","2e06426bf1","ba284d0e84","68b62e1c6f","c947fd165d","10db0fd505","c061f56609","7a4fec3f94","164903cadb","0f56515c86","28f0b182f3","c947fd165d","10db0fd505","c061f56609","7a4fec3f94","164903cadb","0f56515c86","28f0b182f3","63005a286c","45b8b757f8","597fc17e11","6edc0d56b2","32545c5466","10c6ff14e1","37e1651883","a59559ced9","9bfb574c7b","43639831a4","3d4eb7bbb1","6531fa28e2","de8615b66e","404ebbaafa","e88e0aa07b","bc322e5c8c","148ffa89f7","40033b0348","88c75bc177","1204659d5a","4452e2b90f","f4da8bdc92","c710dc673a","095fa35d14","609bb4deb9","7ac201733d","de825fd241","59d6838f64","7af40eac29","9362421a09","9e280662df","0e851f98d6","b6e0769018","bdffc5894d","0047606b93","7af40eac29","9362421a09","9e280662df","0e851f98d6","b6e0769018","bdffc5894d","0047606b93","ab4de1ccaf","35a145c3e7","c2b0239021","a31d78ba82","c2663d38a1","f7cd2f0d48","9a3fecf8d9","ab4de1ccaf","35a145c3e7","c2b0239021","a31d78ba82","c2663d38a1","f7cd2f0d48","9a3fecf8d9","5347776eaa","e5c04db39b","691669d5fb","de69044170","8787713390","9c563a64a5","ed0864b200","94ddd3b5ab","c76b424c5d","5d3a8b97ac","e35dee2b24","2ac8041f50","86a8ef9113","a08d425246","870868d47d","35fe15a852","9e69616732","5e1f26ac4d","8d924b3d1b","9d74497e1b","d7464fa7ed","63375f38bf","3bc1c014ff","915748e348","8261e23203","be5032502d","43023b46f6","8f2a2173ba","b35f196cca","6db0abfb34","95bdad5ac5","8fb2ebb928","064f2efb12","74536eed8c","f127ffdf6e","e9cb25379e","94c0ae51d7","0e3b6aa67c","a2b0fb40b8","f7313db0a8","29c98783a1","c2d39a617e","ee74fe9084","bf46e264d2","6a1486bdf7","505629382c","816ec0a5ed","f89d7208ca","c8a3e06825","fd256c08d3","9414486a63","c1f1602c43","198c39cc07","ca1544cea2","de913ba9d4","37f2c29e71","870868d47d","35fe15a852","9e69616732","5e1f26ac4d","8d924b3d1b","9d74497e1b","d7464fa7ed","fd256c08d3","9414486a63","c1f1602c43","198c39cc07","ca1544cea2","de913ba9d4","37f2c29e71","fd256c08d3","9414486a63","c1f1602c43","198c39cc07","ca1544cea2","de913ba9d4","37f2c29e71","42ae8527ec","01fa635635","dee01e82de","8c7a6dc36b","83d8dfbcad","668a171564","88b4c9d6ce","81a64664dc","1d8bf8618f","be4e3e11bb","c818e34612","a6df4ead26","e6a3d01ada","9686e62e5d","d25ae812f8","39c5872658","472e50bcc1","e9a997526c","a170172359","71fd8025d1","ad96638fd7","f14b784c95","8df22d9675","38d8ba4c11","72b64cedee","ed278e2079","45d7c3e4cd","1dfd4c4de8","d25ae812f8","39c5872658","472e50bcc1","e9a997526c","a170172359","71fd8025d1","ad96638fd7","81a64664dc","1d8bf8618f","be4e3e11bb","c818e34612","a6df4ead26","e6a3d01ada","9686e62e5d","1fe6a39814","126c0e28a0","e4c42c2bd6","4825d3d17e","28896787d9","f4551cdfb4","b1a0c040a7","be483ae958","f43ded6a25","34668565e8","04f3637b51","d0b627d80b","a8ec83dbeb","a7f41165ba","81a64664dc","1d8bf8618f","be4e3e11bb","c818e34612","a6df4ead26","e6a3d01ada","9686e62e5d","81a64664dc","1d8bf8618f","be4e3e11bb","c818e34612","a6df4ead26","e6a3d01ada","9686e62e5d","f9214475e4","c84721406f","d1e35d3bee","b7671a9dbd","376ac89a54","b2f4a802d9","37f38dd951","40a9e19404","862e4d8018","4e9c8a1b90","c1511dbfd1","c7d8dacd31","d54697f344","68a085a61a","e29204455f","bcd48de172","33d6a1952d","c83ea9f5c0","4f1803c171","5bbc703fc7","052b18efc0","70b70bcba5","5f0ace7154","dd39992edd","1df3b72d4c","76c59a722a","0b39e01a0e","7c7888a27f","b99e567ab4","4bc2486845","1260005c32","b6c9648edb","7c402a1739","0e0f22f10c","a0801b3d92","70b70bcba5","5f0ace7154","dd39992edd","1df3b72d4c","76c59a722a","0b39e01a0e","7c7888a27f","70b70bcba5","5f0ace7154","dd39992edd","1df3b72d4c","76c59a722a","0b39e01a0e","7c7888a27f","0c9082cb6e","e2d4095648","72d256bd3d","065978abc1","69a8dd696d","464f97794a","e7ac607aa1","60656d206c","cfc5191c93","f6e4907957","0170fcff37","fe0e18cd00","0d6270c293","ae88346db2","8fd10d51da","d885d350b7","c3390db4fb","ba7e7c57fc","8572547c59","5ee66046d6","4c42a4dfac","7fc4654497","7cebcd8d7c","25fb52e11f","96e5db50ef","dc905a91e9","ba852c88b6","e5481f3a6c","8fd10d51da","d885d350b7","c3390db4fb","ba7e7c57fc","8572547c59","5ee66046d6","4c42a4dfac","7236f9689a","345134dd93","c522c51395","a1243e27bc","d1aa9e6984","14684334f9","7b9dca9f07","54303c1942","fb49c31ffb","bc5a5fc4d9","2f014cd8cf","9bc58ed685","16683b3b3a","08eb310d4e","54303c1942","fb49c31ffb","bc5a5fc4d9","2f014cd8cf","9bc58ed685","16683b3b3a","08eb310d4e","c9eab18606","00d75cddbb","f3fa493bbb","7b1f165a4e","5f8babcf63","321e2c5315","f1a9b4f62f","3b1dd45f79","96c18e1703","68978c9ad0","4f737b0527","7a4292c76e","f9da5324cb","169c209491","c9eab18606","00d75cddbb","f3fa493bbb","7b1f165a4e","5f8babcf63","321e2c5315","f1a9b4f62f","05f9f99cb5","6c75026184","bcc3e9577b","88fec1afc3","817303a763","6e3d19246f","2427ed46a3","b4f4328d44","d05e117a08","b79e711ef7","93abacaa8a","2c6a4bbb2a","75b53b712c","8829c6d040","dd89e0e510","2242e0f54d","11a468b057","0189327795","e1ace6f5c7","71d71ea51c","7d5fcfa40c","f5bf33bf93","2059dbf124","9a396f6ca7","d8c143438e","c21a3173c8","026ddd105d","af7a7aab80","091b156301","8a39948e3c","4f81131550","73cebd6a87","a299e010b3","fa9e472a1d","6ecb5a859b","091b156301","8a39948e3c","4f81131550","73cebd6a87","a299e010b3","fa9e472a1d","6ecb5a859b","37c19c22f1","fe9f7d7e6f","4be606db21","6916d6f1c0","5262eca966","8ad7fff75c","b426c2d8e1","37c19c22f1","fe9f7d7e6f","4be606db21","6916d6f1c0","5262eca966","8ad7fff75c","b426c2d8e1","586b9bc664","32369c6d47","b774e0bfd6","0704d4c40c","e7d9ec2026","0509e5cbb9","0696fbd165","015107a243","9926627456","6125c955d7","68f9357a98","dd54cfcc2f","2e31a68aa8","197b008434","4c86522cd9","52ef84851e","ddb1edac8b","8831412384","c7f2806a90","9e99af469c","f87831232e","9da35e8219","e495481d7c","2aeb1ff1e0","e930fe154b","3a39df3ca8","df2f53230b","a3dd0a5944","9da35e8219","e495481d7c","2aeb1ff1e0","e930fe154b","3a39df3ca8","df2f53230b","a3dd0a5944","21d68e50b1","a8c74b8294","d51f4599f9","f6625be501","99d0a928c2","69dd73757c","8cef7b9ab8","05d97ff7d4","2db88c964e","1df2ca2276","6af6edbdd6","a1deb4ae3b","94477fdb85","bc96c96af9","05d97ff7d4","2db88c964e","1df2ca2276","6af6edbdd6","a1deb4ae3b","94477fdb85","bc96c96af9","db8ee10dc1","d7733faaba","b186e0530b","373b671c3f","f17bb9892f","784fc72b9f","748bffef75","e7290d5bff","781db97a43","46b90b81d2","dd1d1475ae","52ac8580e0","e65d49005b","f485eb9df5","a7edf85a7b","7fb3d9c9f1","70a185ea24","f5f03ffbaa","266d42e2f8","e00ae2c15a","d7c3421bde","46ea94736f","0d9f861523","beb57aa31a","233124f32c","1ed1fed8bd","68e3cd9d0a","210d07f318","cf840fc2ae","f02581c08b","4306da590c","714e4cac02","eb8938b46a","9afbbe9967","3440b5854b","61babc03b0","6f6a0e5d1d","2b04db8339","c656ab2a45","a10ddd4784","a40b0a89dd","4c263e3933","754ac4cd37","3cb17240c5","52b1f5ec41","6d1b2b3322","d3785622b1","409ea7a34e","d7307fc9e9","db8ee10dc1","d7733faaba","b186e0530b","373b671c3f","f17bb9892f","784fc72b9f","748bffef75","db8ee10dc1","d7733faaba","b186e0530b","373b671c3f","f17bb9892f","784fc72b9f","748bffef75","c87c2c6229","8f92a5ad65","da8167e20f","6359df90f3","63dc61eb1b","1b1fa208b6","c20ac9ea26","5f2eab8b07","4714be298d","9eabb47a23","3b800d9b6a","8445011b01","c59faf5391","e5fc9fc27c","3ad6da62db","2061c822ce","bf0d037069","95580ef0b5","d60b8bcc31","54ff635770","adcc4c595f","b07936dac0","b28ade9640","9a02838c71","b9dade8920","bcd37ce253","c654775500","775dcc1061","2c2e931520","bf40863082","381bdae4de","3e16369724","b79acfe7f8","dfd99412a4","7acdb1434d","e10bdc468d","7f4c840ba4","4ec176fdfa","76d314d47f","14e197be85","4864be7dea","6762c95a18","8df2e96073","ba08ae8830","1684b38884","9593924cb5","6e6a58fd39","ae75c00e14","d533943ee7","3ad6da62db","2061c822ce","bf0d037069","95580ef0b5","d60b8bcc31","54ff635770","adcc4c595f","e0afcaff54","801e1bd0ab","75f8662420","e7297b9763","5641eeb364","e3bf1178d0","d0f286f1e6","e0afcaff54","801e1bd0ab","75f8662420","e7297b9763","5641eeb364","e3bf1178d0","d0f286f1e6","8ffaf44e93","8b0c171462","17bd071d3c","251408182c","decb6fba88","5f1542f140","50f230ba37","ab1b0705b6","25555e52a4","b6c659b9b8","50104cb71d","78de923c3c","5ae692c1c6","dfaa47edd7","ab1b0705b6","25555e52a4","b6c659b9b8","50104cb71d","78de923c3c","5ae692c1c6","dfaa47edd7","a701cd7004","1fea11797e","31ca5cd870","da71388504","b11cfb02ab","280a6bc67e","dcf973ade6","56b372512b","9a15b0f107","e2bf44db47","434c084319","d5b7fd1a8d","95d84b3a76","78a0dc60e6","46e4353939","a8b975847d","bedad75326","0782f979db","ce073ceb17","b4a9280af8","8a67483de7","c180a8e70d","6d532d28d3","cbbd3093d5","baf1df784b","763d3f3461","2774c242e0","eff6d7d03e","de0f1eacaa","0dc8aaff86","a0019d4098","18b9f94c41","d621043379","0b713b7d84","b66ed0d522","fa9bb9de60","99e9010d2a","66cfb50e3d","08e4ca1931","c83cc0b693","3f453d8a99","a5dca5d0a0","aa17cc6184","a48adce50f","3a5e0bf35e","cd077e08e4","69aca053f7","9914a64ff1","507e7d9e9a","aa17cc6184","a48adce50f","3a5e0bf35e","cd077e08e4","69aca053f7","9914a64ff1","507e7d9e9a","a8e8a469bd","b88e1ce55a","759766d450","295c8ed4cd","489060d044","107288a040","f83e218927","223af8cfb5","9b82223260","1b14a01443","742edb586a","bdda7be5e3","dac019294d","0b2b600e2d","8d045f9109","3813dee700","df7317d68d","0efc10a235","150d60e457","4a67023b92","2152ba7adc","8d045f9109","3813dee700","df7317d68d","0efc10a235","150d60e457","4a67023b92","2152ba7adc","e2b29cc61e","028797faad","02c554bc41","71bda7b377","d9bb65ff96","bb30ee7600","0e581ff13b","d60e23de9f","856427bdd4","9743498900","504a8edfce","08442f069e","e8f576f817","83bede6183","ad9e1e654e","eaa5549862","ecb05cb743","62ccca290a","3de351b80c","39da1e4a4d","ed2d4d499e","0eb4577bd3","6737b9eb02","7402f4c3cb","31b03f56e5","984c877fce","d79ab74847","cb2d17fe76","71e04b7217","20bc5068b8","7cadbd78c0","6d7aa17d3f","102e3ed559","552e9bc15c","78433cf4bd","d60e23de9f","856427bdd4","9743498900","504a8edfce","08442f069e","e8f576f817","83bede6183","d60e23de9f","856427bdd4","9743498900","504a8edfce","08442f069e","e8f576f817","83bede6183","07ec170523","6c99c59d96","f126491239","85a98a90c8","cba1f5838e","f55eb674fb","5f5b70c60f","3fe881c385","e3a81ea1ea","07b2a80d40","df7fac7607","91dff651ec","91e5a9cbbf","dd5cca0998","8d11ea35ed","9a0e7f6baf","8236975903","f2db1a80e1","23f6b48898","9aa64b55cb","eef31d908f","eefbf9c029","fa33000ce6","06c31f4090","6f4c293a9b","173e50cab4","ed7ccd2bbd","39d8dfbcef","4fbf5110f1","74a55f78e1","fd8dbfa39c","2ca0842397","367bb4559e","ca5d95343d","4f036d8f5b","4fbf5110f1","74a55f78e1","fd8dbfa39c","2ca0842397","367bb4559e","ca5d95343d","4f036d8f5b","30abfbac46","e7cb9442fd","b9cdeaf82a","e99bbd5961","cd8e41eee8","764c20996c","94e08fc8c5","be325e1400","a29dfa1099","8c2d4439a0","e0480bb5d8","aa19ebf13c","ab515f8b3e","5f1dd5e55b","82ebf29548","d2ed5f615c","eed1d3a53a","ae43e61d44","79b8e97ad2","f407d40378","1fd1ec7f12","8341370035","99f565f5dd","6715a69964","9aae72c5a5","d16a9a1a17","c6260e5735","5298dcd8db","fd7b93ef99","6895e17893","fc8e1cf6e3","d09bc15b4b","b0ef852821","2eacd2a8fa","346b05b311","02bf0c9bd8","deca0cd13e","92e9d586c6","e2493bac97","055eb5c742","76781b1136","be5db7a022","30abfbac46","e7cb9442fd","b9cdeaf82a","e99bbd5961","cd8e41eee8","764c20996c","94e08fc8c5","c9a37f5411","6395d134ff","baa0e32c38","0004c40e65","b65d664a5b","af802f47ea","729c9577b1","5aaee7d553","1605c4efac","f07972a784","97810660d0","ad48c68151","8213d99b57","5db2df6692","aa16565027","cf13d0b1c1","2f1d6b2325","526553a3fc","9c7fd00ae5","549b431170","d52155ca36","34ea9e2878","8e1971a813","e72aed36d0","0b2fc36e07","c5a4d99967","db85715506","946e4797cf","e39796d42c","0ab0d2e241","b201cfa7ce","93133320d3","1bed3cd920","26465723e9","53e6398c8a","1a18ea84b4","822ff353c3","a11237e59e","2d8c0e6e68","3e7d96ecea","e1af40cc20","7097eaa68f","9baf6af6c2","1926b71237","9b0104996e","3a06730cfb","2d05b5ab73","07902db38e","38ec56b9eb","ecee14e1fb","ea3913b9a8","37c2619651","f8003ee368","bb738bfc69","ce4eb73345","73fb6a9655","73217b0297","5e8e3c10ff","9c330dc377","365d565c7b","bc94b2033a","d68d7e2d1c","7a5f9edbff","f3d7b1832f","24760fcc4d","5c6dfbda0d","8fccad4a28","2428dd95bf","d5f47a5707","57fafa6fd5","aa16565027","cf13d0b1c1","2f1d6b2325","526553a3fc","9c7fd00ae5","549b431170","d52155ca36","e5d7d72e02","48bc57e5f4","a4f4353770","c088e5d1a1","220a1abaf2","e436912b44","05a060bd02","621229c437","7d26784ffd","91440596ae","769301031e","438acc546f","64ca77242c","ea0ddbd8d7","9f88207b76","94d24b393d","36eb1cb222","f3b0e9e2b2","b165082cda","e9f28c4a12","216c9e0587","621229c437","7d26784ffd","91440596ae","769301031e","438acc546f","64ca77242c","ea0ddbd8d7","65d469f39d","ecaa94b90c","e2f85c04a7","9c48843121","9bb10e0eb2","640def95f5","e0967fbfcd","44ad9b9832","fda0217ed5","40cfba4b13","514e6d1c08","f6184f2c02","5ca72e4990","d9b8d61ad4","947984c0c5","19388ae3ba","4b0cd9595b","0180b4e617","fe254ac972","762bb656b4","1b8a9ee10e","b3f8fc9cf8","7a58bf083e","d0ab8a7494","b7864f49ef","76fbaf5b3f","6a474db740","dd11f387af","b3f8fc9cf8","7a58bf083e","d0ab8a7494","b7864f49ef","76fbaf5b3f","6a474db740","dd11f387af","e961d4712c","9edd752dfe","ae6efee38a","512e2ad0b3","ecfd4ff00b","6e66a9ceed","0b52108b7c","b363e95984","43fea98da3","2dc551b5de","e188dc2f6f","dd070d57db","30e866363d","a686e480cf","73dafe8a5c","5f55afd46a","845add1c3c","692d37981e","faa58c36ab","4d2c47cd7f","9813e1d09f","73d7308685","64a6b2a544","721a1e1b01","851eb336b9","de05fc2628","f3fec332b6","bd56bf184b","00d3f50860","b314c11cbf","5bcb44f996","47a2211d20","a7152f8d67","4f48464368","21f46fc750","00d3f50860","b314c11cbf","5bcb44f996","47a2211d20","a7152f8d67","4f48464368","21f46fc750","85a3f1836e","1fb44e764a","4fb2bbc60d","7a6d0635e6","f1b2fc4be7","0d8182586a","9972014303","1072823ba2","f4a2309fdf","cc80e82d47","da5aca11d9","a9e6952137","5c4f472c53","c70dd21ac2","1072823ba2","f4a2309fdf","cc80e82d47","da5aca11d9","a9e6952137","5c4f472c53","c70dd21ac2","1c1a61b0e4","4e97aebb6a","19be3ab0f8","32b66f8f74","defd6dabe9","656eed3e92","781bb3a90d","44dbabee48","02a4eb7c49","085fb9bf3d","72c29f7db5","ed7a652e38","fa05772ecb","175908614c","36dc5ae1a3","6bf4520f39","6576f83953","01c39c09eb","23deed8259","c877428938","1463581e9c","9530c55f67","414a127105","d0a20d8a5b","5260e6c4af","72779e258e","0a077b2b96","fb983229ea","9530c55f67","414a127105","d0a20d8a5b","5260e6c4af","72779e258e","0a077b2b96","fb983229ea","426bd17f3b","49435b1e36","ff0449ce5a","283896bb72","ed85cc4acc","9c020c8a35","1bd6bb15b9","2118245f90","41ec059077","d54337bc6a","851782bd33","4c68719b53","0392378792","1c1d1fe0d7","56e3c92d57","f8130877d1","7990ebb893","7bccc05f11","7a460dd943","dd96e80f11","034555b60b","ddeb1108d4","af9b9d772f","88f5b08048","089ecd2355","46917f1a01","bcfa705ecc","8d7fc4cc94","3411b1892f","4f70d8e598","82ec9b7cd3","99113a256f","c59d40fb12","d0a06c059b","e332816e5d","3411b1892f","4f70d8e598","82ec9b7cd3","99113a256f","c59d40fb12","d0a06c059b","e332816e5d","0ab436b8f7","0701b43b84","ae98409439","99f82f5111","6b5347bad5","5d77d5166c","00c66b9f71","28579b29a4","e9098cc58d","3f1551bad5","8c29038b08","a9edaaadba","ac4b341d54","a34af0dde7","28579b29a4","e9098cc58d","3f1551bad5","8c29038b08","a9edaaadba","ac4b341d54","a34af0dde7","bd860bc66a","e0a64c3a1e","72976c25b3","e3772d5629","cd91d4487e","9b9728646d","72716df86f","2a31d9481d","1f65a6ff2f","1d59a6a53f","458d663353","2d5a360962","53a0be9d10","ef3cfcc4dd","3962244dfa","3c5886a32f","95ef9b7a05","43ad9b85d1","6f98c3c45e","fba12f45d8","40cc644390","64adedd329","0f8ac8c400","f23ba5a927","3f081a2050","a3e8702a2a","8225af24af","db58e9cd65","58e56263ee","afbee021fa","0619f50d66","153eb7cace","01dd1bd356","5542747714","f285e49b3e","58e56263ee","afbee021fa","0619f50d66","153eb7cace","01dd1bd356","5542747714","f285e49b3e","4084fb5aa5","bf4440d21e","00704eab90","f5ddc6b5ce","173c56315c","088ea0fdfc","7bd454646c","69bd604f80","1ced916f2d","ffa45be042","be451e32ed","7dba73ebe2","8772febf9a","835f275ca5","9b7e2ff6da","f82de42a69","61300cb7dc","632747d0f7","f7f2443a15","f52dc0562b","c73dc16e16","cdae1183bf","fb484f9d7b","9eaacb0ee7","8d1bdf7770","149fe9b07b","7b0b1e0058","e270d64252","1cc3f587e5","cd3473275a","4e6be3378e","23dabe935e","e5c5c580f7","3f7735f422","151c2627e1","78642fde2d","982c4cb4b0","9785a6343b","6f7a33458d","aa2131e82c","9d0c374398","9191d77cd6","78642fde2d","982c4cb4b0","9785a6343b","6f7a33458d","aa2131e82c","9d0c374398","9191d77cd6","1cc3f587e5","cd3473275a","4e6be3378e","23dabe935e","e5c5c580f7","3f7735f422","151c2627e1","667124f47b","6bbb4303e4","ac1a62c69d","cd420d5d4c","9bc2a1dd26","585c347c0c","691659ad79","255c0c0b9b","4db17d4b87","1e675bf257","37f01140dd","25dcb1426a","35aab142fc","b814e09122","cae77486e1","45c944ffd5","1bd3a17460","3bc6eb4ac3","40a7369df7","25f292a4fc","254f76e500","cae77486e1","45c944ffd5","1bd3a17460","3bc6eb4ac3","40a7369df7","25f292a4fc","254f76e500","5382966e9e","724a71a6cb","3b73b53adb","44414bfc33","a895bbda4a","81d21286ef","31a7b8665d","f69e6b55de","cc3bd718da","61274bd517","f34e285a81","997bb25f10","0c767d3a9d","3c25284acc","59e107a3c0","53e63d4999","cc6e32f391","9ed916527e","4f02afad26","f23b3e72d2","47c95e91b9","59e107a3c0","53e63d4999","cc6e32f391","9ed916527e","4f02afad26","f23b3e72d2","47c95e91b9","ce36b054ad","75cc1bb1f3","7a3dd5fe6b","ba7b8b4206","ff3ac8fc6b","6bbaccc108","6206ae274d","1a8acb836d","95501ee093","dd797b9673","29dc873531","8547066e83","ce0d06e063","973838a9ea","a2948ae67e","95c11fd689","c87c2ebf89","991037664d","6a48988f94","2d5157db6e","a5c9a0fca9","c871098f57","4fd0017c96","17061e0674","b81a9cada7","57344def6c","4b246ac2ff","d7e4e76035","22f09796f8","b11073cf39","25a308b46d","d8d9cf383d","5cf99fabdf","a1ddba4b38","5582913701","1a8acb836d","95501ee093","dd797b9673","29dc873531","8547066e83","ce0d06e063","973838a9ea","1a8acb836d","95501ee093","dd797b9673","29dc873531","8547066e83","ce0d06e063","973838a9ea","06eb98fb8e","c98154fb4c","6019b61be4","7c8c00ef2e","c3868cdee6","205c23b254","e9989d2806","84223ad712","5cc375059d","33226cfc81","c070985033","b2d88b940a","c87aea536c","32a2d43194","1c9d00f168","261f08b054","ceb72c2fdd","4ca424c1b2","b7dfb681db","48cbe8dbeb","55615dc37c","5c07ec5dfc","075ffebf36","e8f9c964c2","81113cb1d1","d6b69046cd","0af52df8e8","9a3d791bb8","c214306464","6a16fec42a","03c0457208","b142d4dd81","94d83b91fa","da99fd5b91","885dbf3dd9","8ab8b8c40c","1b6c314e27","9b943a60f0","7cc9bea1ee","9c6845df56","e22b1c53a9","1a4906dddc","0bd02ad86c","827387a1f8","e47caf3745","3e9d1d0cef","301caa8918","4351cc4fed","eaf427fe29","06eb98fb8e","c98154fb4c","6019b61be4","7c8c00ef2e","c3868cdee6","205c23b254","e9989d2806","9a0b84450a","a7c28e2d21","268717f50a","aa90447f40","d8a3d48819","35bbcc9a20","f3237a1609","e003014f99","6db0a0bafb","9bc9579804","668965583b","a46f5e8edf","47eeb4219a","0f4392d6fb","b5986cd50b","598a27b528","35fe13a3a6","6682770f18","6b7363a082","c866346c89","b93cdbb5df","c632d97d67","69d96bb1b3","60e0c9b023","a2b52253c0","beaf87eb73","ffcf713573","98d81eeaa5","ab7aa1c3c5","df0a684f1c","34bcc5c543","1e3ff51356","ab4152e60b","f3c73c036f","680887ef9d","ab7aa1c3c5","df0a684f1c","34bcc5c543","1e3ff51356","ab4152e60b","f3c73c036f","680887ef9d","34f49d019e","bc07b19f14","c6f7c10896","1073877aa9","5620e22a99","a0aacdb9f0","8b0a1339ca","74de31c9c5","284d44b85d","e5bf2175cd","f2a39b0262","c3fe3404cc","9b5ef615c0","7f6e018f5c","c06ed2eb56","09335752ea","a4debd62c7","20c135d7c9","39df0e058a","96ef2772ea","625cf10646","febdf502f2","476a531d07","1501c675d2","b6fa7f5cc6","f8069da5e5","87374746e3","3afc37b704","73e6091c08","8b99faa4ca","9e96f3a6c9","43207a43b5","17f0be6d6e","87c0d07430","9d3e06e788","3ec252c378","976825e6f1","02203be4a4","9caaf821d5","be3ea3fc90","3e7eb63527","6ef1de374a","73e6091c08","8b99faa4ca","9e96f3a6c9","43207a43b5","17f0be6d6e","87c0d07430","9d3e06e788","73e6091c08","8b99faa4ca","9e96f3a6c9","43207a43b5","17f0be6d6e","87c0d07430","9d3e06e788","d9da49903e","acd9f2fe14","e79c7c3d5a","d41658ec53","ef3a510b55","68b8543a95","7d106d9cb7","15a2783df7","3d18fb1425","b128a6d19e","357b1e8478","94fd19f449","275b35921b","cdbc1df7cc","15a2783df7","3d18fb1425","b128a6d19e","357b1e8478","94fd19f449","275b35921b","cdbc1df7cc","c8beb0c8a8","a9b33ce03a","bf9810786c","8cb802a26d","71d77dec95","c074a78b19","6c696ab881","755febb68f","0c39095aca","dcd488e4f1","c922d21b58","c93526ff14","efe8ddbe89","4793c5cdda","4761c94e80","6e024e1b7b","73767cce84","af61b1a864","369c460653","139c03c6b7","12defb5a49","2cdb91fef5","8c5c8ff8a9","fbcdf99723","307e3eddf5","40b0282fc3","69fed1c9da","e4ca893531","2cdb91fef5","8c5c8ff8a9","fbcdf99723","307e3eddf5","40b0282fc3","69fed1c9da","e4ca893531","9a84216d43","4ecca21a32","c105c30f5a","aa8c9a5377","13d5670b7a","b0783a223c","d39cb0a67a","143f3b4267","7b6683760d","b739698ff5","5c9a0333ff","7c22c7f5ac","458a756ce9","53014cf766","143f3b4267","7b6683760d","b739698ff5","5c9a0333ff","7c22c7f5ac","458a756ce9","53014cf766","351760e29c","d0470bd989","2ebf559e1b","7c03db8f3d","938286efc6","2ca5eadcd3","38c14921bb","1e0f355b99","22dc4be1d4","ea2ec8ced7","56df9f98be","bca67e9b63","bd4ee7ca45","e5943f2c11","24a606014e","e2292ff9fc","0bab77d468","d363f0fdd4","10978b3145","d73cf94f48","4a456dd66f","ac437f3e21","7ea86e9b8a","929d3a45ed","68d001d450","7eabafd071","b538352be3","781f208718","8acd77b0d6","28dd4ce3a3","b79b7d64e5","76f4092ca8","eb76fbe0ff","24d00bd265","f9fe989970","c1deb9bc42","5520873eed","943dd59c8b","817996e0e5","2ac66661e5","8b9dbd9ed5","eb59011f4d","a7b20a2e19","4459d25dcf","70a3471316","10a01b681a","117c3ba611","72d9bd8f07","5271f20807","a7b20a2e19","4459d25dcf","70a3471316","10a01b681a","117c3ba611","72d9bd8f07","5271f20807","c38b49a7d2","9d437e9101","b9e79e0abc","dadb648b03","742ece4644","fd9cf1b9ed","389e947833","804b1a0e46","4012cc48ab","92e37a133a","43c881f40f","2874e04cd7","c10257a050","22123eeb30","804b1a0e46","4012cc48ab","92e37a133a","43c881f40f","2874e04cd7","c10257a050","22123eeb30","67b74870c7","7500d304cb","12206320b0","017cc6767f","57c91cb559","0b9f61db47","6318795871","77592c0049","a059135464","860a634be5","4ca226a4d6","e606a7126e","522989a86c","25e1d73ffe","2322dd5aba","1697c9bbc8","4ec68664d7","63afbf41ff","a1f901f502","ce5f09f289","f450dda707","f2d627d8f7","59cddcc116","1f1362a778","8cc18f554d","a4964256a5","496b270f3f","b7f234c577","dd98f2d12d","3357df431d","5f9ce9183c","1398d78733","30e0f675d1","abbfa15920","8052c2972c","dd98f2d12d","3357df431d","5f9ce9183c","1398d78733","30e0f675d1","abbfa15920","8052c2972c","bb9617d39c","e99e95c5e8","ca15f312d5","ad94819cd4","aad458320f","a4812d8e5c","e83de54083","bb9617d39c","e99e95c5e8","ca15f312d5","ad94819cd4","aad458320f","a4812d8e5c","e83de54083","11a7cc815f","58ada90f28","9067d9ddb3","986fec6be2","20a58a1dfb","7a3926bda8","f7d6985166","d3023eea9f","69e4979eb0","d0bcd30f07","48132db89e","e305fbf5e8","6d8f8e8b76","17e618c8c1","a0216825af","cc615548cc","aae3227970","73ff301a18","802327ac0b","5563f2ae87","cb181b4dfb","c482472f59","f0076159b9","8715d2c4d8","fc44deda7b","56bd142181","de56f58d5f","2beca3f0ed","b6a7bf4ec3","528cbc0b70","9b80172ab6","1f0ae5be05","1471ac922c","e8d1596e90","03d597e9b6","b8d6ef4ae3","c7fcac22f0","12ebd0d507","fc9b53f5f0","47d0ba903a","2ecee7f3c7","9827dc8aa6","14bdfe6a58","555e6eb066","62f7ed3da4","4dcfe6b1e2","732e36f715","2f118c94d6","0ff5bd96ab","d3023eea9f","69e4979eb0","d0bcd30f07","48132db89e","e305fbf5e8","6d8f8e8b76","17e618c8c1","46b33861b9","7752b4bf34","07fa29f6cf","202cff3682","6cb09823d7","ae75a7a78e","cd629fed1e","46b33861b9","7752b4bf34","07fa29f6cf","202cff3682","6cb09823d7","ae75a7a78e","cd629fed1e","3355c41006","622db0bb50","738cc1bf6c","f1d0c3fa10","e0422da115","b327c18b3f","0cb1746af3","97da5b8a18","e4fa46af33","962251f811","5f72866a58","c2b786d691","63c3019897","0dfe049a70","6ea60bc7a6","4ce92e60b3","e49990c8b3","390f11bb26","08a3f12afc","93fd9aef8e","5ea5f9cdee","59c5ebe0d0","9c268aaa74","99b04a60ec","edc180ce4e","c67da0a3f9","b00fde120d","d8fcc51de7","eb3403bf09","ee6733fe81","899c49b461","efff55314c","f441c14639","3366e29f0f","0f1c2b2608","104e46539a","74035b4aa5","3922b51033","1fe66266b2","b13d752151","e3e6a8cbd8","fe9acc4460","6ea60bc7a6","4ce92e60b3","e49990c8b3","390f11bb26","08a3f12afc","93fd9aef8e","5ea5f9cdee","3355c41006","622db0bb50","738cc1bf6c","f1d0c3fa10","e0422da115","b327c18b3f","0cb1746af3","a217c5f036","f2d0425157","49e21b214c","64c112b568","a676025a7c","80fffab1cd","91d7e72e82","eb3403bf09","ee6733fe81","899c49b461","efff55314c","f441c14639","3366e29f0f","0f1c2b2608","e440a8f46d","90e13396f9","5fa17fe274","e11796bd64","a2d74a32d1","e700a8dd66","89ab045a03","9d5dee66f1","2546ef8aad","e8836ec525","a6091379cc","55bb7fee9d","da07ca55e8","32ba0a1ece","0c4a4f4d31","c2c3e8a1d8","0038937cb9","f694713e40","cdff700d0c","d69f534870","68b5b7cfde","0e0319eb1d","4b7a102a84","88af0d2528","eec751f606","4e7d9d3433","dac51d1b0d","a87aa68493","e70300d5aa","a10dcbc47d","0e70053f18","a0e875915b","9dc5c0e30f","67e5b97da0","c360a4e12f","9d5dee66f1","2546ef8aad","e8836ec525","a6091379cc","55bb7fee9d","da07ca55e8","32ba0a1ece","8bf919a090","ce24d326ac","dc8adc9850","775443f1e9","3b059d6cd2","68bad62af4","391fa6ff4e","3ccf9b1d3f","12647cd837","7cf5feb276","0fbf692fa0","cd8c41c788","b6914321d9","3fd93f4230","3ccf9b1d3f","12647cd837","7cf5feb276","0fbf692fa0","cd8c41c788","b6914321d9","3fd93f4230","b19375d6a2","40cb595940","1264080937","9a8d296873","7c2da80ad0","cdf2d291c8","16b07433cc","5112eccd4f","db33e938ee","f772de6904","b7e4c8457f","16a9e2ddd5","4a797ada51","0b963a16f1","ce8ea19f46","877024c580","7fe72d5a81","116fdeff08","3270b4ff92","186d52db6c","5ed64f4f56","2b10a2e2fc","d7ecf032bb","11102887c7","68a9163fca","d26b2f4697","0dcc98be4e","258fd765b2","d8817bb0cf","7eb2fe5a5c","fa1edb6181","26e0eb0f26","f3cf392616","6abb7c316b","b7db7bf5df","fb7adfcbc5","9228377719","4e5fe87ba2","6a6d5ef5f3","0bd8a01b87","d29a1a8478","fd665c6039","d8817bb0cf","7eb2fe5a5c","fa1edb6181","26e0eb0f26","f3cf392616","6abb7c316b","b7db7bf5df","0ca24ce5ec","6cb7998b65","379e9baa8a","d88063ec1e","ec79a81cea","99494b3a62","b3ebc7fdf2","e590aabecf","bef26fd378","4778ecc457","6d655395c9","b6f69452ae","ba7106f0d2","3150cd87b5","0b7dffd85a","496fd75cad","6dbc714d4b","4636ef01e6","5ccaa761bf","6c7f6862ab","80fc82820f","4f2e5b3bbe","1a5d35691b","1dda214e4f","50a83ac53a","73a6cbbfd8","f0b1157b05","2fd2181378","0e62647e22","57629512ed","3abc52ebcb","aeba846a2e","d502496712","c74ff4fab2","8ed14297eb","38307a9e2a","a6b092a278","978c47c88d","5e2faa0041","37d2fd14e8","cf290d8b63","f9ff6b9dbc","e46f123562","df54481c55","38c7d19a18","befe510b59","80744dd482","e0128fa9e9","c6dae731d3","e46f123562","df54481c55","38c7d19a18","befe510b59","80744dd482","e0128fa9e9","c6dae731d3","665067e05c","5ff45537c0","a2331a9a43","4449ca4392","aebed0a04d","c719f89ae9","de091d88d9","665067e05c","5ff45537c0","a2331a9a43","4449ca4392","aebed0a04d","c719f89ae9","de091d88d9","46242ab445","0418ea37cf","055a544697","1103a4030a","37057a8aed","aaf042837e","b3994568db","f4b97f43ce","66ea337ab6","fb7edce14d","3c14eb6f3e","02dd9a150f","50bb18101f","85440a90ca","f4b97f43ce","66ea337ab6","fb7edce14d","3c14eb6f3e","02dd9a150f","50bb18101f","85440a90ca","aaa5327751","1fc589f933","b9ac145b2c","10108193db","90c62e650e","6920876b15","ceee2b43c6","543242ebac","a8b42e73be","d6861e3782","c2eb0ad829","41cc35e12f","f7b229a0f3","5c52f695dc","dd93ad6ffc","553ac18310","15e85cbed5","acd8c85e49","df7baf2571","d71853470d","47f15f30ae","47b1181949","bea837d35f","ee92e17695","c47dc69b7b","26e6c65e1b","bbceb0bbbb","e852d796eb","47acd230d0","9389a7e3cc","adee3d4121","6d47982eb8","7ff7cceaaa","c3191c5aa8","d0381982ba","e3429776f6","baf90b7611","2937164e8e","0398bb5154","6dece849cb","07bbdb4a92","108d61f433","e7edb7d101","ab942be9e7","df8311509b","4c3e816454","224d24506c","c7eb5e34a9","a757dccfda","47acd230d0","9389a7e3cc","adee3d4121","6d47982eb8","7ff7cceaaa","c3191c5aa8","d0381982ba","513c69815f","2fd4e8e06a","8486629a20","74dffb3825","3ae567bcd7","2d7573f32a","970b458bee","d5252cc840","206e23db5f","99732d94b5","99ec792ca3","176899ebc9","0e94b3ed72","1faa504d1d","0520b33176","e56d1da9b7","87f090cf71","e7040c1807","c762ea2009","405d77d054","7d99c4d5f8","ac819c1e4b","f6479c8f06","387b7b583f","7447fe4687","180b61a5ff","f16bd59d8e","74005fa775","83e6a30d0b","827f8cbd05","67b7625c97","aad467d62d","6cb751745a","4cad82dc5c","b2c8899363","1243d23f54","1ccaf00095","c345997cb0","53ba405c31","d74aa4a5d0","bf50a0558a","6be1ed8fba","08115d4014","51ae7f9ace","a290ce3fc2","5046f87428","6fb00ec3e0","702bb20c49","975d244ba2","5978ab3976","f3ca93c127","589d7f8acb","6dc99438ee","8dc5fecf56","23839f32b6","158eba0a36","b448ea5dee","28c30be3be","ea425e09c5","5e426845b1","4dad597848","2ac73594f5","94b9bb4da4","b448ea5dee","28c30be3be","ea425e09c5","5e426845b1","4dad597848","2ac73594f5","94b9bb4da4","290c949250","077aec0496","ae5c01a743","57745c1623","261b4749fe","face26d2ae","dc5bfcd405","99213c1fe4","703c9efe72","be956c51f6","c1c500063a","6736153051","3100888e96","f62cc7adc9","9ab49cce09","858c1c4084","df810d2e2c","440a58ffe6","dea5e3e18d","f149e7aacd","b268c1cabb","e2c463d1fb","852b3d85b8","f8b869c50f","3f4d3b141e","426e00e5ef","3fc738cf98","5b6fa42473","99213c1fe4","703c9efe72","be956c51f6","c1c500063a","6736153051","3100888e96","f62cc7adc9","121666bd6b","24a7ec6177","e96f59e72d","f3f5f772ec","b42200a4af","58e911bef9","15acca135d","d464c00189","0f588d0faa","97a6266b8b","5e9a8911e7","b0e1fc0ec8","f43a629019","c3a8865f1f","d464c00189","0f588d0faa","97a6266b8b","5e9a8911e7","b0e1fc0ec8","f43a629019","c3a8865f1f","c2644a560b","6371aff168","440ca7d4d7","faaf66ebcc","d84797fcda","d02b112dbd","803abc98cd","2ed894c7b7","7de4eb9ecf","488cebeeb3","a90ed7df37","9011b2ff87","c3dce0cbc3","97a9ad3e03","c5c6bc8321","5981cf6619","5e2a062da0","36a421e442","5b1ffbfde0","b0c22a871c","4f5fcf0021","365267cc1b","4712142b14","85337b0597","040dc5a50c","81c8874fcc","08b8fc9f56","13cca996c9","347a585581","f8ef21746a","eaefb55907","1050f75b5f","7283de38f2","0afc407070","83236f88cc","c5c6bc8321","5981cf6619","5e2a062da0","36a421e442","5b1ffbfde0","b0c22a871c","4f5fcf0021","c5c6bc8321","5981cf6619","5e2a062da0","36a421e442","5b1ffbfde0","b0c22a871c","4f5fcf0021","9fb606e5b9","bf7f623b3b","2708eb1cea","dcbbe0b995","11ac90ec8d","c3e216c7cb","5b8789e415","561f8fddfc","d5279638f0","4dc07b96ea","cbf9d6fb54","ead35e8933","9442aa4255","2c39f0109b","655ded3a36","1af8207da0","151e20e53d","01e083d56e","b8d834ba48","bf252968e7","83d754ffb1","9e37774816","cad7ccc66b","982bdb9f1a","7c85791235","d53d5330df","ccfca51be6","613d3b2285","5ae5f02ebb","3289e17528","e4e2299bda","7ce022c6ca","2662686306","41d8f597cf","b8f713d1c5","b7e9713f45","d7f7710772","f6b4d4ed15","e967ac7f0a","d2c03fcb66","a128c7a7dc","3d919b4d22","b7e9713f45","d7f7710772","f6b4d4ed15","e967ac7f0a","d2c03fcb66","a128c7a7dc","3d919b4d22","cd77906f6c","ee60e6dda5","57cb3c8953","57821587ce","23f3c2c753","b1f054152f","dc99259d4f","d9f0af1a6d","b8bd001f20","0911633b3d","4852ba4ec0","6ccc9d15a2","f50b109c95","7aa1f52e46","4a3a72d83a","d1b1af5a26","d4f223f950","4fc0ad2679","657379e178","35d42f4eb0","371696ca48","75fbed48f9","8e5ab1fcb2","0d1f37032c","716d793094","123d9a9e90","6528c8bb57","be5f8fe143","1b3c8095c7","d7a4619eab","1e593ca162","bc0faaf680","909f2974d2","273894131e","8d84c0c443","42e3e1e8d8","5f211af859","141e395591","5082c1ba41","d9087a8997","d96b1aef9b","c0bcf598b7","0ef4857fed","cd818a8032","70dbd9d5a1","a1f2b28eb6","6da70e9f2b","0d5ea2e533","b3e809e762","953ef25845","fb7b36c7c7","d70deef5b5","a370abb920","d7d2472682","2576612160","a6e2a2aa79","0d6e6a4f6e","a3297af125","85273430e3","ed070f5e1e","a08b145301","e62e05a6d1","f559a82d19","4a3a72d83a","d1b1af5a26","d4f223f950","4fc0ad2679","657379e178","35d42f4eb0","371696ca48","aa13bd75e7","2df0db4a63","e363d35f54","1ab683fde0","9bd5df7af3","9a6f943e5f","254545ff40","ba739bd767","33f08feadc","a49e4c1c3c","9a9ee709be","677c732242","e0b3676587","a14db9391f","d1de2dcd3e","a6c99d3483","12bf1c966d","ceaebbfa85","5759a62cec","0d2b67c44e","157e32b9d3","b4b26fbd40","027b800e4d","64eb30cd09","5c7455634d","e82f702b28","570dfaa14a","3da39cb66c","25df4b3ea0","48c3c0ea46","5d5b5a795b","adc4f6c4e2","b4515be7ec","76f60c1334","30f208f2de","d1de2dcd3e","a6c99d3483","12bf1c966d","ceaebbfa85","5759a62cec","0d2b67c44e","157e32b9d3","d1de2dcd3e","a6c99d3483","12bf1c966d","ceaebbfa85","5759a62cec","0d2b67c44e","157e32b9d3","63076a50e5","8a6741989a","5cb481af0f","712157e926","c88a03082b","7928503a79","2b2465dfcc","63076a50e5","8a6741989a","5cb481af0f","712157e926","c88a03082b","7928503a79","2b2465dfcc","3f6ef9c9f3","f6c54de851","5feaedd6be","780fda87b3","7ea1010ef7","edec9ae23d","4f55a897eb","c2dafbeb6d","1107c5772d","4aad5a3a4f","22a2e1fba1","93f4901a9c","58fc04dd19","1863effaf9","7d9826b3aa","5f926136bd","faa67fcd14","ee1356865f","b0b48c3fd0","06c05bf3f2","437cd2d504","11178105fd","71f35eb460","f41cc1939e","b5ee35e584","6762f0f09f","7b0e41d686","326161664d","0771c689dc","c5182c459b","11b6702ecf","0b1eb4c0c9","28a84dcb99","2af9222ac3","11ce9222c2","8f299644e0","eae1fb1383","3fd7792c3a","b47d4efe0c","a970c2ee72","b74a9d5325","1399f99c32","0a0c445843","bb520a62be","4df9fde771","a532b950c0","4918b8dfab","740061ff49","dd233b5c51","0771c689dc","c5182c459b","11b6702ecf","0b1eb4c0c9","28a84dcb99","2af9222ac3","11ce9222c2","286f1c93bc","6ee64b6269","a66a21a7d8","0ff7d175f9","a755b3eeab","74eec5b047","dcb4a10791","286f1c93bc","6ee64b6269","a66a21a7d8","0ff7d175f9","a755b3eeab","74eec5b047","dcb4a10791","0599b66537","d1c93574ae","7cf0cdacfe","d580f35003","f7109ffb2f","0619a0bb62","bfeeab22d5","0599b66537","d1c93574ae","7cf0cdacfe","d580f35003","f7109ffb2f","0619a0bb62","bfeeab22d5","e858aff7be","c2b6385e6d","cd54bea294","6d6e2d12cc","7bd875ad0a","e6a43ac217","0e9b8f3e1e","053ccbd8bb","06668e9cc8","4b67bae3f1","fde58ef19c","ee18e1f549","cf66088544","ed8077286b","51eef537e2","6f3e58b28c","f6d6d8905a","c724b97558","6656df246b","4cb49e8aee","209f9b2aca","626a0fbfe1","1bbede48a9","0db1cefe5a","659b716706","9fbf41f538","54a7931e99","59fa7972d2","dc7e41835b","8b0f36ebf0","eabfbafe68","b375eb6b2f","b650f74e43","2c865b0bc8","82197fadcb","dc7e41835b","8b0f36ebf0","eabfbafe68","b375eb6b2f","b650f74e43","2c865b0bc8","82197fadcb","980ef0832f","8ceb6522d8","2f835fa3bb","7a421f191c","8796ea0a32","63bdaae984","b8671a6bca","d3cc470fac","d38fda0173","c0c2fd7054","bb2f0d07ef","8cd455b1a1","467f568144","69148b87bd","91711a6b69","fe0fd23a9f","75584161c6","73df0604fb","7c0896e23e","719433811a","a5a66fa0fa","d4f06d6f3b","424427296c","da88e6d6c1","4d730f623f","a5c6f306cb","d00544ca75","31478db9ae","7585c1fd81","ca5374fd43","17a2a458f8","3fdd9b5354","56e069653b","923761b9fe","562908ab09","7585c1fd81","ca5374fd43","17a2a458f8","3fdd9b5354","56e069653b","923761b9fe","562908ab09","c4ff37381d","1c01e9b21d","84d1ddb1b2","38ba7dd2ef","20f767d333","6d245a561e","1d48b01ea8","8e12fc4ee9","69b388e4bb","4c242cf6e6","34c1903afe","15eaa31f47","260e14f69d","d8f0b12217","6a0942beb2","2dd89b348e","c716f23e4c","672e9cd902","b50718245f","76d7a9b57f","6d1c8747d6","c1bebede23","70ee3de0f1","5b544917ff","246faec5be","e6e38f685a","acc982f6ac","49ee875caa","03b1cc1d36","6a7ae72a22","f6d7e6bac9","7eb79e99d6","22609dcd00","8c9f5aa931","6ba17bf015","a97616e28a","1eb46677a6","59e20f1dcb","70e89d048a","56117b7246","4be74798b7","8275d0f2ed","6a0942beb2","2dd89b348e","c716f23e4c","672e9cd902","b50718245f","76d7a9b57f","6d1c8747d6","e88d71d6ab","a8eb4b4b0b","94f4b811de","709822f56d","aa80496aad","a13bc9e678","d10534ec4d","8839c1df48","c0a985a969","f98dd2bb08","cf9a1f1663","682f89f049","a9e7419d2c","51f9ea7089","8839c1df48","c0a985a969","f98dd2bb08","cf9a1f1663","682f89f049","a9e7419d2c","51f9ea7089","a5554a56dd","bcea926df5","a4025f1754","d8d74dc4b1","a7809ff6b5","2e0eefdd21","6af7841511","b0768bce29","ce06812d4e","d8ff781b23","2dac7d9f87","b2aa13c127","4aef770977","9590720a2e","de7276cb73","fbe4735ada","25b4c1b2ea","e8370b0db7","baed3f4a23","d6d0dc6696","f6b95a0dcb","477f6010fe","1931a6bc8c","4e61bdc4ab","cc6b930a60","53e91faa4c","15adafc1bb","bfed0ea987","477f6010fe","1931a6bc8c","4e61bdc4ab","cc6b930a60","53e91faa4c","15adafc1bb","bfed0ea987","4c121a067c","d9cab6d85f","a04d14325b","1488d28bac","5cb19ebf48","6112af5f1f","59fc601839","cfde83e360","fa54436c80","507abed049","c47d0f7fdf","afb9060bad","ce186d3243","f19493a18d","cfde83e360","fa54436c80","507abed049","c47d0f7fdf","afb9060bad","ce186d3243","f19493a18d","5506c09d54","80540cdd5c","237affb4b5","11f2b6ff4f","9a074f5ab1","1fc9224a6c","dc6b717d39","aa15b1e724","4a454ef83f","66937af5bf","94890a7640","d123466365","c85e7722e0","8ec53a71ac","190571c862","fccc88d32f","c94788df44","c190a964cc","569f62966b","d033f5c284","4829573ea0","e74a0f1fd9","97a9a2273d","d6922cd123","c0ab7a8199","9ea3816845","3967cb2288","44639b7570","3a9b900e14","e26e611d4c","356eca1b7a","72db798382","270d632152","5f491427b8","776177cfb2","3ee0fa1ca3","49ce40c83e","4b5a8181bd","3a49ae8bac","f931673af5","ab5c2cd75d","4f373edf2a","b119c2ed11","ab031539f6","23de57a2cf","d1d66b6bfd","40530730a9","64bd3b1e13","64fe3d6b8b","b119c2ed11","ab031539f6","23de57a2cf","d1d66b6bfd","40530730a9","64bd3b1e13","64fe3d6b8b","6c2a7d3a50","e2ea6485a3","8665c9bc36","dac7981a12","36d4bdc6a2","546ffd3a83","2679b8f68f","73ea0f5280","4a8e365aa1","6dd9a39ddb","73a7a940bd","b1e744ff0b","544565f33f","ad63ef1208","ec4003fa97","349094c059","03dfa55f6c","8f8ec20bb9","1c8e3a2131","4cbb2a9fd0","7383179048","a1811e325b","4dcb35c07e","e8b7d77392","c2232aa549","32f1338dbf","56687b3aa8","96f60df2d1","a1811e325b","4dcb35c07e","e8b7d77392","c2232aa549","32f1338dbf","56687b3aa8","96f60df2d1","1ecb86249a","361ade93a2","a9850b5bda","449e9db03d","8c69576ee6","35c0450774","728168d07d","97c0673278","b2edff837e","81a239cfd9","55d85eb122","3a8ac4aec2","17696b0dae","5f8ed71d05","3db78636da","398bceb4ef","af3d925a0b","8597b55408","3865a77631","484b6f099a","2d2ba939c5","947ad07aab","10bb382245","280942c5f6","c0a11dbb70","b345987896","0d5def2c45","1239b48811","947ad07aab","10bb382245","280942c5f6","c0a11dbb70","b345987896","0d5def2c45","1239b48811","e6fb1c96db","d6a1b5af0c","8a478ddf79","3c7565bd90","c2b3b03d86","8500d574a3","d7b2bf5f87","7b4512fab4","511092a151","fe7a53e663","d6396a565e","6a58fe9a18","56a01ffeb7","14af241436","c13d8ec263","0a1e1670c4","dd31356881","e81fe3a08b","08027f940b","b01213f697","52d4f0f2eb","9e307723bd","b64345bbae","617d8157cb","37bf7f2584","d3715540d3","b902af2c70","16b8926f27","a5262c3ff0","adf91d030d","b6861c170b","36805c7f48","a8f1ba470e","4a76b82637","be08481178","71704256c8","0278785d84","d736b33eb8","9cb0a468b3","7dc9226b50","6eb7db20f4","dc10973e47","fa6e89ed75","326f0df302","765c7a60c0","33e25b65ad","0bec743ae4","b2ca3d3c34","9178c6fc59","fa6e89ed75","326f0df302","765c7a60c0","33e25b65ad","0bec743ae4","b2ca3d3c34","9178c6fc59","51351fd73f","d9e5db38e4","9463df1dba","13253e2625","4a5adbe7c8","cf3a0510d2","a2ade95ebe","601592120e","7bd66f447b","0876787059","8bec75f93c","693da2de45","1accc59ace","54d2b6a441","abc9e3fdc4","c13d191860","13bd7b8e72","5aaf7a5c33","2520fd2351","137a8e742c","0233a96a38","6809003381","0e3ff37d11","61210a2f18","6eebbf639d","b40e95e299","eb9e93a2eb","0f8e12a396","593a7ac73b","9057ad113f","ec05382299","356496906a","068460d9b1","d57eb1f20c","c93271e652","ad051a5ede","1e5dc14c05","045f1897fd","6831d5000a","03a21058f1","6482be2969","f28b75075e","14d38cf16a","00ad6db797","772e3eb8cc","4cac9abb87","e7f0963c6d","999e2e5f4f","f5088f7b7f","32adbe59a0","da8c530e08","3f921f245e","28e30b2b98","d73b4030be","239e47b279","6b8666707c","32adbe59a0","da8c530e08","3f921f245e","28e30b2b98","d73b4030be","239e47b279","6b8666707c","67ba852bb9","340c037c72","a2a113e222","960752d65d","76d535adc1","b5883efcb8","01fcb2afd9","d13cf934b2","864cd177b4","6d95fea700","8b467e58d5","5319f29342","d6b1b0f09a","235655ccc9","a4ea2d314a","3e0127fdc0","ad47a14653","9870eadc37","a97aefde19","ff95354f74","11b50e0367","a4ea2d314a","3e0127fdc0","ad47a14653","9870eadc37","a97aefde19","ff95354f74","11b50e0367","16a3a7b208","5343cbb70d","5027d9cf17","654af0ee89","69c5bbee4c","02a8d6dc9f","20575e7214","11c8f4b02b","922474f96c","cb1c763575","677476c548","0d5ba56568","fe5d2737d9","6d606d4e81","cab8de47fc","7184e71dc9","0f20a17ca5","1a8c4d24e8","8e0564d1e9","f7cb388d73","627eaf2f51","cbbde432ee","85dd05ab3d","d49f0ce58e","c13e6322f1","04f55d031b","047ac8b13a","4c320d073d","cbbde432ee","85dd05ab3d","d49f0ce58e","c13e6322f1","04f55d031b","047ac8b13a","4c320d073d","5db09476cf","220a0481ef","d1f76c7fcf","f456f1f876","30baf0c147","cdd54ced2c","4f7754d648","53e86c412a","7e627fe40a","cf0b23faf6","f2dd77a170","f6e1f100c4","7cf34abd6f","edc473260b","2665f22ccc","7f746a4cae","7c004c5f9e","d5a8ef4c03","02fdab8aec","64d699d298","f64e620a5b","44b0a91f93","f8dc0f295f","96d5cd32c4","f712c53415","b1d15d2489","f3f60ad542","46db373d4d","d4414a6033","88a6f01f44","eba2c1d8e9","710bd0342f","8285ca1e62","9504b051ce","a300cf864f","2487dac8a1","27637e8104","b4c03b4e1d","f1b5932e85","317fdfb304","aca5c45b6e","36db198b4f","94f7025b58","a5beba7af5","50b847da01","f1baee4519","31e78b8aae","2636c63b11","b9d0cc07c3","9510900571","b7d0288bae","ba3a4eef5a","fbc095fb6c","c33e50b5bd","5012ae9448","741da7ef10","f6a7508a4a","b950331b5d","279b06ef64","2d0d18349f","0900f0f0aa","785d8e426d","2878fcf872","b14d572a73","b56f14f288","d9a7950b30","9c0f637049","503121d459","2401135741","19939b5cbb","6b6c76fcd1","e2d16257e6","dc9815a199","11c736a854","d3eafb43ec","1c8b79dd8a","24e22c601b","a22f0d02bb","7231f58745","10853a870d","3d4901e53e","ab54ff67c4","56a6420ced","aa6a54608e","a22f0d02bb","7231f58745","10853a870d","3d4901e53e","ab54ff67c4","56a6420ced","aa6a54608e","365cdb6eed","690b3b6864","dc84e9bae9","8652a53d28","cf6288bbe6","0c14721a67","4db070b9d9","f6476c2732","93fb6c37a6","8138487235","2e013aaadd","712a4f7b7f","3f018521e3","4a3458c80d","4959890b38","13e8f91b07","4e9c1c990d","6ca78cf177","d17acd0d59","109a81860b","e66177a911","f27cdc1967","d821e2d5ec","66ef984c06","262f307781","199c4d09cf","d538618de4","68aa71812d","c89ccbe188","f6c78f09a3","ae06655ea3","fd1f38063c","7db3da0bf1","13b0bc46ae","8c82c7754d","c89ccbe188","f6c78f09a3","ae06655ea3","fd1f38063c","7db3da0bf1","13b0bc46ae","8c82c7754d","40f15d822e","2643c2ebdf","eb7610d66b","ef78105987","a41ec0c7f5","92e0b3887b","d0be8b30b0","ace2e45a06","e2ecc756cd","21ec66c06b","dad42da2e1","fd02c30438","a639d8356e","12d8d5067c","c89ccbe188","f6c78f09a3","ae06655ea3","fd1f38063c","7db3da0bf1","13b0bc46ae","8c82c7754d","a75e7a97b5","628c41700e","0d90347d7c","679e4522d1","f1a161c218","ad9ccbbba2","1608009a1a","c4d0d7da6f","09fdad2f18","06dd3701ed","2700854d93","6c8c39d286","e46dd1a617","20022fee7b","c4d0d7da6f","09fdad2f18","06dd3701ed","2700854d93","6c8c39d286","e46dd1a617","20022fee7b","aeeb0eb7c1","7b477ebd78","30a1eefada","4af5048ac5","476b6a0733","861e622f51","1c7ad927b7","fea6c2e168","c887edc514","5e0e394118","547fb5e386","95ce63afb0","4d9442abe3","0bdad1cd23","b25254278b","2194798efa","5b92de53ea","63355b7303","a676608925","0e0e0725a1","45f944f1ab","c874d9f177","eeab97efda","b918e8f45e","7814842b24","e5d9b41506","1d1bd006e8","1644e5267e","c874d9f177","eeab97efda","b918e8f45e","7814842b24","e5d9b41506","1d1bd006e8","1644e5267e","2a08b2f3d9","db6b1944a0","04018e12d8","b53e88cbd7","e1431ff88c","e070ed3d5d","e9eacd5b62","dba8a5fe9a","ad50400d4e","aecf7665f4","c3a0a762be","db82b48373","88b1cdab9f","7c46002ad4","8dd4e29062","6cf90fc792","e20879da07","9ee0e45815","7dbde68f1b","8b07b2478e","01636734aa","ad8ee3df45","44c5f42d53","ba31decaa6","fef9016bb0","fa2675c976","e4825ff9fe","304d9a01d3","66cf1783c8","aaa3ce2912","753dbe6971","1c1a39dc04","4a8cc675c9","9e282766ad","610d718c6f","b94b7dd38e","31423a21e6","0995afe31b","1a2e92ebe0","8a8a5a718c","1f2c26c482","956c99f929","de3f2fca90","25575b27b3","07298733fd","189fce73ac","00d44dc8d7","b83f3b9f71","1dfca8496d","9ae23cd87b","b3fa814557","93077caa90","a807d76bd9","edb6cee838","03076c909a","ede54ff431","9ae23cd87b","b3fa814557","93077caa90","a807d76bd9","edb6cee838","03076c909a","ede54ff431","95783932a1","7c22265a99","d5d6cbf08c","affe555e55","4ef4ec5158","458d905d26","8091e18386","48a1e558a5","7aed2020f3","e90f9257d6","02d2b6ce0a","1be0628ea4","3f343755fe","b070451663","48a1e558a5","7aed2020f3","e90f9257d6","02d2b6ce0a","1be0628ea4","3f343755fe","b070451663","db1b886f01","f427cbfff8","7c425c1865","31b42512f3","d3e46b2cf5","ced1f05b4e","21ba424303","c250475092","53fa13e804","b50adac4d0","805e5ab025","29527692de","dada88ceaf","16ddee9cf8","d2b47bfd91","76d7c89436","36b7c0fea3","0365603545","53b02e945d","abffbbf52c","94158f3ca4","dead2e36b8","38100b1681","1de0a5204d","120f85adb6","5f4cf4fc4d","e92b560473","d44453b29d","74820aeea3","ca4dc2682e","d79b3015f4","1d0a1634b5","cd049739a6","70f2fdc39a","887c54d716","07c8b1b4c5","df93801055","19e1057660","fd39d8e55c","1e42f2720b","03816106a8","31281b3901","dd53bf60ff","dabb6f7bc9","5d93e2c1f9","3d10124b54","ee15f2a512","deade58fb6","81e87ba788","dd53bf60ff","dabb6f7bc9","5d93e2c1f9","3d10124b54","ee15f2a512","deade58fb6","81e87ba788","55a71d74f3","8bd0407692","ffe4a6f876","558c591fc7","a07e819778","95089cced3","b7ccdce09c","ce542fcaec","c631ba4af3","7ce1296143","4c12f303b5","bacb7dd2b7","1a2c158121","a1829d0cbe","7fbf062f60","cb57d5cae1","b4f530c132","6fa76d9c30","9e1d31396b","171555f105","5ef0002420","8aca2f0639","fd142f740c","02b1713285","461f2ac2b0","d55e29f41e","0b65dfdae6","424c5312f2","70c38fa9a2","8785b30b32","140f813181","bac3294918","a0a5d3914e","e117c6d22c","7fe2573822","e145d2ec76","e4f9d138ef","c96bd280fe","f4728fe07a","602959fdee","9ceb734ee9","38dec1f3e3","ab2ab10650","03c857cfae","bd670c824b","33a21f1843","6a8828289d","886719f0eb","74ca4f5090","722c189ad7","be95b9b246","c5d12e94af","95278b64f1","f7ac7279cd","c2372453ac","e677e916b0","9294c38210","0bbad6cf7f","f541c3b6d2","7e1218a819","36fae547ae","63ccd75071","000abfecdc","b7661bd938","e5f823fc23","3e29faa463","5753b7a2b1","049d22f587","76e82dd93f","80622fc1cf","bd5883ba37","8b93ba0a0c","7bca51473f","3690c74e91","ff7c2ec2dc","d079e73d11","0070e97cee","bd5883ba37","8b93ba0a0c","7bca51473f","3690c74e91","ff7c2ec2dc","d079e73d11","0070e97cee","338024c93d","efed9e7af1","7361b1cb73","370f6ea10d","af9f0e7d45","caab844feb","2027b4ad3c","f5e4835d09","58df6a7f96","f0cf1711e3","b0f1b1dd05","211b433f37","23b34db278","1719bd19aa","2cab2bd345","acf4e95d19","cc184e7340","6b24588126","87d9c67266","5522d57c53","f807d3f2d0","da2323012b","761b5118c3","10772ee3cd","33929d591f","3595aaa1df","93e5caa9fe","404284f0dc","f5e4835d09","58df6a7f96","f0cf1711e3","b0f1b1dd05","211b433f37","23b34db278","1719bd19aa","deed05b10f","5fffbc30c7","93be44919b","fb22393d9e","e73ac4dc8f","8930f62ba5","a79006c9ef","94c443e81d","06e1379fb7","8001c2b9be","beec49dadb","8531c234a6","49ba7cba49","7b21f47d70","4aabe05943","6518f7f4a2","acef336f9a","c181cc52b8","2c465d28e8","145a146ea0","d8a94e09a1","9fcffd5453","4d7aa92e86","55b6a5efb7","20c2367346","115a52e5a5","1fe195fb55","17f52c15f7","43c9d70dbe","07c45bdeae","cf8ebda822","214d4e89f8","4692dab2b5","7765604e03","c2ecbf8be6","3ff6875760","56e22c1875","404c4a7999","df18250f30","c973a4eaa6","b123cadf0d","2b7f3de968","7052f8cace","cf0c4efbc9","a51a1fed40","0d491c06b5","94c1c89fa0","39efb6a35f","e30f0037d5","25048ff143","6d77cc5135","78f536ed3a","8285388031","3d7c94a13e","0d3fd74382","b60e4a5f86","94c443e81d","06e1379fb7","8001c2b9be","beec49dadb","8531c234a6","49ba7cba49","7b21f47d70","ec9f3e36fa","ac59e0b2ed","6624876391","cc46732187","f51eb021ac","7c59993294","eae0b2a702","44b576b72c","e1c9d9699e","997c7f4c20","ae00327545","fc99b62cd2","a022f40465","e2089178f0","44b576b72c","e1c9d9699e","997c7f4c20","ae00327545","fc99b62cd2","a022f40465","e2089178f0","cfff8ce276","cbfc462463","33780131af","ed1d103fb0","b77424897c","5222a218f0","6a57df46cf","8c065d2017","881eb073ff","dd57420b02","33a11654be","7e922bbf88","14dc2e6e1b","e12540ab1b","093f1ad406","9e01205273","f05c7caf74","f007ebb56d","cff7d0653d","e633aa21af","67501fbf98","6fdc88bd04","af098410dc","6196448611","e9cd4042c5","4c4eb8b998","e50f792a7d","9c981c8392","0840d11942","0ec01bf49c","8bac993fdc","dc05d58607","e8be7f451d","55063009f5","5a1eea84ca","0840d11942","0ec01bf49c","8bac993fdc","dc05d58607","e8be7f451d","55063009f5","5a1eea84ca","2cb2638d75","58696117e6","61db1d5926","ca4dc4ff38","48a91db1d5","5281baa590","e2d363fb14","a73d2dc23a","9946a7a65f","ef2b171125","78a07f9314","3ac251c245","3942de20bb","493a84f46f","365ea5ae61","63429edbbd","37879b4e20","730d1c8c58","0230d0dbb1","8eceb76fa0","a0a27ccf65","4018b2514a","146ff58a2f","2fbd296c2a","6fb621d5b9","549b567de0","72c58f3e03","b760aacfa8","cc86a53df6","a0f8987cf7","f6b9f4081d","21d8a5ac67","043d90deef","9f8a5e4415","a844c33faa","d9f7750b66","62d2968963","a5ae8c2f79","455aa9ad53","01e952aa35","1bcaf5b7d8","84b6f6f40f","ad93d483ba","dbde2f52d7","341ae673af","03c8aa4fb0","3963b8d417","b4fc2a7335","f374b16a23","292187cf61","47b272c7b5","ddb71d662c","8dbe892b70","e08b0af26f","6eb2d21773","243b38327b","e1bd9faadd","1aaf04bef8","9b3a91437d","e4dea68a6a","98e09b3c54","e5b29acafe","08c34fbfc9","83afd90206","0eca817319","ce188af35e","d3904d5892","3da996c37a","15d6357d52","4ca623bb07","3022c4811a","6507fe07f2","7218c479db","58996b399d","2abc40b651","148bd0f1f6","3af1e86d4c","3022c4811a","6507fe07f2","7218c479db","58996b399d","2abc40b651","148bd0f1f6","3af1e86d4c","e0df98df8d","eaa43f78bf","c234ae117c","b82905e07b","3aac87157e","f8e9980864","edd6202380","e0df98df8d","eaa43f78bf","c234ae117c","b82905e07b","3aac87157e","f8e9980864","edd6202380","07167683e4","2179609290","b4f7b4d7d3","a671ce4bf2","52cabf0e3e","fcc790d644","462bbd5b30","a35e79e0fd","9a4c6f57e3","3cd31e10fc","6eea649b2f","a1d8fa4f39","8a92dcffcc","d51937ae27","02633aa33c","80992794c2","2ca18e6f9b","7f475ad149","7ed8b3f687","d4b573ea33","563884a791","3301fd425a","a771b00ccb","c3a0916407","8d40963305","7e043358bc","1ce01c3445","8c3f563de1","6782122a7b","943ebd39ad","83c212b529","4ed511afb8","49bbf29f50","2a10fa6409","54674deb7c","0c5bc45c9b","f31b69009b","87cf44789d","e0984eb225","236443373f","c06b0c0fdb","1a91d93a8f","0c5bc45c9b","f31b69009b","87cf44789d","e0984eb225","236443373f","c06b0c0fdb","1a91d93a8f","8a324b1a64","b90d55b505","fff77d944b","45fb7ec3f9","bdec608508","a8f2a6bba6","7b1bcc7ad3","afa6e1c8a6","741448ff31","ad00f9f7f7","1c101177ff","50241d6f35","d9d7476a29","8e9faf2982","47a034c209","5fdd629f80","262945b04e","a82955caee","82b68140bc","8a7185fcf6","207f3f3f8b","4b94177153","e003e01f2e","2365306ecc","89f8cfdf06","6dd4b611cc","d8c37c5311","e88b409690","2128e4a653","93029fc257","c8571169c7","6d6c4c0ba5","56d61e4383","c0359a2248","6585d3cb7c","5f446a26e0","488933c430","9cc09d4e73","33bfb6b6f7","abf4beac2b","544225f568","7e6969405a","6c14de1241","3c664c9417","58eb632c97","e2b180254c","06fb9474f8","eeea3ebba2","882da34896","0aec404992","5d8ec8488f","bcbb9acddf","4fbf7fe2d1","c4a7977cea","0cc35e8dc5","08c7fab137","0aec404992","5d8ec8488f","bcbb9acddf","4fbf7fe2d1","c4a7977cea","0cc35e8dc5","08c7fab137","37ef591c8a","12350e9068","eea38d95c3","0f0db10c5c","9f062815c7","a71549af0c","8a9b28aec8","437eef3dca","6aa69f0c5b","7dc1147f84","0ac670e560","d424c52075","9ac5cb98ca","39b094f824","3bf02b713e","bda41bb1c1","282dd3129a","d7b683bb28","12e3be5305","6862d27e23","e5bd8af651","3cb2b0b1b8","aa32a5f616","e0aaefbfbe","f3c34bfb1a","ac3d36d6f0","aab2fb33e4","3631110b5d","00db6e23fc","9e4ad6ff80","c1cd54fa87","ada42a3357","c79be5454d","184c183a57","6954fb2df8","997b29b303","7246caad49","12722dca85","797d3e5005","370b62429c","aecfb623b5","36386f33c5","886e8e7ce3","e4ae954f0e","9c195e8f4e","fe52a0580b","5b26b6abf1","e972529bf7","13dd5e529d","ff366da964","d1a167fdf5","06cd0a42d5","c121255079","e08050d713","98f517ee95","d529cebc13","c18acb394f","a08d57f1f7","c7cc26b86b","b04d19486a","d558d0ec24","f7b31c1937","4f5e43cf23","cfe3435f1a","4b4e99a337","de4bd4d18d","5c2420c7be","129c04758f","97e0ca4cb2","3b12b93502","d1bfb50eda","54b901d8ee","cc087aefda","73ea5d44f1","12873ece11","b8d87bb8f1","3aa034a220","d1bfb50eda","54b901d8ee","cc087aefda","73ea5d44f1","12873ece11","b8d87bb8f1","3aa034a220","7d4c8f7313","da80f1712a","9432e573f8","6c7eb9fb5d","e76c60f888","78e14c5013","4ce3e58a66","15e1185e7b","95f20c7eb9","72b3098ed2","60e9a78354","0df2513489","d1e3d76439","4dc074eb37","f065b47587","0059b6fcaa","86e54038c8","1b4adc54ac","5df33042e9","df68d9002e","3ee2232543","b784845ef1","399ea06c82","5d4fb70622","8fd8858fcf","918599d91c","230b15c4bf","ff16e7b15c","75d416f7ba","848d4aad1a","efc15ebb6f","777f541b6f","a6cebe7df9","013e731f2a","70c8a4e5b3","e398d21141","d9ebb5c9e2","5abc7ed55b","8d4d5a9704","54a9365b7d","395e7a6094","9faef711b6","e398d21141","d9ebb5c9e2","5abc7ed55b","8d4d5a9704","54a9365b7d","395e7a6094","9faef711b6","4f698ae1fb","ef4e474b9f","dfd8c7166b","d36c0c2b58","d292301091","b1cf2d92a9","b3e68a6f48","9fdc85790c","6287c8e757","51e5c63478","97fdd37c47","07124b3ab8","3f14bb90c2","2966648a1d","7f9392c044","fe782d585f","d08b789aa1","60a9b26cb5","2ef24e8684","887181688b","51180d1530","4f698ae1fb","ef4e474b9f","dfd8c7166b","d36c0c2b58","d292301091","b1cf2d92a9","b3e68a6f48","4205049708","4c7ed6c2f1","8734ded985","d0bd80e4a1","d7d1c25bf2","e1de0c53a7","a77fdd203c","9fc5e0adc6","7e9b83bd13","a4d4cc2fa3","bed1870417","0ecd5ac6f5","78aae81161","9e992639a0","578b623099","42bb337916","e52056113a","c4554a5568","a5d93eea11","1c9be622a5","9040cff511","8c7af48aec","005e3b1fcf","fd943f4012","17fa88abab","cf479e4452","efb8a1472d","19bb15608d","3e03d5cd31","03b9614f26","4be2562a20","b77dcd53c9","8d39c0aa2d","af4c0df602","333f3508d5","ab35278777","9477d8a0b3","5eb1a0581d","c65b89f636","ed5a86c7dd","f63dac1cd5","c857ed6fce","69ad3077c1","b0946c4585","d914db6583","00099105ca","12f95d2f2e","8eedb7e082","52a15d26a6","e6d77d02fd","5e59bfe825","7d05b898e6","dd9a396b2a","c487c0c12c","4e69083b33","7e6135e5c0","7b712c0b83","ed6f9d2a14","9237498251","8a2f03d128","1b81fd69ff","38caec601b","f83d53e51e","9aa04accb0","cadaa3644d","5998e7ae0c","a0cd2d55bc","4602fe2c16","9472e53251","93fa05ddbf","da838f3e16","e0b4aaa253","105a57ab3b","778ff4d6b2","c7336e3bf5","ee3336aac2","4851df9c92","da838f3e16","e0b4aaa253","105a57ab3b","778ff4d6b2","c7336e3bf5","ee3336aac2","4851df9c92","5cf305d4ca","6f6df000d2","f3002465b3","99fe89ae23","8f51a6498e","292ce55401","7faa15f673","5f35ec49ee","df64368b28","330460c00f","251ac8ba4f","3c0de27afd","c3c7b7be67","954c9d5612","75bd55af15","8354f0183a","ce23d3d387","fbad72862e","2e20aa46df","13e7fb43f0","d92e34312f","869f0b5342","d80f0fc1a7","ea84efacf5","2ba2005dd6","9b1dbc881e","962de0e7b4","4d0d4e760b","4b9877e476","f798229dd9","c592621a1c","a08713935e","e65b930638","57daf062e2","d2ebd6f7ea","1435876565","0da35c4050","4a7e73f3a0","cd8ac54c3e","3d1853c320","0a118d93d9","eaed0b830e","c6e9bd0625","1e189be956","44cd2d3ab7","f03cc934e4","39891ce4e2","9f4e9776a7","d7e8aada05","36ab98f2b9","b542db6fea","1058fd29dc","6dc210fbee","f6ca37b72e","8447a0a0d8","c50d42b751","e797bf96ef","5943a78f37","0ab0bf1049","c1731287bf","7c5d27958b","4d5aab163b","64e1cebb93","41f9d49461","623ea7feba","5a678045f2","754d317bf1","13c30a03b0","f582330148","852a20a8d2","b369293662","175dfcdb19","1d75becabf","eec3b3cc65","e48f3c447a","01ddc88f6a","bcecb6109d","f9fb61512a","92223b2fe2","09cb55c4ed","499f218384","3f25b22339","77db80b760","3c65919a09","6e37430d54","7739c97310","c9d29713ad","2c7ed064ba","01707a682e","6578385ee5","d40268bb4d","f4e2f2f660","bb38ae7b4d","bbf9580917","0d2b154181","b0ff43ca92","3e9f40c84e","e195671b18","df58398d20","d4f0ed9da8","67e5f1b379","4c698420fb","b41414812d","6d18089241","319f9c2248","869f0b5342","d80f0fc1a7","ea84efacf5","2ba2005dd6","9b1dbc881e","962de0e7b4","4d0d4e760b","9aedf55539","0dc8163b3a","0be7a74d10","dd2bc7b26c","870a4e5736","2ddbb4fbe1","5a8d40bd8c","9aedf55539","0dc8163b3a","0be7a74d10","dd2bc7b26c","870a4e5736","2ddbb4fbe1","5a8d40bd8c","8a43f6d009","b0ee19be72","dbc2edd7ac","1a0471072f","aad0e770b9","b9606521a6","990d277217","79fca53903","db3680eb18","a58a53719d","ab606a3dc2","9d0726d3bd","a6c0734a2b","050963bd57","4bf3e51d56","6bf2a03d13","09faea04e3","793a24425e","f25eee6b0b","91761f44f5","d109c8eeaf","4bf3e51d56","6bf2a03d13","09faea04e3","793a24425e","f25eee6b0b","91761f44f5","d109c8eeaf","6ab77417ba","1183dfea04","f0da50b931","88c9eee494","3465539c83","72e3e2e4b5","bf439bca27","d2f7893f96","d0b59fd4d4","6c212e526c","6093e0a9fe","cae30cf86d","f3263d62a3","946d26abab","cef9b4e9b5","d766d9c18b","34dd87f21c","4eb4523b58","2f4067e3d2","c6f9691aac","e1d8aa4213","fb09b1675c","231e203dc3","91162495b9","cec16e9dd4","a61f96ef92","e3fcd6fc14","874b3bc131","c89320f9f7","0336c7fd14","18aa4831f2","8df440204b","a9fe2617e4","852a5a422a","485e362ca0","76432a354a","f219e3554a","607670f826","70c30fa973","f9d51d2030","49ea8cc46c","c5c7a8d817","76432a354a","f219e3554a","607670f826","70c30fa973","f9d51d2030","49ea8cc46c","c5c7a8d817","5a130466a7","e9b6c01346","ba6c696ef4","c6e3661b83","f3512dc94f","9c39506421","4dfd502f7e","d93858b64d","49f12d0bf4","7bbe415f10","826593a126","91602dea90","2c2173f27e","6841c63791","f1911ecf9e","55b24f107d","4b49f0ed7e","bbdcb6625f","d5bc577f3e","9b0a4eae12","fdc9a2cc70","f1911ecf9e","55b24f107d","4b49f0ed7e","bbdcb6625f","d5bc577f3e","9b0a4eae12","fdc9a2cc70","3bdb97fd6a","8313879a9f","84fe458464","714ef22c94","155290c75c","02d4ddfbe4","f915c52b57","4a95c05fea","18fb21c3a1","c2e8254688","a4527d853a","9ab0dd7ede","9168b340c5","6aa4a27545","404722d256","8479aba23b","4b4f811dd8","75734248ce","e424a2d9be","129fc10e24","ee9a1f88d3","4a95c05fea","18fb21c3a1","c2e8254688","a4527d853a","9ab0dd7ede","9168b340c5","6aa4a27545","ea5cdb4ce4","6440e1a654","e3303c041a","8c9b8a9f37","312e3dfd39","5c3470aa58","431e8d4348","422ef4c666","8579005f2c","244a387a4b","3393159fb8","73e9f49743","387023ad96","f8ee734b8c","e2f2e3e06c","b9b0de57d5","d3f96c4e36","a9c545abd8","f3e1067c61","5eaa95701a","6428f6a863","33356fd3ea","85c9c71f5c","e6afe29844","1e38610ad0","e149b1fb13","d962ff8d75","f3e1939278","23f0146b1f","4ff77d959b","6fb76bc074","bf2dcff98f","ddf38738a8","146c6296c1","48a29af34d","a8f803d1cb","7494548524","0741c286f0","b35c0e4651","9a282dc85d","4736a38568","fd6ef0b8ed","61b48534fa","64243d2a33","7d6bca746b","cdaa07a7fc","6d47b0efee","6f357bb17e","fe9f72363f","61b48534fa","64243d2a33","7d6bca746b","cdaa07a7fc","6d47b0efee","6f357bb17e","fe9f72363f","ed82153d00","3d34037367","537fbb9549","411066983e","31d0d02835","53f42fa9df","5796704682","ed82153d00","3d34037367","537fbb9549","411066983e","31d0d02835","53f42fa9df","5796704682","0876bca9d1","2ccb46c825","ccaddd4a52","a449611308","64b1fdbb42","fd11d851f9","30a360ffef","c091cac449","44e93f5d1b","e68e7d398b","651dfabd8d","d0ca76f25d","2ba093013a","0e6137d526","b059ceb287","5c2c707b93","ef4016f678","660415fc37","6383e71097","4672974d69","26b7e05a46","c091cac449","44e93f5d1b","e68e7d398b","651dfabd8d","d0ca76f25d","2ba093013a","0e6137d526","1e07d62d58","41d73a943d","9df1a7be8b","67e54614ce","8757e0b77d","5b9b79029f","fcebcc7c9f","4a77ba46fe","9f43d2a5f1","cd10efe59c","f6ea776283","f39d4d09eb","13cd6d7b16","0907d2f5de","543335ff65","c60ddc4616","150fa2f9ef","424ad8fd81","6299da77c8","6c1958dd27","ef1700304a","35e36cfe2b","a0b9608259","aea2009118","e363e440aa","e5aada3989","d1214711a8","3b155797ca","bd1b7a2dbb","4f394e22b4","242aba5bce","07a0e3f111","eadfbc3445","e1db7da80c","f3ab891c9c","6362d3b288","d8ed7aa158","2f8577bb79","640e873bac","47693398b2","7dcbaef5ae","7ee8afa9ad","f4acc448e6","3f032c892c","4fabe524bf","616e291e3b","75668e9dec","5fe15b87cc","8a02bda09a","f4acc448e6","3f032c892c","4fabe524bf","616e291e3b","75668e9dec","5fe15b87cc","8a02bda09a","f0c7ea33bd","3eedf2f0c0","a48b1ec2d6","20d99a53c2","55947ffb0a","7ce6da128d","4277d8126d","2b2450a145","37445bd2f3","89d73af128","5f7b1339df","a7a3b20adb","54d1772d5d","64194bf7d5","d1bb4a93ad","5b8f9877fb","146588b72d","38ddf6046b","fdd092cd56","3281521bb3","e585b8b2d1","d1bb4a93ad","5b8f9877fb","146588b72d","38ddf6046b","fdd092cd56","3281521bb3","e585b8b2d1","623f25844b","5354783577","75f7a6ed82","d53e01cdca","fa46b314dc","12b8a8df28","345bb05a74","623f25844b","5354783577","75f7a6ed82","d53e01cdca","fa46b314dc","12b8a8df28","345bb05a74","9ad7346429","7a11056453","6b08366ea3","c1fb0978dc","12eff649e6","2133778b2d","caa276bc5d","5dc36ade7a","edf4ced231","081ee48870","b20a54fbea","27c6f9f519","fea45610a6","e3cb77a741","c303043fbe","e407348ae1","83b72052a0","1dec5640de","f1efa2e045","e46594b783","b12d69ca38","d412aa6c51","6bbaf9c0fc","b1c9513593","da88e125bf","55d2206076","5bc1050df1","d5f1a7676e","c303043fbe","e407348ae1","83b72052a0","1dec5640de","f1efa2e045","e46594b783","b12d69ca38","c303043fbe","e407348ae1","83b72052a0","1dec5640de","f1efa2e045","e46594b783","b12d69ca38","74ddd7cf16","d9987b4a97","137b76221c","c5c3179f22","84b9aeb535","62361d4eec","761aa059c2","fa1ab5c4cc","517ad708ee","5f16ee13ef","592109ae55","111088047a","b03d472ae8","238c711c4c","c4ce500b45","7f9a3536fb","9430f7c84c","ec2c4b6fc0","03adafd956","c8f2bc80c0","1deca210e9","c4ce500b45","7f9a3536fb","9430f7c84c","ec2c4b6fc0","03adafd956","c8f2bc80c0","1deca210e9","f425d5fd58","4b0388d68a","ce28a5976e","95861ff2d9","9da62a10d8","576b5d6688","74dde85121","ed43e94ba4","edf750accd","ba1191b331","b128315e49","ec2993da5e","0fcec33075","11e1e61a1d","ed43e94ba4","edf750accd","ba1191b331","b128315e49","ec2993da5e","0fcec33075","11e1e61a1d","263c0392ab","331bd3724f","59c95099d8","8fa7d4d88d","637aa1bd76","e4aa9f1812","12ae7ff4ae","c013dc24c4","dd9819de8a","1dcb7f5d4f","fa95161b35","6565a51e87","2d04b030b9","b6d4abc975","2ebdb0a6e4","7fda38612a","980da7885a","aa211aaa98","ae2cbb2dc9","932a19aee0","f720ffa65c","d504b3ade0","f942509dce","d621aa37e7","663cd09faa","688ad279b3","3f458a3109","8d284c0c09","d504b3ade0","f942509dce","d621aa37e7","663cd09faa","688ad279b3","3f458a3109","8d284c0c09","60f2ddeb00","32ca973b13","c966ee7817","08393e156a","88b1af116c","51119da2e5","91b083af5e","60f2ddeb00","32ca973b13","c966ee7817","08393e156a","88b1af116c","51119da2e5","91b083af5e","a48b748fc1","d5f09b7903","bee8939c63","d50aaea12b","6b42e97de7","fb84c577d3","30d018414f","69fd2039bf","ee9e16736a","6a42b787ed","62fa4f2735","417491fd71","431e1dc7d0","3458fa40d2","8388f3074f","e31683022b","a91f7d4795","31e8f11e4b","f5147e7606","11b0dd8757","4bf5e7d1b6","f3dac3fc9d","0b4f222a21","0523331f13","933568e0ee","45ce1e9bbe","f659c730ac","32b0ef6125","ec4266e17b","3e0f4d098b","4dec34118a","fc0c6a5c3e","1ee829249d","f88ebfcdb8","61207f9936","b28908c887","888342ae70","d7e6ecd07e","e354f36bf2","9856fd513c","41556bfa61","d9b4ac55d2","0aa10f5a8e","678140da47","49ad45ed1e","031a0ecce3","163e0e9a1a","7fe22e9fb2","5de40f3e28","7678956759","942a3cc8be","6d97a62cc6","d0ac4a6bfa","48298064aa","b3be962e12","7ef669c8d6","b331eb6586","e0e380eae1","36a3543d0d","a18b55e6c2","1fe6f58a80","c22decf34c","d718fd4f92","b967a26dbe","fcfb6b5cd4","a9a6d6745a","38f435c7ae","e400210927","2aedf18d42","eda4950d52","b967a26dbe","fcfb6b5cd4","a9a6d6745a","38f435c7ae","e400210927","2aedf18d42","eda4950d52","63c055f342","d0ba99db55","dbf7333120","5e6531504d","2443749f80","2008b368f3","d0ada8560b","f01f55fe06","af824ac77c","9fc2dbe9e5","e025212f20","bb1a450e12","b06123a869","ca31330095","ec4266e17b","3e0f4d098b","4dec34118a","fc0c6a5c3e","1ee829249d","f88ebfcdb8","61207f9936","ec4266e17b","3e0f4d098b","4dec34118a","fc0c6a5c3e","1ee829249d","f88ebfcdb8","61207f9936","ff8ecd5391","9c2ead9c2d","f2afdb3639","82cf6cae45","9d1f205aa2","fc4e2d6c04","f4f76ee9d0","ff8ecd5391","9c2ead9c2d","f2afdb3639","82cf6cae45","9d1f205aa2","fc4e2d6c04","f4f76ee9d0","fdee48fcf2","398d658427","5444ce11ac","2e43fc9ffc","c25ed8f952","0b2414e0f4","8891301e40","d33c6dad3d","5f51aa0941","2eed5c49d8","a489993196","6848456386","adc2deceb3","db256722ea","d33c6dad3d","5f51aa0941","2eed5c49d8","a489993196","6848456386","adc2deceb3","db256722ea","11a67bf127","ff456b853f","91928ac7f2","9eae2e5470","b2fdc2f514","5c1922294c","c5248b1628","11a67bf127","ff456b853f","91928ac7f2","9eae2e5470","b2fdc2f514","5c1922294c","c5248b1628","19b175b0bb","c6fa6d3dd4","6d2ac5fb27","ce4c23ae99","4f8b7b80bd","f2cb159f28","d0a4ad1429","a0b7af65d2","2a85976dbb","e109139554","4d80257c8f","9242875cf8","fe0f4f6fcb","74a75ff086","d0009334d1","f5cfd30cb7","8a1b814ef2","acc22b0954","a49a8743d9","19279167a7","a6bdbbe015","12e5a7ce24","b2534e4190","2e410f46f0","c2567c1b6a","9ed33c3488","ebf7267e79","2a3f5a683c","6881b6773f","c6bf7ff6a3","492fa8a90c","390fc08472","9533b5d319","2c94876125","6c6b9bceb8","141c7fd42e","4ec718de97","c525fbf11b","254f80bc0f","4fd9c99f68","10f38a876c","7ca75f2f69","c49a59f273","64984b1699","49440aee35","3f93977b5e","fe75c3a010","d8d71c1c37","b88124e96b","58c3c776d3","296f354c4d","0577d412f1","4eef9f78e7","7bf203233e","3c9517fc1a","b38524a9ac","12e5a7ce24","b2534e4190","2e410f46f0","c2567c1b6a","9ed33c3488","ebf7267e79","2a3f5a683c","5fc29c1b2d","1bf601b3f4","256173c05d","e7f5892a9f","40627f7cf3","130d5ffff5","dc9996a780","5fc29c1b2d","1bf601b3f4","256173c05d","e7f5892a9f","40627f7cf3","130d5ffff5","dc9996a780","9163e5a07c","e9d86c4586","55b4d939d4","5d744bb958","78345ef0bc","2da529b361","75c61317a1","f8e98df357","bccadf1934","2a4727baf1","a2d2e82be5","eff99b92d4","f46ad1baee","53c2cc6790","11c0e70a74","f02b1d33bd","33b6f80445","d10ca3d091","6c45ad2d03","603db25132","1f6bc61598","3160eed143","07ec8f80df","6b435fd7e2","c91af30b70","e305b59d21","6c9743bf4b","f59a063dee","11a8c44c77","c3cea64d4a","78322259ce","dac761fae4","9966842dc5","69f52e9ab8","17c12ac349","434b8a1038","c5360f6464","6b26546376","7702a0b005","260c47d7f8","8a55dcc2e0","ed7b2b6e16","434b8a1038","c5360f6464","6b26546376","7702a0b005","260c47d7f8","8a55dcc2e0","ed7b2b6e16","57791b40ce","b63ee132f5","19e3127bad","7bc0c590eb","313d00951c","788b9aa684","a4556a388c","bf004cb5db","cf0825c7bc","da8b593a88","3548ed37e2","488a5da5c0","b9e4bbdded","827044ab18","ab9c7b7753","5d97cca9be","f9ad9b7f12","a27113f990","28dce78296","c6cc065e53","569e8fbd91","964ec9be2b","d38bca1037","7f56b5a2d4","d6108b0171","eda45dd8f5","7055abfb8e","de25c8ea5c","05a9e2210a","c0c85eadc3","d29bf1cfe7","7150706055","3736b5c3d5","0765a4bf3b","7e4d694dfd","18dfa7feb3","c5a6fa8f89","926d0f24fc","9806b79153","c06f9c9159","9ac485ccc7","6fcf7b4ce0","11a3494a27","529323522f","a57d4294e8","21daecf4d5","1a8592eb0c","1aa7c46780","94f73f89cc","29cdd4c591","062da84bb6","fb8ab9bb11","0dab82fcc9","6005268523","179fe3f84c","bd0386639a","76fc7f8501","572e317b84","d25da56cd2","740bfd9733","cf91de2c3e","5eda78a1f2","408c7928d8","b68bc6fef0","57c2235256","e16fdd9956","3e36906ba4","0854ce122f","e48be01d3f","5798dc546a","a84681e2e9","9bf30dcd40","eda40c69a4","25923db382","69482800c5","68163e218d","efde66b0e2","9d918d8a39","01e01261d7","0d6d2dbfbc","cfc104629a","69640c659e","43c5ae8ba1","ddd8898680","3e19e3a3e4","18180fffb1","4daaea29d0","1094e3e696","262f01ba5f","2a0a7a42ee","a734f79ee4","3e19e3a3e4","18180fffb1","4daaea29d0","1094e3e696","262f01ba5f","2a0a7a42ee","a734f79ee4","bed6992ae6","e17d0cd360","d4f727aedf","4748e874cc","8fc8d68b22","0afc86c20c","263f11603f","7eea69ccf3","d93d6f3270","d860dd0dcf","8d58b55f79","1ce18aac7e","23972ac15d","8774c6125e","faced33fba","311506fd21","f7dbe294f8","751fb6d611","1831189a56","464794d0bf","924ff5a708","771e6aa90b","22bb091b58","09c1411214","f0202598da","aea7d43c87","47395d0550","5c1e6a7067","183f52bd43","9b55a0f34d","ff9c4bc75b","a86fbddea4","2d94154c18","0b445eba02","0e400c49a7","e7b3962a3a","a2d11c9e14","ae967f857d","47cdabade0","abc5a840c6","e4379c1247","e2380e2ffe","b55df2073a","39fe532180","af870a9c2a","6b207e2e1d","8121e87372","f062c98931","bab4e38d77","b2c2b62482","80f698adef","b8fafab9a4","8af7dfc958","213442f09a","95b4173e89","4be2f47d21","b2c2b62482","80f698adef","b8fafab9a4","8af7dfc958","213442f09a","95b4173e89","4be2f47d21","57b4c15846","5c77996e71","74a29c25bd","05e309470d","bb1b66cc31","a7cffa6160","c59eb738a5","6fff9372f3","3afdbda942","b155c1704e","a1db72f586","ae89178eb3","1b6550a525","650703f84c","471adeb9e1","3daea136bf","2fd30b58e5","b621e42222","3f5034fb74","70e4b10929","f9551667cb","592ec2b0e8","e75374ad14","594368b73a","2917ed0c11","1960c1e3d7","f10c8da6b0","be740797dd","afa5830c8d","20e5cf403d","43a2f76141","d5e9cedd29","367c3a63c3","3dcc41e787","2379ba8b57","c941510e49","3f5bf64b0a","a63ca1b53c","e978fcea31","a6950692c4","dcacd7c418","5ab065730f","b72b0ad849","9eecc627d9","1df821927c","2edab166c3","0457f8bf16","e59d55cf3b","6714bd1492","1940216ee7","d2d61f22b9","6aa18422d1","b769d2d8e5","acaaaee0c5","2cf2d46475","143fa2c76b","afa5830c8d","20e5cf403d","43a2f76141","d5e9cedd29","367c3a63c3","3dcc41e787","2379ba8b57","b993d3b0bb","b40a61051e","ccb5049219","6dd4aa3e02","4062bc0284","45b7a7e7e1","f073dc3f3f","b993d3b0bb","b40a61051e","ccb5049219","6dd4aa3e02","4062bc0284","45b7a7e7e1","f073dc3f3f","b7aacf7df8","cd12f7cf08","19261081c0","4b9f79437d","bf99b50d97","c8a3017c1f","1ab7872d59","7bc1d706eb","8a119b63f3","b022fdd17f","25ac3b6a0a","2db189bb6a","27e8a68ef0","d9e378b5f4","c97660d5d5","98cbf8da19","1e5073fbc4","f5765735b9","657645befc","fbc466060a","a69e643539","c97660d5d5","98cbf8da19","1e5073fbc4","f5765735b9","657645befc","fbc466060a","a69e643539","9c554a6b4a","a4d53c2187","7d75004098","b5c0ba43ce","c105688cc5","f6a06de059","d41bf38f04","21f68e1b64","4ec0720183","7b6f348153","4f654e20cb","3f7fc4456e","5f96f98c90","ae5621590d","4390bf9f08","266a6a62d1","3d5720f791","4e89aebcbe","e602fdfa79","c5c4ea3e48","ba5f3b06f6","4390bf9f08","266a6a62d1","3d5720f791","4e89aebcbe","e602fdfa79","c5c4ea3e48","ba5f3b06f6","2d3eda2873","7d36af65c3","b33a767e56","f2105e4731","aae4aa1ec8","e4a59e5a83","d3b331937b","8c763f0167","c4dafadacc","9c948516e5","b62c167049","2be3234c99","eb56e1384b","4543677250","8c763f0167","c4dafadacc","9c948516e5","b62c167049","2be3234c99","eb56e1384b","4543677250","2589f7958f","97ec7d1f42","f76ec2f9ec","1d431022c5","ac203dad3f","bca53a99ef","33b51f6cbb","998a430ab8","327ec7adb0","70b40a9936","db4bdd3b69","8ba1dc6d69","f0ae2af8e3","b6e95cf147","b46ff70eb7","734ac9333d","d6217f2db8","9c5360a5d1","4f80d9a67e","2b39d187aa","1193a22695","36f17fd706","a656fe0fae","67a0082403","3ac522ef79","bc4ce352bc","55600c3c9d","3fe3f041a2","caee6eee98","49780b7f90","34380c74f9","380d3890b8","02356ad3f2","bbc906ff06","0e27515c08","b46ff70eb7","734ac9333d","d6217f2db8","9c5360a5d1","4f80d9a67e","2b39d187aa","1193a22695","b46ff70eb7","734ac9333d","d6217f2db8","9c5360a5d1","4f80d9a67e","2b39d187aa","1193a22695","d9a09454d2","c4770a2c0c","45bedba054","d32bfb074a","29920bf9a1","84c4ac72f7","4ec6c8e6fe","86dc4c4703","0049d1ee93","d73b7738f7","d2fb209b09","19ef1811be","073da8057e","f5c8cd23de","c322079e94","ea5ae3248b","29c6faf08c","1a916aefce","2abe5d611d","663a480780","cc444ace24","179f97e9dc","dc0baf9637","dd51e0f472","8723e3ecfc","a1512df0a4","ccd8aff9d0","be26bee068","9706f8bd01","875530fc7a","01a41f0636","95e67e7f02","0aca5a48d1","b2af3b5a7a","ec607a2a6b","f2aea26f07","f3af06883d","f57c3b5886","c2b6a60030","a8aff95616","6c66ff4d29","3efc669a11","6c4b12a9f9","4ef3540edb","5f56bc8e58","014667e1d0","7e4955b8ee","ff4446f9cf","4cc55e2d80","6ef4458731","359ac6fcbd","f6fe756d36","8663d7224b","1c8d3d02f4","98efbab86c","3014f84245","07df6700f4","b5c2aed3a2","d06f73f084","242f294e3f","7338196adf","06c0df399c","4878da783b","86dc4c4703","0049d1ee93","d73b7738f7","d2fb209b09","19ef1811be","073da8057e","f5c8cd23de","9bc5063663","a8f5398bca","4069d39674","8fa3bbce35","53da0911d0","d08c2be68c","234fd3ae53","780c695fbd","3c99ebcde4","311851787f","fd0a611dc1","7e1c1f4b94","ec024b766d","5759c1f1ca","d0b2ae722e","398543c5cd","8277cade6b","66ce858a74","bfe94abdfb","07e553a455","6c67ed8a07","7a0a9482fe","591b1b093e","cba786c8f8","406bfe3236","3ebae516f4","347c33ae3f","c5eafb8a33","d428cff8bf","1c2bec682d","34414d0f6a","7460fcdb6d","5b02118de0","376c2240ea","a7d0b71ee6","d428cff8bf","1c2bec682d","34414d0f6a","7460fcdb6d","5b02118de0","376c2240ea","a7d0b71ee6","ac8b1f186c","2c51f315ca","1a8655d541","e2a88cfdb1","b95a7642ad","ce2c0cae1b","74d23e05fc","4ac44ed9b0","679a3e9131","cf87a2a939","bce694caef","7f4696012b","e3e64d5fc2","f09e27dd44","e2060876f9","b2ce0436a5","6f1e318c8f","efebd73d82","37a264283f","6795a4ac4a","7e2b806060","3a2e37ce95","e289621218","b1625da3c8","181b8a1a0f","8911ddb4a6","cd0f9ee56b","f0162f82cf","3a2e37ce95","e289621218","b1625da3c8","181b8a1a0f","8911ddb4a6","cd0f9ee56b","f0162f82cf","7db460ce97","556b43689d","0f55fcf5b7","f115b98a22","3310587d26","2feb43ab30","f0fe00707f","59fec527d4","6084419ab2","65880dce1e","ab482a10f2","4a171e8d8f","f454294bef","51a61d216e","e9aa0c4134","0b5ea1d382","0674c0d5c6","6718944780","142d4ea950","cd6693aa3f","d70070db16","a2acd03c96","6976d354ea","69734a572c","5a0ff43ace","f374e37f80","6e937a4f55","48dc79f3bb","0d108400f3","ecc36e1664","746b1cb215","e56de1682d","49b7696a70","e559981894","40c91394d6","961988683a","38c2355883","1d59146824","44bd1035ca","8d980175be","d67037d4af","a794b4f233","961988683a","38c2355883","1d59146824","44bd1035ca","8d980175be","d67037d4af","a794b4f233","27cec0c3b4","36c2f15446","945911c926","50c3499e97","d050c6ab4d","25d0979a4c","00b5f3b1de","a0f7382d77","bf87599cbc","c79a6b3c42","47c64d66e5","ba7ed939f3","f2ecfcdafc","76a9e51f30","6b9a0ca19d","b82dcf4121","09fd95869f","57146596ad","3d134def97","7211d6653d","ca9dd85b02","f33d4984e4","639d028682","6ba39805f8","e1528b60ed","d204cbb4e0","2803f1ec35","b0745ce3ba","4755afe1a5","f7e0437188","1f14c18a58","22163773af","1590d37b4f","d6ba1aaeb1","fd9f61c87b","cbcc7ff8a5","edca41e069","fdb8439b83","0b09c7cefe","8a144ce365","5293ecc8e4","dd4bbc5095","cbcc7ff8a5","edca41e069","fdb8439b83","0b09c7cefe","8a144ce365","5293ecc8e4","dd4bbc5095","cbcc7ff8a5","edca41e069","fdb8439b83","0b09c7cefe","8a144ce365","5293ecc8e4","dd4bbc5095","d0d4b0f72e","b83d866622","40d10745c2","43088d9a7c","c15c95fca4","0426b7d737","141cba676f","2aa76b7dcb","f4e868d9e0","856b09a5bf","c8b1c37d68","0a19fca8ac","520a13d5e9","570f741e88","5fa8034c8b","4b4d8f296e","c7d0965686","22a6533193","c14f03c381","8541916b1c","bfcaa6c733","d7d295c8a9","33931cb94d","ea5f0bb38d","24d3f409a7","a59e062543","6ecc9abfbb","63eec52301","d7d295c8a9","33931cb94d","ea5f0bb38d","24d3f409a7","a59e062543","6ecc9abfbb","63eec52301","bc1f9cbea1","999ad0575c","677f364316","1b0c1e968c","825bdb9920","7bac9ee124","16fe3ca38c","46fe7855b5","560823049e","0b66730764","d64276a83e","f1d5f960a5","30b3909ded","6c1e1132ab","4dd3075222","707285ed61","30157e5fc0","fdf39aa7d6","cdbf96dd01","c3150021a2","4bfe34e891","4dd3075222","707285ed61","30157e5fc0","fdf39aa7d6","cdbf96dd01","c3150021a2","4bfe34e891","701b34dac1","9ae13e90fd","18f6fccfe7","944bf90dd9","1c462323f1","9be51caf45","24dfbbfda9","c57d8430ba","129b5aac88","ae37d7217b","6fc5c2ba29","45602be2f7","2022c7030f","40cec8d45f","c57d8430ba","129b5aac88","ae37d7217b","6fc5c2ba29","45602be2f7","2022c7030f","40cec8d45f","7ef9f4d7c8","3550eac2ff","e9039702f9","052ec86f3a","58038b0299","900aadf1f7","74eb10c4d7","c75700a47f","bab958a79a","6a82a33520","11a7e65a0b","284ece40c7","b63ba1dee4","76b433546a","c75700a47f","bab958a79a","6a82a33520","11a7e65a0b","284ece40c7","b63ba1dee4","76b433546a","46228dd563","9fb7cf573d","10104d5683","ae7bee6c62","dd8a95a5d2","6f8f76d354","4b33eaf620","48e3ca7054","435d4393c4","3b5b00a4b7","e4e57d2421","91b684904d","dd3dba7b0d","b3b5c1e805","bfb17b3c1e","31ab353aef","4158a0ab27","c83a543d39","8bb363da6a","c9ef24b647","fcabfb7691","b2f3ae475d","e46c44d68d","76b55ad893","5edf1161e1","8382b25648","2a23f1c54d","cb63dee3a4","a0d3b58591","ae30050ac5","53713a584b","0b8e19c4ab","0a4dd5ae4b","e457268a15","e0b40b3a60","0734f68379","a01f508905","fecc40e6bc","bc643a669b","b22b27d4dd","3b90847c56","964118e4b2","db9cf28230","f18dc19862","d5d1125a90","41e32b2c28","fc538c1074","70ce48a64f","c1f86174eb","ffd989ebec","656e35f9f8","c2450a96b9","7a8f18b2cd","3d20fdc703","16dd751d93","cdbfb07161","a023fd9ddd","b47d58298e","e6b2a94e57","4da6b4d008","45aee2a4b7","7d125f4577","5b18fec671","bfb17b3c1e","31ab353aef","4158a0ab27","c83a543d39","8bb363da6a","c9ef24b647","fcabfb7691","1b6b6f86fb","27a3236c45","5f58b9c5e7","54ecc02d5b","bdeee737f2","c13d6e4c76","e5a5b16ce3","8d04a4a37c","45e12a309e","ca3f53170e","f5e454549f","b54fe79038","5f5ff30a94","8b747d98a6","87033f2520","c776009200","973cca6b52","0df98ac8ff","567d0f3020","355332167f","36b4e4168c","3915a0f097","22a2a8d37c","497a966a68","42743052c4","e91c3f3c73","26406c99f8","ba65e76e57","3915a0f097","22a2a8d37c","497a966a68","42743052c4","e91c3f3c73","26406c99f8","ba65e76e57","3cf2532234","e6de53f35b","7d6cc60746","a839414d96","df57c79246","fd5a73434b","45ca7c3629","3cf2532234","e6de53f35b","7d6cc60746","a839414d96","df57c79246","fd5a73434b","45ca7c3629","6b54d968b4","8513e0094b","57b9d627d7","de89691ce2","3ab643b404","4edc250286","d005b850b2","6b54d968b4","8513e0094b","57b9d627d7","de89691ce2","3ab643b404","4edc250286","d005b850b2","8d60d67199","9a40040745","1910829c6c","9fb0ced3dd","f5cd38c7ad","aa2275a253","73ea86ffc3","8d60d67199","9a40040745","1910829c6c","9fb0ced3dd","f5cd38c7ad","aa2275a253","73ea86ffc3","1e5b0e07c4","1ef5cc3503","f3e31cf879","9614e6714e","8f4b33e78f","a2635b1dd3","3046b983f3","00fc7ac9b5","62eb1eb706","257205e88c","43c804b835","e3ae78b806","8adee6d284","0c4d14101d","7de2c87e90","be0a57599c","c272b2f0af","0bee2e3857","714dd165e1","bf5cae10aa","e9da644a35","3834812082","bc7f8d0c76","f0f08676a8","1fe82b1beb","93e7b75037","3e65582459","4b3f424d32","3834812082","bc7f8d0c76","f0f08676a8","1fe82b1beb","93e7b75037","3e65582459","4b3f424d32","8b81db4ab1","b4d257c844","fe8e06fdd8","d63855f499","f7d2f46c49","393204f3f4","d270d0e586","01db1413ef","0c5e79f8e7","534677d2b2","7b4d114e4b","624cd56820","fb73c4a810","57b12dbf22","01db1413ef","0c5e79f8e7","534677d2b2","7b4d114e4b","624cd56820","fb73c4a810","57b12dbf22","01db1413ef","0c5e79f8e7","534677d2b2","7b4d114e4b","624cd56820","fb73c4a810","57b12dbf22","4c3b1e08d9","25043d0600","d6f38c6454","aa57d83b31","8b49951a89","f92e43aa5b","a2635dcd73","1fd969936a","8b984159f2","63baaa935c","7b657be166","6c7b7cd815","f3482c727b","81a53b83de","cec7fb245a","74c79353d1","c36dacffb1","d01f7306b6","0df3acc427","8ad60643ce","70a31d058b","05a19ca6eb","beccca27b2","72e9610020","4f086e87ad","24b900c88b","a00bbbf1d9","cbdfb19808","05a19ca6eb","beccca27b2","72e9610020","4f086e87ad","24b900c88b","a00bbbf1d9","cbdfb19808","cb48a23047","4915a2d657","7efc95d31c","292e93dfae","31851188bd","c67530ae57","3a4efddd46","cfa81e21e9","28d12f556b","e26b32919a","e608781dc2","c61b091f4d","e148310426","748876c4a3","29574816a1","0ffca55c98","273bc15cbb","b9df9f91c3","978eafca63","d7a3051dfe","ebfdb75b21","29574816a1","0ffca55c98","273bc15cbb","b9df9f91c3","978eafca63","d7a3051dfe","ebfdb75b21","b083d7d423","23c4fde3e9","86ea3cd0c2","bb7ee748d5","182fc1667a","8382eedf6a","56d8693d7b","dd8c90b687","f5d1cc6c05","fbc5bf89d5","6395a39558","d358c36d22","38f758fd70","3cb7fa2a7a","f72ef6f212","da3cb9ba55","8585a52a11","d3feb98d38","b35016f4c6","4f3c3547f5","25c8cf4bab","8e395e6dd4","9416a00549","a1c04e395e","01a6deed0f","2d43f2e935","cd82f3b57f","3e24813162","110e503057","99b12aabe3","5836a518ce","ec6246f225","27b5182eef","082096901e","bde8877a4d","110e503057","99b12aabe3","5836a518ce","ec6246f225","27b5182eef","082096901e","bde8877a4d","cb09970584","f6e5455ba6","3122c0e7ef","72d7fa975b","0ad5d9476e","2bf64a190f","6c3ddebccc","99ca87733e","3df5f55152","7428d0beb1","ac1597be23","2ca392e5fc","51d8a1c985","02ee98da14","99ca87733e","3df5f55152","7428d0beb1","ac1597be23","2ca392e5fc","51d8a1c985","02ee98da14","2a165fec4e","4a17831d73","01c26d3e99","12ed6b9698","8c847e42e3","08f676663a","4def34dd70","ebf51ef0f7","0d89db3454","af3d6ce0d7","bd263b8df7","5286adf907","5abd6c9e08","ccfaa2c1ae","ebf51ef0f7","0d89db3454","af3d6ce0d7","bd263b8df7","5286adf907","5abd6c9e08","ccfaa2c1ae","20aed970e9","bbab91bb11","d5527fbe03","cb0d1262c8","4aba4d90b0","6d09aec63d","74489ce614","706ff81594","0fa94fc1c8","737d656c87","0434d464ed","1ec3aec6f6","21aee15d32","caca2207d7","706ff81594","0fa94fc1c8","737d656c87","0434d464ed","1ec3aec6f6","21aee15d32","caca2207d7","c78cd5e7bc","f4279ffa9c","52940792d5","447fc14dda","076e2c0769","d589427ce0","aef903a0fc","5511d7336f","09dae1ed2b","8ab4a47429","a94cfccafe","69d67a04d1","879bf9253f","af7b107265","5511d7336f","09dae1ed2b","8ab4a47429","a94cfccafe","69d67a04d1","879bf9253f","af7b107265","251cbf1d5a","7004f386ce","436789ea77","e34f2b2f3f","6bb8b242db","7254481976","9043a9b1ca","314503ee5e","06124db167","97180b42e6","ca453456cf","ced79ae99d","cbfb745a53","a2780f733e","057d6ec2c9","4f033e8311","4137c4417f","06834b26e6","79473035a8","57622e6ada","eb7d5d7e21","d348d5e12d","e4891d1128","790643f71b","b259faf1f5","b653a0ee9e","c3b39f0a48","e4dae0fa5d","59fa8ddaa1","6650b19a19","e963e20d02","01f5fed498","fe1aebc3d8","93990ec4ed","887d3dcff1","542b61ba23","5c0433c2ba","78fc6c6791","d2ec74a7c9","f2346fad40","db493a595e","213b1b3bc3","cd7719e385","9a88c2d3b4","d6b3b0f2ad","313d1e222d","229964fc15","e7c1537d40","26610c0485","afc30b8a11","0b962c3836","1c669e6871","c092bd4f96","fc5d8ffade","8aa9d43174","8967ba0ffa","ada5a48bc7","3e195f7615","d8b3a8eba1","2238b02e7b","6fb2332eea","6fa43bbf2d","1c80019f9a","ada5a48bc7","3e195f7615","d8b3a8eba1","2238b02e7b","6fb2332eea","6fa43bbf2d","1c80019f9a","3eada76fd1","8b716d491c","e91bcfb532","37771483f8","4b519aac80","db68e65927","e59dc38801","72c1ac28db","4df847b026","4689ee658a","67f1f4ecd3","c706e1ed41","7f08a90ef0","985cc17923","387cc62c77","d305f7f305","17bc3b3f7a","f0e3b3897b","6ce6edbe71","1c8369582a","c1606b57e3","d691592b51","b0bdb23395","1943d7049e","b53629bf4c","2667ea0950","92ce23cffc","e9331fd043","661ef8beb4","e9d088fde9","ef8d90e172","3b95c71c07","3f55ff42eb","d2eb0e446e","f9d5e55232","8dbaf80e84","e75d9c64e0","b7a92e58bd","4eb5e8e00a","2ace4a709d","2f1085d406","63fbd1929d","387cc62c77","d305f7f305","17bc3b3f7a","f0e3b3897b","6ce6edbe71","1c8369582a","c1606b57e3","987a01bdc6","ff25637938","aea2c35fd5","390e16a683","07ab0d7d27","b579a93587","a05086bb0a","987a01bdc6","ff25637938","aea2c35fd5","390e16a683","07ab0d7d27","b579a93587","a05086bb0a","79ce588728","280c5880d2","6d562d5bdb","dd801cf727","b1ef0e2248","d9aa574934","e5944c1e33","1512aff6ad","db10e6dc76","9bb9c8bcf5","d920d2dad3","71b4c9a758","d1497ae751","2e327b896f","2715beb3f7","f95bdd6779","ff0b6c2e50","f24ee44184","acc96eac7d","440b02e4af","cc712501ae","1512aff6ad","db10e6dc76","9bb9c8bcf5","d920d2dad3","71b4c9a758","d1497ae751","2e327b896f","8f3554348a","06a48a2f93","d2f4d7687f","768c3892bd","a11db771ef","006160c3aa","9972abc319","a719b55ab5","71dbecc5d8","b69c8b6233","e4564fb70c","538d7e9b19","b8f3eeaafb","d7abf451ec","a719b55ab5","71dbecc5d8","b69c8b6233","e4564fb70c","538d7e9b19","b8f3eeaafb","d7abf451ec","194e57f7a2","ab9b13422c","c32d985de9","4cec850da8","91ab7b0e1e","1569d98e05","1218836a85","6673720785","7388f300f3","a1eeee26e8","6c179a9965","a68aaf830d","fb5eae52b3","a1ff6094de","6673720785","7388f300f3","a1eeee26e8","6c179a9965","a68aaf830d","fb5eae52b3","a1ff6094de","3e58575f62","1f40a90d2d","e9dc3ab262","8791cb58a4","0a73fa7f35","88efea4f44","b2d1af79af","062bec9a0e","194c6993aa","d5be85978f","9cd082e09b","db35765adc","8bfbb6fd2c","d84cb9d031","062bec9a0e","194c6993aa","d5be85978f","9cd082e09b","db35765adc","8bfbb6fd2c","d84cb9d031","945938af57","448b992cfd","de0b7346a4","6b6adece9e","d00741df27","042bd6545c","41cd7c3d72","f3bb0670ca","95bbef2e53","a43ca2e887","7ad2ad5e8d","85c20c7f9b","25c8ef4525","25d8a4d617","f3bb0670ca","95bbef2e53","a43ca2e887","7ad2ad5e8d","85c20c7f9b","25c8ef4525","25d8a4d617","02c703ce5a","8103d407ba","50330146c0","24f89d9f5a","685a9de860","c955539408","166a69cc97","a35cadff83","eb69e4ebd9","9328aed14e","1e7b709263","3bbdc07b1e","f47849e227","f6501690ef","409dd589d9","4a3992329c","96588639c8","374bcc9664","8f4bb11018","d70411f9e3","641cc2794c","7e16b01d41","4b77df5d4a","7b3ad63bce","2a0c359fd9","4a6a7e0cf6","f74949fd4d","bcb66b6051","a8258b1bc9","61b5caed78","ef70889182","8798ea2484","0569e4dfe8","78fc5652cd","88dcb05045","a8258b1bc9","61b5caed78","ef70889182","8798ea2484","0569e4dfe8","78fc5652cd","88dcb05045","ac328780c1","d59f1049b9","04e23e4f5f","1ab7efdd65","f70a144728","96c40c73ca","617c00ca95","bbd0e0bed1","0e052332b3","80b27e4565","7aa4f7138b","a61d06159a","4102e781e3","05b2d539be","4d870b4ee4","aa53bf198f","ff8c601178","bfcec5c33f","df6ae9defb","f65a82a60b","57f428e32c","6012fe88a7","539862dc80","a8ffda82e3","f71d146060","7e10e7a6ad","d9c99e3c54","e72dd88284","88348c0e79","149f8bcb3e","65a31a24f0","91cc21b91f","9f6700f4db","8368b40c62","cbe294cc44","2b41016bbc","9bfd60ded4","6b32e0a1c1","5e6621f179","d7b6c144cf","9ac13153c9","df548db28b","2b41016bbc","9bfd60ded4","6b32e0a1c1","5e6621f179","d7b6c144cf","9ac13153c9","df548db28b","3141be8615","adb6bdd179","928a514d75","0ec68b2db0","942f5d84f4","ecc7834bc0","c2b81163af","15b806a350","d9eeb775fa","d07666fc07","f2201cc39f","85cb7cb95d","f48d3f916a","3525fb3b62","15b806a350","d9eeb775fa","d07666fc07","f2201cc39f","85cb7cb95d","f48d3f916a","3525fb3b62","e1ab5a168a","107d9d4bf7","afb52de1c9","4ac14c7c25","fa98cb89df","8a96200a29","5773a1d74f","8ca257403e","ad9bfb984b","d8fb9de0ae","8d322703d5","da7ad631f6","6496ab412c","80111b5cbe","9bfad837fb","6104944603","a4cb534db0","1009df4dab","ddca89f380","df7c2509ac","eba7aaee68","b9ec79461c","220c1d9770","f619e9474b","d01c9fc65c","4e1233aa5f","034f418fe8","e68a8f47d0","b9ec79461c","220c1d9770","f619e9474b","d01c9fc65c","4e1233aa5f","034f418fe8","e68a8f47d0","21ef80e705","1e1e1f8726","b68ddffa19","6ee2547fc1","306814caac","0a196cd786","0ba9a441f9","0935084467","badcefe4a8","a71cf6b3ab","0a226a24d5","c9ac54a833","cdced717b0","c63559d7f8","57a2a19b6d","b2a7c233a1","6ccc6124ee","96c7fd31b0","37957ebf27","29621c4d7e","4d28475b57","975e0b19de","e69f6e0cbb","1668cc3c77","51b242adb9","f36236ca59","a28b2c97fb","6f6a34896c","135ebf962d","32f3d9bda4","a91f182faa","7f49fd7ad2","e2ced0a760","47fe6db675","cb634fe2fa","bc24b3036b","a6d3292fc2","d353f9ebe8","78edbf0553","5dcea8c15b","8274e82dc9","ea04acf545","25c98eac1e","87a4d99d0a","67e9225717","cb87d529da","c1e99c079e","f22f737b93","85b5722c4b","a082347774","48d49e060e","c8d25e89a0","6461180c43","eebcee49e8","a321efe4d0","525600dee4","a082347774","48d49e060e","c8d25e89a0","6461180c43","eebcee49e8","a321efe4d0","525600dee4","79d9a252a7","825b35e0aa","35847d6bc0","df244922c2","c1e514ddc0","f3fa3ce347","8b1544e874","a3a71d3a46","63a27f9251","f11a527bce","46e626e5d1","3c9a2a715c","f870edac15","de73b8ef31","a3a71d3a46","63a27f9251","f11a527bce","46e626e5d1","3c9a2a715c","f870edac15","de73b8ef31","5f3dc30587","a013fc6c51","9eb2783be7","e1e209e82a","1dbd9ea2ea","64241b8f53","95ce51e380","5f3dc30587","a013fc6c51","9eb2783be7","e1e209e82a","1dbd9ea2ea","64241b8f53","95ce51e380","5d0a246277","a3d6f81407","f5407cc6ac","5f14d52d6b","16201a5e83","c29d33338b","6645175e4b","441889d3f0","c9d88859c0","14fb8e4f2b","d7fcf9aa91","257e243936","b0c1b34fa4","1528530da7","5f3dc30587","a013fc6c51","9eb2783be7","e1e209e82a","1dbd9ea2ea","64241b8f53","95ce51e380","bd45381f9f","9499da48dc","692c6d2223","770185c3cd","1bcfcbd487","c154514379","09f4f8a3a3","74e25d4841","81a0e26859","f13e50e2bc","956fba225e","bc8a49eda2","2b5cb2bcf9","4116d2c5ed","74e25d4841","81a0e26859","f13e50e2bc","956fba225e","bc8a49eda2","2b5cb2bcf9","4116d2c5ed","74e25d4841","81a0e26859","f13e50e2bc","956fba225e","bc8a49eda2","2b5cb2bcf9","4116d2c5ed","9021d5366d","840a53e492","adfdcb9b66","13f89ea4d3","aaec589e6b","a7e0df4ca1","2fd21b644c","fee1ee36f4","6c4b45a499","1d2c0971c0","81e39a0b22","23c56818b3","1b1e2a2cc9","8f39a02499","3ea2c0c227","30959ff0ce","110047ba8b","9d8f8e7318","c353a16664","a594726ce0","948269607c","d3f59d83e0","fac7984d47","0800a08399","16179dc278","8ec1ea9959","6233910263","89a43cde42","d3f59d83e0","fac7984d47","0800a08399","16179dc278","8ec1ea9959","6233910263","89a43cde42","b5eddc8fc3","430ffeb02e","7ebc574f9a","0baa3a19cb","9480e4f8f3","6a57a5623c","92297db161","6efdfcb192","61e556f7c4","3163d62437","e98fdf6072","4c2a28d2f3","a02eb8ce26","bf92908701","c05914e256","09621207f1","70845b7acb","511d78e251","0027502321","c60f135ec7","c4683f2a6c","8d07262431","e05dd8bbdc","b757f788bc","7d9aef2d17","acc18a393c","d887092553","ae72ac240e","8d07262431","e05dd8bbdc","b757f788bc","7d9aef2d17","acc18a393c","d887092553","ae72ac240e","19b0c38613","08780d853f","91ce86ee16","5fef40b754","2c3f6b8db4","cf9a742e0e","a8759736d3","bc63f8aa02","e079f351ea","b54c1d4025","6d12363e66","f09ffe3544","6a5c17d62d","cd8b4e1f9b","a3adfd150b","6577177e4e","38421a2ecf","aab4a39794","ab7faab8ba","dde54ef268","d45a0af8e8","c202ce4dff","982a53b41c","9514797797","b4aa219eb2","471f43392a","080ca240b1","f297fc1f4b","a7e12bdd4d","4a316edafb","ba3abead4c","28a47afb6b","614e22187d","7461a85c66","3efdebbe61","bc63f8aa02","e079f351ea","b54c1d4025","6d12363e66","f09ffe3544","6a5c17d62d","cd8b4e1f9b","19b0c38613","08780d853f","91ce86ee16","5fef40b754","2c3f6b8db4","cf9a742e0e","a8759736d3","bc63f8aa02","e079f351ea","b54c1d4025","6d12363e66","f09ffe3544","6a5c17d62d","cd8b4e1f9b","bc63f8aa02","e079f351ea","b54c1d4025","6d12363e66","f09ffe3544","6a5c17d62d","cd8b4e1f9b","3d04638a8f","6056ecc2fc","1d56ceabb4","66746234f5","399e94d006","4fbb29786b","3677054b39","bdfb658f2a","b2580c15f1","0a90f66b23","32cc2ddd87","84306d9db0","970dce734b","a44e3c3035","2c26f964c9","8da66ebe48","6a3366136c","47f57bae48","26e7ed3aa9","78ff8a2d41","3be45efd0e","c31842f726","e30c2f6a09","ceee1bbaeb","8e72a87663","4d1bccf6c7","d0103e8810","33700a44b8","d42148f04b","26bc307da2","18a75e1fa0","f0a235fa20","df4b14fea0","fe4d694e15","7449ea206f","f4671bce5c","2b5e8a6604","7e7e1ba2e0","48b7fbc54b","428392aa08","f3a0c70d4c","b9247df10c","2c26f964c9","8da66ebe48","6a3366136c","47f57bae48","26e7ed3aa9","78ff8a2d41","3be45efd0e","2c26f964c9","8da66ebe48","6a3366136c","47f57bae48","26e7ed3aa9","78ff8a2d41","3be45efd0e","974e9494d0","df88914fcd","f883ab597c","b0f6225a1c","60f45291c1","33685fbc3d","c6566881cd","60b6747775","38ac9fda1c","4307cbc209","4ae608dda0","606a919e72","f4429e615c","b80cbe6154","b6581a5976","33153f4b45","df07f0bab9","d33cf22926","b9b7576cb4","6ba09cada0","6f6cb0550a","7295e60845","9acf8d5926","09e10bfba0","6b14ac6cd3","f6c751e91a","8e8feda976","d24de20c50","8aca757ac6","463ec862c8","18229adc12","4868dbdacd","c977e19dc1","cb5a1bdc29","54939b7f53","8aca757ac6","463ec862c8","18229adc12","4868dbdacd","c977e19dc1","cb5a1bdc29","54939b7f53","0340202303","541e12cdf6","e3dd5f525a","4d60824ca7","fc49684647","33adaf5283","ee7990ae34","eded01997d","f1527c21b1","d494e480d5","049fe6bad9","67bd85707c","a67225c10c","13d802ff18","9e9fccc4a2","268f5a000f","9597afe437","c1a2b5e837","1d8f7dce00","4d2f642edf","1d9d0677f2","f959d02b9c","84e8ecd71b","e5ca7d4f2d","e4d08509f3","d4071471e6","2d58373651","e700936284","eded01997d","f1527c21b1","d494e480d5","049fe6bad9","67bd85707c","a67225c10c","13d802ff18","61d6754f94","41c9464235","93ca89c0d1","e67b279d2e","a928dd83a5","f3460f85be","6fdd09367b","61d6754f94","41c9464235","93ca89c0d1","e67b279d2e","a928dd83a5","f3460f85be","6fdd09367b","effff385c0","22ab6070a4","24d880e987","d6d292808c","cd5b4b8a8b","c8dfb86773","9d4db8f796","effff385c0","22ab6070a4","24d880e987","d6d292808c","cd5b4b8a8b","c8dfb86773","9d4db8f796","74f54a9385","49ad688bf5","aeab868192","7d22560a40","b41aa0eee5","1077aac466","4ce6df1fd9","42e788a825","9f0fdaec67","906ee7dca5","b75942cc19","b7d06ce8c2","d1161f19a6","0323dad209","b54d8c96a2","b98d3d66c8","103eab5c47","c293d66070","739e48999d","4e7c499310","e4daf48384","b54d8c96a2","b98d3d66c8","103eab5c47","c293d66070","739e48999d","4e7c499310","e4daf48384","ef887e3cf2","a5991a0987","c78114603f","00d0f8ce3c","1e21c430ae","e6ce6fb335","f4de2ef195","ba90f3fcf3","2801e2fa67","0fdf48767f","9fd30d2670","a2033f0661","f7c2eac25d","2acdbcba26","6e1dcd3b64","db79755ba4","788cf64fd0","635b74ae68","5e7c51f1c9","19f135820b","b598a442d8","4656f43b7f","ff62a1c337","6d9ee06392","cfcedd45ce","19772409d7","4153115596","1141735c82","86f9d8a762","5909c52b62","64c9b25673","a0a1a28f41","e09b7b9dcc","c0b3491e2d","bb0740f993","5e2f326a0f","526c4a3700","83579959fc","aff195da51","b84f8d3600","8f0704c7d9","dda70df68d","5e2f326a0f","526c4a3700","83579959fc","aff195da51","b84f8d3600","8f0704c7d9","dda70df68d","3da5587c93","94a0cba4db","acfa05522e","6efbe4244d","9d66e61831","978d695dd2","78a11eadbd","c3d03fd327","42695f9590","0aa358586a","d288828744","88ea87cb79","d767ff1f1c","71e2dd4ae6","2ad20a836b","138e58e720","f71e115e2f","38e0e4678c","c4fd15cc2e","a1ef406f80","ef572c8f4e","4d219dab64","ec7a4a11cf","2118d1951a","bf7e5a36a0","8f5b356d51","2dba7f5c94","b109d79471","58e3bd2220","a10ee064a6","c972e1273d","e6cd447424","2accf55e88","7184ad518f","9ab875a5cb","58e3bd2220","a10ee064a6","c972e1273d","e6cd447424","2accf55e88","7184ad518f","9ab875a5cb","af8d25026b","060fe2e128","2c0ac4cda8","d32147af25","9a76a43955","c5660d48c9","284e154952","dc3286b4f2","2a59100305","77a1ebcb42","7b58c77231","12b239964d","25807422fd","c0e1bd9a61","b1bd87cb0d","75a45f79a9","3589d582da","30e286e415","74839d74cc","4bb817275d","cadec63ade","a70600940d","548582ff60","928961e160","b47324eca4","3c92f7f344","b684d042cf","cc2d46e58d","a70600940d","548582ff60","928961e160","b47324eca4","3c92f7f344","b684d042cf","cc2d46e58d","ac010553e7","1e13d015d6","ac0a15b9d3","dbeaaf4ce3","b575f6e2e5","03a112b2d8","bd7fa6e5fc","5499bcd430","930b92d9ff","c857defe6d","d3afef8fc9","d1536af78a","d50cfe6245","c7ffef0d1b","ac010553e7","1e13d015d6","ac0a15b9d3","dbeaaf4ce3","b575f6e2e5","03a112b2d8","bd7fa6e5fc","64571f5246","98bbf81b69","93f930d489","30e47e6717","20b3ec0df3","3e50cc5dc2","b23dadd344","ac010553e7","1e13d015d6","ac0a15b9d3","dbeaaf4ce3","b575f6e2e5","03a112b2d8","bd7fa6e5fc","89b39e895e","2b2195147f","91db893f33","06e7ff804d","f317eafa40","4c8682d2a4","cc585d3cd8","8aab222700","e95717007e","49a8167e58","5bc26bffe2","3d7c20a992","47c1515a0d","dd9a95b9e1","8aab222700","e95717007e","49a8167e58","5bc26bffe2","3d7c20a992","47c1515a0d","dd9a95b9e1","b35247586d","19dec2f1b2","9092187481","0597b71141","c43c5ee8e0","aea1427cf0","85d4484201","b35247586d","19dec2f1b2","9092187481","0597b71141","c43c5ee8e0","aea1427cf0","85d4484201","68fa711fc2","0dadd773a9","98b0d05ff2","3868dfb539","19336d53fb","6f1ef3e9d5","8c8cdeb6ad","15db942566","bac49765f1","d4016ff2a6","7f24ed3b1d","ce6f197ce8","28132e1938","4e8c0e8e78","15db942566","bac49765f1","d4016ff2a6","7f24ed3b1d","ce6f197ce8","28132e1938","4e8c0e8e78","549ba09640","f81dbdff30","4118198d83","b7da58adbd","06d9527d39","7443dbafd9","8a0c23ded8","3dd143d907","0abef89446","3bcca09e5b","035d52b5c8","b4bbbc58fc","fa79e08d17","d4c6397de4","ac1253a104","7906a58d28","4cb360defb","308ea2dee4","10e3959198","1f2ec42ff7","b0ddd1eb6d","c2f3b30ee0","b81ed49dfe","567c06f080","0a592cb3ea","f69d67b1bc","e606ee7faa","20c0ed273b","06a973c635","72886fba0c","a48917dae7","5aecd87a65","a0081e1ef7","dc9e0f6419","79606858f2","74f42f53e6","341f3cc49f","98d4aa2b81","dacac7b72e","804ada9733","6e8aa1bc29","d2c684dc0d","d503ad8948","6f610e8e9e","b2821f2d1f","d4f67569ba","606e07840e","4f38103ab8","b8060f7214","d503ad8948","6f610e8e9e","b2821f2d1f","d4f67569ba","606e07840e","4f38103ab8","b8060f7214","5be3bc65bd","9d80818c61","0780b763f7","906c78abda","64a3381d64","82f543d33f","1ac04c5c72","5be3bc65bd","9d80818c61","0780b763f7","906c78abda","64a3381d64","82f543d33f","1ac04c5c72","458d8f90c4","4f442bbe10","3b32ac26d5","73cd7b3ca1","0c4e073bec","491b939db8","62bbfa1141","ae53cdb6d2","4039b0aeaa","c9228c6e0b","22244fa279","4ad28a5ed1","39e2e0dc93","b592008028","ae53cdb6d2","4039b0aeaa","c9228c6e0b","22244fa279","4ad28a5ed1","39e2e0dc93","b592008028","a3a2a89b15","007d2ba1ab","900334180b","2b86c81d1c","f830d43850","299a541785","71956f761b","c87617f75e","b222aa8794","7ebff6e203","1d49d9d3e3","ecfb6e412a","6760d08701","692b4aae1f","c87617f75e","b222aa8794","7ebff6e203","1d49d9d3e3","ecfb6e412a","6760d08701","692b4aae1f","6bec35541d","60884a6f78","623bbdaadc","6aba927d7b","6d48d79646","b49c1d6f44","d13fa75743","803b7f0995","cde5ac978a","f6e8e32185","7a9afda56f","4690a756d4","eda23a6e77","35210f83c1","803b7f0995","cde5ac978a","f6e8e32185","7a9afda56f","4690a756d4","eda23a6e77","35210f83c1","636d10ce56","936e8de4b1","f7796f1740","1aa3dfaf96","cdfb07e1a8","06a4d68350","7ba487d477","11143dba31","8a4afa5bb6","d2ce6a9ca2","3b868faff9","e1aa60e7ab","50ba919588","4c83e75dd3","b0abd753cc","8893e78468","2a97940388","0b09964a74","0d965d68d8","5a24302fa3","0b77670bee","f79586d1d0","b986fbbec9","b381a92e67","da834cc20b","e1d5d73b66","6cf41e9340","b987cc992f","589db72849","ea6c710766","685cbdcc1f","858a8a8465","b317712099","5cb0f73690","15d66919dc","11143dba31","8a4afa5bb6","d2ce6a9ca2","3b868faff9","e1aa60e7ab","50ba919588","4c83e75dd3","232175ec6c","af10afffa4","da80da14e4","a09526ac1a","3535a7d004","0d6bae08d9","34a96ff38b","232175ec6c","af10afffa4","da80da14e4","a09526ac1a","3535a7d004","0d6bae08d9","34a96ff38b","831bc8f336","891e3850e0","695fcfcced","2ee51f99d1","aa5d56a883","1f4907f277","1d869a1676","e46d7a0646","9edf12f2c1","a56bf6c374","005100ee06","d55d05c5f1","d37a4c02a7","0d9a1094a5","831bc8f336","891e3850e0","695fcfcced","2ee51f99d1","aa5d56a883","1f4907f277","1d869a1676","de7b2d984d","628a4a6549","9a7764a273","efb70cc678","635de4896d","1597be6cbd","a61851deca","311b43aded","1f97be16e2","6947f8fdd1","d1ed1c9d86","5833b3da61","72349d1fcd","4013523968","311b43aded","1f97be16e2","6947f8fdd1","d1ed1c9d86","5833b3da61","72349d1fcd","4013523968","24073da26d","3cd589480e","678516f383","b08ec06ca8","4180c4be7e","9c2576d30c","77d41b1d28","24073da26d","3cd589480e","678516f383","b08ec06ca8","4180c4be7e","9c2576d30c","77d41b1d28","f9a8cd34f1","e37f201a58","bf4557d9e5","4bd0af2a2b","dd3af50bd2","740b0ff602","c9405ca3ff","dd12e616e1","aad0b6f6d8","2eecaec99d","4f142b8071","3ccade72ca","05e352e6f5","362246baf2","45e5c6d737","3ff8b1d5bb","9e898debbe","3040540e0a","07b079d3af","ae68fea988","895fecd5e8","9ec6239547","db0470c428","52062db6c8","65144315aa","fad8108cee","0681666e3d","0a34a2e87c","581a989944","91416b40ab","a8cefcdd95","a574b957dd","0df15168e0","97f16ba560","2d5719d562","581a989944","91416b40ab","a8cefcdd95","a574b957dd","0df15168e0","97f16ba560","2d5719d562","395ab99098","c110a4f052","44c6c20a79","2cee2ff976","ee983e1a6a","971865e344","fb19a78f11","a663b18f6f","b38da762db","793e8725eb","66d81c46af","8c012100a7","1c9be94f7a","5b1bd0d371","59ffc1e982","314eb74131","d7168ac7e6","746c043dbd","df788e548b","a3724d4e72","7568ed5099","05b0df09e7","12f0629aaf","b11c5b4bd4","27379ca31b","905d37cb28","db3be79628","9a7d23ef5c","05b0df09e7","12f0629aaf","b11c5b4bd4","27379ca31b","905d37cb28","db3be79628","9a7d23ef5c","5793aed8ce","f54a99aea8","3cf15efc37","172da54054","b7dc2f1d69","bc8840d3ce","8963d243fe","4f6762265f","ba1d9b755f","e97f2eaa19","50085b4ccd","b5dc3b6e47","530faa8267","28b2c4f126","305a642045","ddfb7c610f","33a2e65284","782a025379","9c9dc7b14d","a966ace889","944e0572ce","130824a046","d397a1a895","c12fd3c27a","2a0e5fdb4a","c85d5ed677","be71a40c51","1bbc62ce18","614b25e2eb","52acc8780d","4f4945befc","8260c293ba","0ecc63057a","c941940436","7fb0730986","6a1886a024","d45a60fe87","fa156c6b62","85fa51243a","8fc32726ca","6214344558","a4f5ca910b","cd420c1518","b8790102c6","49d8377442","39991a4961","e9744b0ada","da5b995ceb","01d92c0427","cd420c1518","b8790102c6","49d8377442","39991a4961","e9744b0ada","da5b995ceb","01d92c0427","8fe7b61bc6","f1f846b96f","3cee2a64f6","011796d486","e64e194245","747e4ffe15","5679b17a1d","8fe7b61bc6","f1f846b96f","3cee2a64f6","011796d486","e64e194245","747e4ffe15","5679b17a1d","a2c98f9c12","27d30a30b8","13f4e323c5","3d86d32416","b7632e3182","6e347b2a2c","345104bd33","a2c98f9c12","27d30a30b8","13f4e323c5","3d86d32416","b7632e3182","6e347b2a2c","345104bd33","acdeb21435","6d3fabf2f0","6ccd456fb0","42b4ec5de6","d23679b526","dbb6cfbb2f","c1fd4e1000","acdeb21435","6d3fabf2f0","6ccd456fb0","42b4ec5de6","d23679b526","dbb6cfbb2f","c1fd4e1000","27ca15f5c3","b6d2b54628","3e339f85e8","7194ac882f","35ee782113","364494b0b6","56c6f172fb","9da63106d2","5d9129118b","73c9d095f2","0ea26c10dc","105a708b51","36da2b77e0","3a5702c29d","5000756fd9","ebc40240fd","f0751853ee","0a7d9bd058","0d19dd1b4b","5f276c2570","f8c74a525e","db9cb523b8","339be153d1","d6a1ba5792","c69ee455b7","3320bed3a9","a76bfefabc","176d4ddc9b","c896f3eade","449b6ca930","cf8b58355a","7ffab95b2b","e8060a5c17","33c6a47f51","aab099ae42","9da63106d2","5d9129118b","73c9d095f2","0ea26c10dc","105a708b51","36da2b77e0","3a5702c29d","9da63106d2","5d9129118b","73c9d095f2","0ea26c10dc","105a708b51","36da2b77e0","3a5702c29d","b586cba23e","a1109eb40e","3eb435b720","a9195b1042","ef90b60cad","0fc0444a3b","6880d76b68","b586cba23e","a1109eb40e","3eb435b720","a9195b1042","ef90b60cad","0fc0444a3b","6880d76b68","6071d6c67f","db4754e747","f3775f2cde","a1d403d965","0adf94f745","aa575c637c","9f7eed7f4a","99abcffd4f","833464f479","4d9f565e99","78e285abfd","cdf6f402c2","271db55848","0bcb786216","158ac7e7cf","6e1ba31078","90b9598586","14be79dcd0","05636775be","d547cc6e5e","54c9eb1b30","88065dc34f","3e3805abd7","3db2ac9847","a3251afc79","0265c916e1","4b2ecb5fbc","92db54757c","7f0474dbd2","1585d09572","12f931ee18","5294b30343","4705b8fa81","4e874ddecc","3cfcfeeb94","7f0474dbd2","1585d09572","12f931ee18","5294b30343","4705b8fa81","4e874ddecc","3cfcfeeb94","1e199a5ac0","e987d2cb34","457820047d","f0f3c16f11","50f297516b","449410322b","cc12e806e7","6b9c7eb525","ff037456b9","0543b23090","3acad2824e","894092be59","5e9d53768a","28cc732a10","0a067c4f9a","d43c3e0b65","940ebf5035","5a3bbf83cf","34ea2c9011","378a7dca8f","50c0e4d2f0","0a067c4f9a","d43c3e0b65","940ebf5035","5a3bbf83cf","34ea2c9011","378a7dca8f","50c0e4d2f0","e826b72c2d","79f6177ffb","7ad317e22a","2c642eede8","dffe4c92ec","59ce53a37d","f9e8d17f43","d60d4ece2b","c55d99d3d1","159e9e7702","1596f401fc","74d9a5b6db","82ef438349","5efc0b8d3d","92dc3f2634","6996e11d22","034c336a72","cb98e392f8","a920782b27","8633aa4c77","9f2a594289","2fac2b61d4","ded6ac748e","cf5847bb70","c3b2bd1fae","1fee4123e2","75c9783cb6","42819a5929","d60d4ece2b","c55d99d3d1","159e9e7702","1596f401fc","74d9a5b6db","82ef438349","5efc0b8d3d","d60d4ece2b","c55d99d3d1","159e9e7702","1596f401fc","74d9a5b6db","82ef438349","5efc0b8d3d","f531387e00","e2da6f0d20","91cd8e414b","b9cd9f476e","e79b20ba48","05dc87cc49","423d62e99d","f060fe8c8f","17448abe54","5a3c98fba7","e36a659951","c03898854e","e62989c69f","6185e83287","f060fe8c8f","17448abe54","5a3c98fba7","e36a659951","c03898854e","e62989c69f","6185e83287","e5305a424e","007aaf61e3","25aeef8ec6","6562a69f06","690af221f7","e37fbba821","af50c88ae7","b2726705cd","738d1a464f","3ae01b3fb5","a3ffe19628","7a80fc765a","e1a5692367","5891ead69e","b2726705cd","738d1a464f","3ae01b3fb5","a3ffe19628","7a80fc765a","e1a5692367","5891ead69e","21e8434c41","28c299c521","bd93d19c0d","b31b24833d","f4b2710825","9aa905dd48","6797e01360","2ecc2024a2","228d22d4c5","0d31e88fb6","892fc560ac","80c417295a","f4b8a73ec4","36d86f21d9","bef1d91069","c100f8f992","2889a7cc33","5ca636951c","c82e93ebca","fb2b73064e","e970a37459","7cbe788505","ac0781d152","21c1924c6d","b8d7bce3bf","5cff6a8c2d","3ddabeb3f1","22b0c06f96","da35524588","cd92d64023","8c5bd45423","cb6bbc5937","b35c645a29","1d99d729bc","b85dba41d3","da35524588","cd92d64023","8c5bd45423","cb6bbc5937","b35c645a29","1d99d729bc","b85dba41d3","7ccae04e20","07eabcf464","cb7807e091","43205681a1","f36a59ede0","5bb662a4a0","ac9c66e282","e8edc7b8a6","a6b1f3eb05","f3cf9450eb","a83f4e518c","6f223e089d","5989f8f8d5","9f1f8d763a","e8edc7b8a6","a6b1f3eb05","f3cf9450eb","a83f4e518c","6f223e089d","5989f8f8d5","9f1f8d763a","5708074463","924f21addd","c0d0a7e803","1ec41a55bd","ac058bbdb1","563d527b30","76c9016c14","2aac787ef2","cc4691563e","d4003c2d14","6ccf2ee5a7","ba30f51a22","416254e6a1","6a2d27aa77","39998cb50d","bcc6f61bb5","d20dc180b1","f36d1e4581","56d10087ef","f754693a1d","a072476458","2e2e3a324a","01a8df7552","5e0c591c7e","280e5384ad","5a36e15462","3ccb25210f","930f40afe1","39998cb50d","bcc6f61bb5","d20dc180b1","f36d1e4581","56d10087ef","f754693a1d","a072476458","38c83bafb9","c349ca7219","8d036d340b","4d0541ca8b","f9cd53d3a8","9a78be66e3","07515c5571","38c83bafb9","c349ca7219","8d036d340b","4d0541ca8b","f9cd53d3a8","9a78be66e3","07515c5571","99ceb7d4e6","e2b7f8f053","8a59cb56af","a439fbd0a5","8f6a79cfa1","df5e688f20","1d9c1df4e8","ea95f36e3b","76dd216363","66df34b56f","7e172ef99e","03e372e9dd","823563a676","058bb2789c","ff6cd7c797","adc5a96e7f","d629eefd28","298a8ea813","8443c9bafc","674bcab76a","a2def4fd9c","9a97074b50","ad5675c441","1c92f89d65","6d120974d8","07552935dd","b3269ab5db","6b470d9c00","27bae50929","3cf0cbf85b","6fef41d8ec","bee5be7de2","12e2bd28d8","4083b5e357","de530f95e2","cd96a93122","3ed0004e74","0dbc0b9a4b","aa17b2e8d3","5bf9773533","aef3e7e0f3","de274144a7","27bae50929","3cf0cbf85b","6fef41d8ec","bee5be7de2","12e2bd28d8","4083b5e357","de530f95e2","0b4dde67b6","d84f9f7213","03f3bc49e5","e6d21311ec","d3a697c782","df838f732b","4826ebb046","7a400f29c3","1509ac1caa","b477261e20","0a1a5b4165","3f44d88d63","6686f801b5","dd391ccd0e","1acd519c07","4e2a9f6ec5","047034cce9","ffa7beaf90","d466815b20","d4ee304595","b9b6a25020","0b4dde67b6","d84f9f7213","03f3bc49e5","e6d21311ec","d3a697c782","df838f732b","4826ebb046","91383b1671","6ea90fa049","d2af9641a4","5ef29efacb","0b79fe0747","7882fe3d5d","3d4dd39a70","cc9bd11873","79cbd24cc6","25a616baec","74b68abbf9","51fd72a9c9","2b74354188","241c7b9ae4","a8de0163f5","3319a4f211","df04a27742","af489157e7","d84018999e","839c49fdde","13127b28b0","7d1d260ae9","610ef7a8d1","29241bea85","3a85030749","d75889c542","6893995b31","0aec3b37bb","45a473d20b","2c2c1f6767","0988afea58","336f48ce9b","47961e9611","85b7a85195","268d91ee1f","38e9d3e91f","3bb57c34ab","96e16fb368","abce4402dc","83eaf1db70","33d4760a36","ef24cce5b0","2830816119","4c84996275","26e610b4c9","549987b1f3","709a46e5b1","fc9bf41b9f","9ef897753b","9d2db9b639","cad6c2c1bd","d4e5996a8d","9d726e3da9","e22f4c3819","4454f2b226","08abefa6a5","ed9207d9b7","49b9019c0f","e1253a7e1c","d7f9aedefc","837910f168","51a42b3708","97515f7f90","05d88faa8c","569c00e771","c1b512a1ce","885acb4c3b","0f857355e7","77ae41cf50","bcf0defe5f","cc2803d8a2","27cc6ad048","ce719a5fea","abc2d25cae","cba097c9b3","fa6eddec46","6db0793811","cc2803d8a2","27cc6ad048","ce719a5fea","abc2d25cae","cba097c9b3","fa6eddec46","6db0793811","9d3d8d97af","b9e158e923","a3cef465a0","469d520743","5008b92ee7","d3475079c7","1db09f8fd2","bcacbb7943","68ab64ef6b","48a7059dfe","41d098ab9f","a733d77b33","186844efde","ef4141c137","bcacbb7943","68ab64ef6b","48a7059dfe","41d098ab9f","a733d77b33","186844efde","ef4141c137","fdb4d1a2c3","2fe97b16fa","b7dbe337d9","47ad387448","1b7960edb1","16e02ab250","cb4bd49d9f","b913d2bda2","a30e6b4c7d","aede6fc15b","1a196e85f0","a74a57aa35","61b211bd7e","4df6563908","f6af57cb5e","781c0bf33b","c6161caa86","53fc043a4f","952f22fbbc","4a5a1dabff","6af0bcfcc6","b9747daa11","cf0adc78e4","b606688ceb","e9a071f764","df593e73e5","7dac0e9227","743dd9df2f","b9747daa11","cf0adc78e4","b606688ceb","e9a071f764","df593e73e5","7dac0e9227","743dd9df2f","7b23ce6c7f","763604ded4","a70d2c31b9","4358374da8","fc75a436f5","fca5329af0","d3a71e0b9e","1a85629529","302beb8595","74e768fd2d","c4ef0c81f9","59461fad45","a27f18cc8d","2991f2ac0e","7d54337185","2ae34f50f5","2e3a340690","7d5ddddcd5","0a74228255","aa195ec969","9bb6d4a6c8","1a85629529","302beb8595","74e768fd2d","c4ef0c81f9","59461fad45","a27f18cc8d","2991f2ac0e","fd8169cb9e","6e902bb5c5","d7a1b69735","a1bdebed9c","6392ea3d87","61d3ad12af","7dd7e9dc7b","604c5e57fa","92d11b1d64","0405e84cd4","be6f1ec3bc","55f3a394ff","90f204f84e","5b3eec057f","328f249981","3bbbecaa45","453de2cee9","aa7592543a","ef4d51427a","ec65cf6388","b51299fa9d","792d000fee","b8666753a3","f7a97a9718","0665b89e93","ef2367db5f","6143741063","0519108e3a","ca9f736be4","6d40e4143b","fc45cba664","58acd7fc8d","e1aede559c","bc9f24c8f5","7abf86736a","328f249981","3bbbecaa45","453de2cee9","aa7592543a","ef4d51427a","ec65cf6388","b51299fa9d","328f249981","3bbbecaa45","453de2cee9","aa7592543a","ef4d51427a","ec65cf6388","b51299fa9d","bf500843b7","ad676fb6f6","b1a3545765","7c3509d504","03138c9252","5e7deb475b","450aee64dc","8454569c2a","2a7f03f24e","0031c7e203","010f3b2105","343a399dcc","04b7c8dc2d","87dfc72bae","8454569c2a","2a7f03f24e","0031c7e203","010f3b2105","343a399dcc","04b7c8dc2d","87dfc72bae","1423cc4597","e54836ec9c","0cae95dc68","24c265f317","85edb4c515","44b9c9a396","50fc772c70","1423cc4597","e54836ec9c","0cae95dc68","24c265f317","85edb4c515","44b9c9a396","50fc772c70","56102e8e4f","725356b6bb","9a1b64f953","243aed5b5a","3fb6dcacc0","62a3069510","750858f5b0","56102e8e4f","725356b6bb","9a1b64f953","243aed5b5a","3fb6dcacc0","62a3069510","750858f5b0","d5ede80abc","7ca8fa58e2","2697d6b566","ed3e335044","39668b46d7","3a4845273f","6b7f9e8a29","424010cb10","33046fe481","00fcd68340","9ddaded5b4","fbb82a68fa","a43bb7e5a3","256bde6949","424010cb10","33046fe481","00fcd68340","9ddaded5b4","fbb82a68fa","a43bb7e5a3","256bde6949","51355f03fa","ea620bcbc9","0569f11630","439841fe93","3601efd9b2","365ecc3e68","e8ce158bd5","c50a248654","10f2907903","d3983621db","0c05d32322","3fa771a688","7816535deb","d6c505f70f","565809b4b1","a154a61f77","42ee8dd880","828a4c68eb","f8772ad2b5","0257ba099d","844568abd0","409f5f1ac4","6900799d52","23a5a5da0b","e40d48e162","61d1c24400","fdeada3146","f79a097394","5c1574d13c","cef89b7628","a7d99e7641","ca7306c49a","5de98bc29e","7c256ec13e","d1530822f7","fb268d4755","31139e4c80","f6f7d8dea6","69b60201b5","a20a5884b9","f3d5a13868","a26d55093f","718ab60590","478b665c78","79d50eb244","ed52c3bfe5","f15452be88","0cdf18909d","d1ff764f96","3788ebc30e","84ea2cbe97","5c1b0168a3","d6b2a950c2","f3de471654","1c0e635b44","c3329d3e54","565809b4b1","a154a61f77","42ee8dd880","828a4c68eb","f8772ad2b5","0257ba099d","844568abd0","2c8e2f479b","f073c2663f","40a3df4dbc","d3b9c1f52b","49addc0064","c33d2abd63","a86a9acabe","c85daf866a","b5fdc4bd96","c23551e98a","fd4a50d5b6","b51a5002bc","2259cbd79e","bf3adab821","706ae2254e","69f5c55338","2bda6880be","5c6a961b7b","7dcd3f41b4","ddc1a4e3ab","9ff8c21e9f","bd6d78fbc2","d25a1e9a91","27b46741bb","04ba0220d8","a4b2dca4d7","e0afe1072a","339faa4963","4e96cd8b9d","5cdb140056","0acf65c62a","0b5b950b3e","57607f09cb","3172e1af24","b3bb435b19","ecf1fa23f8","130fa0f74d","1dfbf10f5f","43e84bc64e","59f094a12d","bd0a9d420e","871567178f","5fa59801f2","49ec87e40f","95a4539d3a","f6e8c6c0e4","9edee5d157","38cd08dd75","3f4d1d9cc0","c85daf866a","b5fdc4bd96","c23551e98a","fd4a50d5b6","b51a5002bc","2259cbd79e","bf3adab821","c85daf866a","b5fdc4bd96","c23551e98a","fd4a50d5b6","b51a5002bc","2259cbd79e","bf3adab821","4fe26ebb7c","bf7ace50e2","741ade0ec0","2ec3ec2e6f","5eca245ed2","a72e79b687","04e3b97b60","055ff84471","a54dbd9c87","f8cef8cb77","51a220372d","c01c7cc2c8","e1b1762489","934aa93670","ee51552a3d","c0a90cd6df","bcec120a35","43d05ff8ee","d7d07730fa","c0939a287d","af0e5769b6","dbd8495c70","10bef77d29","e383df3308","03e0944d9c","10b63afde1","fa457152cd","0c888f7aed","e6ecfb921c","d4fb7a538f","bd89343a38","31325ec20d","5ea9693e9e","39cff26c08","4b81b8b1ac","e6ecfb921c","d4fb7a538f","bd89343a38","31325ec20d","5ea9693e9e","39cff26c08","4b81b8b1ac","20921567db","e8b8a50cd3","53022b0643","ffa88a3570","9370e4dbb4","2dff110aa9","b45c8c9c16","234072973c","97800b155a","0665b84ea9","1aa90ecf94","1da1c0cf68","dad37947a9","7cfd0c343e","47deb764bc","f0955ea819","d46d0ad5ed","11469ee62f","4b1fe878dd","7eca393638","d848c0f297","5538281f39","b755967fa9","611c2e31f9","cad8b8d19f","fa883f54a2","6d1d1a5fbb","edc99c4717","5d5a6413e5","f53c66bc2d","c361a798f0","e8bd2c9e68","2cb1c1f4da","3239272f4c","6b786123e9","5d5a6413e5","f53c66bc2d","c361a798f0","e8bd2c9e68","2cb1c1f4da","3239272f4c","6b786123e9","782ba39237","40c8fde2ca","f84479453e","76605f4462","e6190a8003","5fafd99868","fe5567d1b3","d96fe567a3","b0dd866fd1","e1f8841de8","9a5eec3cee","dd02db31f2","fe61b05a0b","b8567b5d91","dd36ca540b","eedc028eba","7556eab801","aa44bb7d35","e70fe3d689","5479144587","55c8db252d","f72ce797b9","8d2dd718f1","f3383356fe","2a0d9b32a2","1d9815fb10","cbaae09d07","f577e49741","f72ce797b9","8d2dd718f1","f3383356fe","2a0d9b32a2","1d9815fb10","cbaae09d07","f577e49741","b505a67ef0","d2463784ce","5067e2f036","a0c046eadc","07f0a66879","c75bc54fd6","b0b09ada64","a56ce4e04b","05cd3f8203","37b876ac84","44041aba1b","240aeb8d45","e38e02daaa","602a2037bd","d640d8cf2a","c7fc4dd27a","f980571fe3","3466cc83f5","76a025600c","c6592c1db7","c5d02dff80","bb9b108359","77f84799c1","8b03567165","977abaebdd","f959c7071d","678b3e0754","4b22b0fa4b","c0fa32f704","82d2cdaefa","cde3a21f29","a13b2bc416","bf7a3c1807","7b08f780ee","e5fd7646bc","d640d8cf2a","c7fc4dd27a","f980571fe3","3466cc83f5","76a025600c","c6592c1db7","c5d02dff80","d640d8cf2a","c7fc4dd27a","f980571fe3","3466cc83f5","76a025600c","c6592c1db7","c5d02dff80","1722190e5c","ceb58ef03e","4b42dfca2c","71a7a650b6","dac8830a3d","972a846586","811eddf9ff","1e2f608840","d098e4fd44","0408182142","815730bde6","187e0957e9","49664ad523","9787a2159e","c7c41eaf59","2b103abaef","182942ca6b","8de6810994","6abc0f2313","82603b72c9","6c982b6127","627f6f813b","39cb354453","7d5e221b41","380d3a64c2","c1b11347bc","020501f3ff","89f99c8cf0","627f6f813b","39cb354453","7d5e221b41","380d3a64c2","c1b11347bc","020501f3ff","89f99c8cf0","c3f7aa800c","c5dbc9ca2a","8b882f625b","f7fd76e7fb","6a4555ddc3","ca7d25b57f","a219a48dbd","c3f7aa800c","c5dbc9ca2a","8b882f625b","f7fd76e7fb","6a4555ddc3","ca7d25b57f","a219a48dbd","7de021ac14","b336ca4757","20fd500ff8","120a95fd1d","eda88e868d","ebd06bc1e3","7c45592a81","61f44c5058","d656318328","b4bf763c53","1189fb9e43","becdedf5fe","cfcf7dae12","97a410b114","bb106244e0","e11851d8e4","0f3dae4602","20c3f947fd","f81f7ed256","24ccda2eab","97ec784004","cd707e6a07","51ccc5b9af","0ab38287fb","f997bb8c63","b46cd0ce40","32afd41933","33dc40c910","cd707e6a07","51ccc5b9af","0ab38287fb","f997bb8c63","b46cd0ce40","32afd41933","33dc40c910","bcf48bcac5","bb88553ec8","cfc1ba108f","ea32a0c652","6ac973874a","ae1fe7e396","de4dc0215c","2f0b477640","333caed690","fa792cefe7","72133a9c12","c194d6eebf","7812dde02d","80d41c7410","6311e15542","ba6dde219a","671e04040d","45f88de912","b18046762e","d06e37e72d","1f6beb6a85","0ee0d2435e","c5cf5f5d5e","7c54087b5b","1faf27465c","dd74504246","426bc92455","0a3426039b","0ee0d2435e","c5cf5f5d5e","7c54087b5b","1faf27465c","dd74504246","426bc92455","0a3426039b","b6128dfe8a","7315514932","2b1e6f53fb","267325494b","894e5487f8","4f6e5945f7","c385cecef1","36f31f1e06","4c82a622ec","37c8cd4611","d53968e0a4","b86b431c4d","93587846b0","dbead2f08a","2c2648e925","7f7ebdd638","a79d3fd93b","0cfdc4c591","07294b6359","b2ed86482b","6aeca9a4fe","2c2648e925","7f7ebdd638","a79d3fd93b","0cfdc4c591","07294b6359","b2ed86482b","6aeca9a4fe","4ef3f4a123","e33d8af76c","bfa5520264","06d1762eff","d1830afc3b","a415467d28","383ae0fdae","fc68882a7f","b91dced019","b08948873a","e6fc4208d1","a3ec3063cb","f4f5b2bdc8","8350cf9f1a","046023af38","274539672a","d5cb744043","914623d6b3","6eb5d055af","3cd6224b67","db409768a1","0b0a91ba2e","ef769a0361","b8be6236fc","bc3ecd7cca","7d94ce88d1","6caa2c0bd9","aefdff06cb","522bc8ec18","134655ed59","9ee009cf75","d9da4e2b21","9a228adaad","ca08b6bfb8","2455fec942","a002dba437","ba8c9db6f1","7069031054","8c826ffc4b","4981f4f054","de29fdb598","5438ffdd32","a002dba437","ba8c9db6f1","7069031054","8c826ffc4b","4981f4f054","de29fdb598","5438ffdd32","cb0017cc7e","95f0be4371","8bcb6d8f4b","fe8ba56c26","1a42e00a23","93e49ebb7e","ff6b3a4cb4","cb0017cc7e","95f0be4371","8bcb6d8f4b","fe8ba56c26","1a42e00a23","93e49ebb7e","ff6b3a4cb4","cdea7f3f95","2eabacffc5","deb68ffc2f","821f85703e","5a3cd45188","ee572a5377","85dc8b62d5","f8eac221c4","b64eedc5ea","ae5f569221","f0efaf11ff","61079964c8","b4be3f6484","fb2651b419","c4d837356f","c2827e0ef3","a8ad27861b","7ef1695123","aecef124c1","e6931e1adf","8e3eed953e","76d1ffcc36","286b18f8d1","8bcf4042ac","3091b5467c","38df9e9176","ba3e1d5dfd","fab9d10807","38cb6fda75","785c38c710","04a7925efb","3f3b6d48b0","1026999584","d8549f5eb7","8823d13801","1bfae436aa","0a5cc168fb","3522514211","e20996284a","d327eff28b","42026737df","6afcbf7976","e901024a6a","05bd001b1c","be95ff4d9e","15f74f07b9","881029c3d2","0635168968","910cfdeb57","4f4798007d","dd87e3189b","4f513ad65e","11b36d8ae5","a233f15025","4ce9701399","064eef85a8","1eb3a42cc1","7cd0b74bfb","7a81c7b342","c4bb11b593","71f61176cd","556479e88c","8a7568df55","ed022dd255","8bc0f193fc","ea471ed985","784a9f3e3b","c2aada4909","b609aa11db","ee633072d5","88a7436230","1d23541392","dc0f33acda","3b330fb2bc","9c4ecf403d","bb5b5d510c","d3f451da52","88a7436230","1d23541392","dc0f33acda","3b330fb2bc","9c4ecf403d","bb5b5d510c","d3f451da52","5b4ce3fff7","cc927ad455","db2d0c5168","48c73213ce","5d78588bd0","cac8d734b9","173f8f01d7","a04ee907c1","b6e3fc1271","05f826fa5d","0bbe93c720","a0911905db","28558f49fc","7d2c0bb326","a04ee907c1","b6e3fc1271","05f826fa5d","0bbe93c720","a0911905db","28558f49fc","7d2c0bb326","14d22c81e2","f582ef90a9","563b74ea56","d9377398d1","7cf64a1e30","0afa451f0b","a5f4e24d17","380fb6fbb2","971aa40212","d7041d2b54","64dfd9abba","88e6a8a80d","0139c34f9b","087da7f0a7","1ba09cb7e7","c6adccccd5","e9669fb4aa","da2fc4bccf","2ad3a57b71","2179713282","91bac09e1c","ee6d25f3d0","d49a17f065","8b89b934c9","13105fc585","a1784fda27","2ed714a6b1","b7df441cef","380fb6fbb2","971aa40212","d7041d2b54","64dfd9abba","88e6a8a80d","0139c34f9b","087da7f0a7","78c4b26060","0ddef8756b","1a23f02b5f","b30c01ee4d","4a03efc8c0","d40f45dd22","d7e2f875ae","78c4b26060","0ddef8756b","1a23f02b5f","b30c01ee4d","4a03efc8c0","d40f45dd22","d7e2f875ae","78c4b26060","0ddef8756b","1a23f02b5f","b30c01ee4d","4a03efc8c0","d40f45dd22","d7e2f875ae","b5e3ff210d","bff98287a2","fc44e7d09a","8aa4efe0d4","706d3bff20","df3fb71997","e28399a6d7","21d87cf807","1d2e9ff5b6","cfe341c7f1","e5bdb16cfd","19efb46a64","34970cd6f7","e82dbb477c","8eee68d93e","a870910714","7dffa00141","8ff169129e","cea94ec795","ca1c86352f","0689c6451a","1a1845160e","cf617d3bd6","3df30e0db4","237822c23c","587a2ffc66","f32723b8d2","c6f106a776","8eee68d93e","a870910714","7dffa00141","8ff169129e","cea94ec795","ca1c86352f","0689c6451a","30611754de","126396505d","78f1ddde64","154bcd7bea","aa83ad1917","749adb305c","ec35f9322b","30611754de","126396505d","78f1ddde64","154bcd7bea","aa83ad1917","749adb305c","ec35f9322b","15260f741e","5c2fe12468","1f4bca9145","a1458bd105","d690d11e76","0717e7cf10","5dd7c4a866","15260f741e","5c2fe12468","1f4bca9145","a1458bd105","d690d11e76","0717e7cf10","5dd7c4a866","25c0e6d65e","9063c056fb","2c0a892009","90ee583931","ed61450ce4","f63e3f1d03","fb862dd0be","25c0e6d65e","9063c056fb","2c0a892009","90ee583931","ed61450ce4","f63e3f1d03","fb862dd0be","0e97c53620","b063024a49","b035749e7a","d30e4fe2fb","9674c272cc","807df56abe","ccead4382a","912a392eba","43a971a86c","8c784595e8","ef34426d8a","f78e393e3e","04d98e74f3","ad231ff3a5","159e934bb2","e19260b94c","b94d03778d","0105b81084","1e1764cc27","f2dcf5e133","efdff34020","dcd949b881","68456fb91f","a757569477","6a5fb2b6c0","6d48d2f9ff","22eb1db11c","cf441173a3","d72d900e80","ae1ff98a2a","e4f6b9fe0b","928802f550","6e1c107c93","758c6b0493","903430fd34","8d44e5821e","2b3c79b7ef","3381ee401c","3821201ead","492622df19","be7f9e379c","ca3e4f6008","8d44e5821e","2b3c79b7ef","3381ee401c","3821201ead","492622df19","be7f9e379c","ca3e4f6008","c9ce83e4bd","0075334be8","9b999474ed","b09fcb2c4e","e5f80c9413","76e318dd1e","ab9c9b0673","c9ce83e4bd","0075334be8","9b999474ed","b09fcb2c4e","e5f80c9413","76e318dd1e","ab9c9b0673","217dd2a172","b51f5e9ba9","bf8042bc30","45e9d60e68","3564964a41","dd81c1cd24","f7be40f5c2","217dd2a172","b51f5e9ba9","bf8042bc30","45e9d60e68","3564964a41","dd81c1cd24","f7be40f5c2","3896ed6a67","222870519d","9b0a89082d","9013407445","83a25e5aa2","ba854e33f6","91b1bfd77f","ecf3406b61","f0b3a157d5","e565da08de","6bca8dafa0","b9d79bf87f","f2d78d1279","dd4ea1fd7b","ecf3406b61","f0b3a157d5","e565da08de","6bca8dafa0","b9d79bf87f","f2d78d1279","dd4ea1fd7b","1b3e4a0725","b854df06f5","94751009dc","66aef187e5","17c5b697cd","3179f2fdc0","6e0f240e29","bf22c33181","e396f34aaa","f66a3c2288","cc5b4037d2","475ac3559e","ac77d14118","29c479823c","feb57c1df3","1d025021f2","6ef4d453be","334953ab2f","0615fd324d","ecf25bce02","e12d588dff","6a2ad2461f","5e92fa8245","e28460fb0d","2c87bc1509","2366f08618","a454ed7d3b","d9df26977c","6a2ad2461f","5e92fa8245","e28460fb0d","2c87bc1509","2366f08618","a454ed7d3b","d9df26977c","2681d1619c","6bab74bcf9","9b507a2977","4bbbc1d3e7","3cddccbcb3","446bc76bda","aef31ece55","e1aba064af","387e300139","656a636a1d","8c312c34de","c078c0b3a5","a4bc4f050a","4f4430dd36","e1aba064af","387e300139","656a636a1d","8c312c34de","c078c0b3a5","a4bc4f050a","4f4430dd36","b489c50b89","c0d131a9e8","49809e1e5c","efbd84883a","7b3649abfa","d842788524","10421aed40","713b2afcef","5ca7813dcd","c4af66e58a","49938b6309","2b197ca8cf","44b489f25b","4feb503111","bdf7cc8b28","bbb3065790","e26e5e56db","09ea422cc0","54ab6b54e2","af4a2bf9a4","f1c84c3cf9","0fa5f595b0","453ae0392a","8b3526806f","92817f4d5c","89c369f1d3","40ffced0c8","b2d5f8075d","db2bf6b941","333a7deb39","5e4f3fb9e2","37d6430c44","f16793bccb","6f50d7a974","b4b837da79","0fa5f595b0","453ae0392a","8b3526806f","92817f4d5c","89c369f1d3","40ffced0c8","b2d5f8075d","2d60e70438","161ae8f1cc","67990ef5a9","f4a7dc8005","a290852ed3","805868bbc8","fbd451ca86","f68d5b0a30","1d2f2e31ed","45167f7310","c00f0ae65f","347e528fa5","749a948639","284a04351e","addfe1277b","634a2b9f46","4f70fa7379","c2031c5333","677e73d995","4b1bdb0324","f08af7ff29","cec40f2c0a","2b47532e73","12b50327eb","26c6ced459","fa2c4ade72","d5d27590a6","7d3e028a9c","37f91cebb2","a50a912532","aa16ce4ac1","43f68740e6","4ce52a07fb","31cc06d89e","72a28021dd","607d208895","ab9477e592","3ec11ef200","ffc2d2aec3","8382c97064","0abf6921ca","b8266083b2","713b2afcef","5ca7813dcd","c4af66e58a","49938b6309","2b197ca8cf","44b489f25b","4feb503111","e11363cce3","3a2def417c","fa6ae9d814","e81d81a404","fdd26b3c9d","29726fd8b4","48264a09ac","74069de32c","d35dbf110b","b543bc5c81","9b0696d03a","3b75f1aeeb","2838e99530","475faf4619","bbbedd2e45","840e6edb49","77337bee26","5c4d753bcc","5d5ce6582e","59b6852e4e","b0a7aa9ca0","8fb7a0ab6e","f1075965ef","75bcdc33e1","3028e189bf","27c868983c","fdd856cf57","3c74b1f428","934e01bd86","8cdf40a1aa","c115cc6cb4","f707a1fcfa","c2ed33cd7c","a234a77110","d1e7daae9d","60e6c76a81","0ea14ecf48","2dbc74f0e2","4b27f0c22b","c95d731ed8","3f1cbfabd3","31567fdce6","60e6c76a81","0ea14ecf48","2dbc74f0e2","4b27f0c22b","c95d731ed8","3f1cbfabd3","31567fdce6","d19e76a76f","0c6761165a","df7c11474c","e64738c20d","b42aadade6","76d6739a98","f7f3a4c3d1","6bc4c37541","b2b8f1e0e0","bf127a92a3","f8eca1382c","a55429bac7","64ae09d655","60dc0410a6","c693592a86","3222d2a64b","fce25d9dcb","7fa23469a7","6bcbcd30dc","14b5c7ce20","819b8bebe2","c6b92ac6bf","92ccf117bc","9d8b66b638","dd9dee3d65","9609d764f3","a9c76f7a14","ad16bf140c","3f7e05406f","30b5831fba","41f00b087b","1476e46580","374f67c480","9fa0a6c176","5a0c197bfe","d519487936","750f377094","2d2b5c0f30","66c4411fc9","4e5ba566d7","6e74962dd2","e041333711","d519487936","750f377094","2d2b5c0f30","66c4411fc9","4e5ba566d7","6e74962dd2","e041333711","467577261b","3ca69afd21","c8a192ce08","4bfd593992","e6e229db49","209a6b05b4","3b9db60d0b","803efd0c5b","aa06af4099","fc3da21331","65ef949426","928738a823","6faa499ff0","723f5f7457","aff74e7e20","2232222aeb","7028407d05","d560708ccf","51b15a8a69","6f002ac106","bd9f2ce12a","32738f87be","977fa7a23a","b91f248d0f","ddeb69703c","fa9d3dfb35","a511d189e2","0e4841849e","654964ed9a","97060b579e","00eca2ad6a","57759a2afd","81c7a5795d","0a6d44b040","71b461c6ad","654964ed9a","97060b579e","00eca2ad6a","57759a2afd","81c7a5795d","0a6d44b040","71b461c6ad","41ad95aaf4","e0afc2675e","10bc4ea335","d9c562b1f5","7d24f1b589","61e0403560","60803829cf","c8fe125a4b","c6276c3f7e","e8de3903e3","f6bb175927","ce93709b7e","19ee975140","253d96da38","4308f28e4a","9e5c8b8282","4e23ec5a21","b03bbff9f2","db9d1f8cfc","63b09523cb","55367c8106","4308f28e4a","9e5c8b8282","4e23ec5a21","b03bbff9f2","db9d1f8cfc","63b09523cb","55367c8106","4a08612481","776c156b86","fab3bffae8","22e549732a","61a8a4de5e","33e5f71e91","d2267e2a20","9c464a828f","7ca099b3ce","65cdd3536d","bd05e078d0","a10921fff9","0b966431b4","f7877fe433","9c464a828f","7ca099b3ce","65cdd3536d","bd05e078d0","a10921fff9","0b966431b4","f7877fe433","28554c5aa3","b1cb0d58ff","9131d5b8cd","d5d50e71d8","fcc54d05b2","ff2387e1e6","9438e186d4","1cea03b84f","55d04744f0","4f825ce0d9","9e8e38f037","40fb80b49c","f9f02ab585","006cbf5d03","1cea03b84f","55d04744f0","4f825ce0d9","9e8e38f037","40fb80b49c","f9f02ab585","006cbf5d03","2542cae106","e237cfd1d7","5bd8380a67","35e577a316","f6d2e71d01","0544ae52a9","1d88ec4a41","2542cae106","e237cfd1d7","5bd8380a67","35e577a316","f6d2e71d01","0544ae52a9","1d88ec4a41","fed042d797","a78e80aaf2","7da4375c46","b1588a5843","f1e6b338a7","a362976f7b","f4d401617c","96c1839a6a","1eb026298e","b6d99dc8ea","639f313ab0","202a1715e0","9fb810646e","ad36631f9e","9aa007ccf4","6411c97126","7e8b063091","5c94363f6c","0f29c28d86","81bd057ffa","9815280b94","6998c25371","0e034ec522","64b6a225b4","fb861738d9","0e65f370de","ed72f69d4e","30d06376f9","99fcf977ee","f167df7d50","585907f351","5ceddcc825","8ed9fad1d6","215f7ab146","f60d70e741","6998c25371","0e034ec522","64b6a225b4","fb861738d9","0e65f370de","ed72f69d4e","30d06376f9","6998c25371","0e034ec522","64b6a225b4","fb861738d9","0e65f370de","ed72f69d4e","30d06376f9","ee66aefa7b","7a4ffb15b2","e0ec4fe777","047b9f9a31","9b87756208","2dedc91ae0","113d034b62","ee66aefa7b","7a4ffb15b2","e0ec4fe777","047b9f9a31","9b87756208","2dedc91ae0","113d034b62","9cb5b75a21","916303aee0","acc0eb2565","5d90676d4f","a06ac7d696","31eb1d9f85","ee5d7781b1","3292b3eea0","ac766ec6f4","9b2ada484b","bf4384c379","2650269498","2d82a93387","2d9da9d80c","c002a83418","f1b6931453","246ff3f845","80b2662c63","66bd78ee5f","2a82625c14","362c1bba76","fe020db0f9","1448678a8b","7143bf19ae","a918074347","becbf97586","4a476be7ef","00a24b0da4","6321202dd4","bffc7fb513","e35dae4957","86edf36f73","445a31f694","7e0dbc912b","8217aa2275","ccc1a76ee9","3b6e72eb9e","3058f57160","130e8cffc0","3af7f51d75","561916c624","68cc521e9e","7a169311a8","3d1ed39b65","3cdf6b27d3","bbbedf2b05","cb4ce243e7","33193483da","1696528a91","712b2af4c0","47cf3f1e0e","77428567e5","690aca2209","3b799bdf0b","767855a458","9d18ddf744","712b2af4c0","47cf3f1e0e","77428567e5","690aca2209","3b799bdf0b","767855a458","9d18ddf744","bc0e495b0c","235970d6c4","fa7bd4cec8","eac9b0cafa","1bfb75fe2b","2761e64921","2e69540a1f","e4703699e3","89443f5cd5","08df0c1876","4df19fe9fd","670d9afac7","497c49a667","b4eb88582d","979ccd8c61","ffa5fc3448","9ac428b165","7afff0dc72","5dd06b62bb","f496b49266","e67a8dec17","39c2419d43","9539f2f2d1","ea42c3608f","ffd8efc603","a9ac9769dc","8ca94c65dc","41c9347109","979ccd8c61","ffa5fc3448","9ac428b165","7afff0dc72","5dd06b62bb","f496b49266","e67a8dec17","979ccd8c61","ffa5fc3448","9ac428b165","7afff0dc72","5dd06b62bb","f496b49266","e67a8dec17","b9bfbe6b07","be47c129c6","d88445528b","4c0a9e5124","c9abb50ae1","ce36bfecb6","114d13b010","7b0b053612","7cc1c5983f","353b2495a8","226b2019c7","5c58f3145e","47ecc0b8b8","1fe5eaeac3","0d53267d62","67dc6bfa5e","3a9b0a1033","4c154b8ef2","a01655a7bd","c87fefa303","b238d5270b","7b0b053612","7cc1c5983f","353b2495a8","226b2019c7","5c58f3145e","47ecc0b8b8","1fe5eaeac3","785e68c931","9b8cf815d9","150c8c6cf8","950e7fe1d5","ef7aec546d","7d52f3dc81","7fb2254460","d058ea27a2","e0366fc967","94ef79dbd1","662f5105e0","8c98cbd1bc","0a3bc3e2ec","092f8eb372","79c931bcc3","24c6482107","ea37578636","b4cb25e1a3","3673499a21","60898834ea","6aea20d41c","304470a2f1","e5528bfbb7","f9de1e578a","fcb94f2d43","ba3d23e639","f5a01eee68","2ff91e2b21","304470a2f1","e5528bfbb7","f9de1e578a","fcb94f2d43","ba3d23e639","f5a01eee68","2ff91e2b21","aad372b112","08bce06597","0525d8b95c","7d7678bc47","d74a3ac6f9","f49d21a15c","6a8dd1164d","aad372b112","08bce06597","0525d8b95c","7d7678bc47","d74a3ac6f9","f49d21a15c","6a8dd1164d","5c823bd2d6","e7a078c0d9","25383a4240","39d3286cea","5b4ec8b3fc","1f50fbe364","b0a02b37da","5c823bd2d6","e7a078c0d9","25383a4240","39d3286cea","5b4ec8b3fc","1f50fbe364","b0a02b37da","db614a51dd","b7e25d4730","7187cff76b","f77f4244b8","0fb4cc2398","7e6a042502","e7abd67e14","6f819b32e7","55b226178f","fd550c9cde","cf0a30f142","b366af4680","a14c58ee30","55ceb2b4ca","db614a51dd","b7e25d4730","7187cff76b","f77f4244b8","0fb4cc2398","7e6a042502","e7abd67e14","bce990c5ff","8536cc1531","660d62b99c","1f36485691","906224b0aa","e5a8bb0be2","4b8b9f29c5","bce990c5ff","8536cc1531","660d62b99c","1f36485691","906224b0aa","e5a8bb0be2","4b8b9f29c5","97f03081d1","2530e8f37b","c6af10cfb2","e2d2a31e4d","7d9b64dbb7","7c55fac646","a61825e154","97f03081d1","2530e8f37b","c6af10cfb2","e2d2a31e4d","7d9b64dbb7","7c55fac646","a61825e154","3958ecb5c4","ea37d92865","14e8ed0fa6","a1922af4a4","bb3d41d534","1e2891dc6b","a03bdaabf3","3d43074231","fc5bae2b2a","d1c0132ab8","01b3b94a49","ea9d6a78d0","582e8615cc","9883f260c3","3e25f78edb","0914b32dc1","c00c29eb43","83a59372a7","4021898305","5ed77d4d2e","05b384832f","3e25f78edb","0914b32dc1","c00c29eb43","83a59372a7","4021898305","5ed77d4d2e","05b384832f","cd8b000012","e5ca801428","e667effa97","14e58f8c83","ef0af09ee0","d1ed3c7c27","3d5f10fd57","cd8b000012","e5ca801428","e667effa97","14e58f8c83","ef0af09ee0","d1ed3c7c27","3d5f10fd57","72771b81ee","24c33810e1","7d2beb3d09","111514dfac","44a6846fa5","def12054b7","30eee74f62","4e90967e3b","7674abc8f1","4db95855ff","2dac6d5634","e5a69a8150","67bb2586cc","c9f398c28f","cd8b000012","e5ca801428","e667effa97","14e58f8c83","ef0af09ee0","d1ed3c7c27","3d5f10fd57","d4da5283aa","f16167bee2","ea9e94ba3c","1ea836c6ac","4445e4ab69","3c728c85e1","706314afe7","f337a1a57a","e9bea80a14","0834470ccd","224ab238cd","c5496dda51","2b95ce84c3","f1f755727c","f337a1a57a","e9bea80a14","0834470ccd","224ab238cd","c5496dda51","2b95ce84c3","f1f755727c","f337a1a57a","e9bea80a14","0834470ccd","224ab238cd","c5496dda51","2b95ce84c3","f1f755727c","c139f9eb57","8e6f8e68a1","5ed133b9fd","26ea754c31","a976ac7e00","0d5bf69ed5","8cfeeef24f","c139f9eb57","8e6f8e68a1","5ed133b9fd","26ea754c31","a976ac7e00","0d5bf69ed5","8cfeeef24f","18d3a13d47","c883bea7d7","1d1b0c4017","138e653872","f3d5cd1074","caf271eed7","60d0d63e64","41fdaa3333","bc6b773014","ba313ac5a8","d67024f06b","65ccd68e90","9dc4220eeb","883f9035df","bd50a716d1","e12ef92857","bf36d00e94","d69a308e92","08c0509d4a","2b242b4b32","8a86937e58","bd50a716d1","e12ef92857","bf36d00e94","d69a308e92","08c0509d4a","2b242b4b32","8a86937e58","c139f9eb57","8e6f8e68a1","5ed133b9fd","26ea754c31","a976ac7e00","0d5bf69ed5","8cfeeef24f","a5c301db51","0749f0a7cc","2c714525bb","e0cbefc640","13936fd907","2532cabc94","864a67db66","00d7cf8361","fea8e21ffb","4650159b81","803eb65462","b10f87abfd","4b56466bef","98928cdd2c","241ab7875e","5973f87500","684217c4ad","9b6e9c8bc6","89ba472468","d695ceb2fd","8960775c95","241ab7875e","5973f87500","684217c4ad","9b6e9c8bc6","89ba472468","d695ceb2fd","8960775c95","49bc9dfa3b","2721fb3d29","3472c57b84","c3cf2a3e3d","ce28ba37e6","4d49d37f0e","2ce4013f55","90765aeffe","bc41572279","11e7e20cb7","73d2d8cc52","a189e0df1f","fcf53446cb","2bb741cdcf","90765aeffe","bc41572279","11e7e20cb7","73d2d8cc52","a189e0df1f","fcf53446cb","2bb741cdcf","90765aeffe","bc41572279","11e7e20cb7","73d2d8cc52","a189e0df1f","fcf53446cb","2bb741cdcf","cd25397eef","4dddc71511","2f5f54acd4","9bc3d7975a","f5f28fad26","328434e37c","519a71f163","d5b5277658","456ff028c4","02b09be1b5","03dc9a3a08","9d24855f7f","9a4bf4a03c","1f73b8d18d","d5b5277658","456ff028c4","02b09be1b5","03dc9a3a08","9d24855f7f","9a4bf4a03c","1f73b8d18d","aa734a21bd","dc7cee4b58","425d47563b","e252c25bd1","c7b614a524","fd1a8f8768","5b3535555b","c8c9083aed","1ccf20280e","9cfbb6d359","f64dd57294","e1ee9b2094","e1919f5aaf","279353034e","c8c9083aed","1ccf20280e","9cfbb6d359","f64dd57294","e1ee9b2094","e1919f5aaf","279353034e","624ed90d6a","96965b358e","850ec22972","6077670b44","ddb362083e","8b907b9af6","5889b63b88","7970983ed5","8e939a2938","e0ba78ffa8","048f922a71","4b88c0dc0d","28006d0753","b567b386ce","29aa82741b","47170dfbaa","5c83c6f9d7","b23b35180c","96d3f824df","8d39b267d7","e30d67f90e","f35885f999","6cdc5221b5","2b88acdd8a","5ffe94e8b8","40bfedc0fb","9cc899060d","5b8150d067","7409e46bd3","aa0cc98b4c","8a0c6e133c","103cfa9924","18b5dbd7d8","7ef32e5a2a","531541d6e2","975b0618c7","28dffc66f1","c60a3a3674","d5a9fe3d5e","6c514cfdd3","3f88b203b8","9253c3d2fd","0f11f20862","33194c3bab","ee22d9a4cc","f943cb436f","a23c2a902f","79540a0fd6","58bf17be6b","d3da3f6cef","c78454ea60","6ad30bbee2","2073c10662","2e7f25ff4b","ac633238b9","ee93e4a7f9","1616b09503","536e5840c3","dd62f4444d","e286b540b6","de2cf1d82f","f7ad35085b","bf6b85bace","e7c69dd88d","8b85cddd7b","06356663e3","97c4c490a0","a84b216ce3","0902bad7d3","2b4b9b3c8c","e7c69dd88d","8b85cddd7b","06356663e3","97c4c490a0","a84b216ce3","0902bad7d3","2b4b9b3c8c","32a325c014","b7e58aa300","5856c21847","d2b7261f1e","cac947ec6c","e540e5bd90","77a8df2be3","b030449491","7e8ba89c4d","73a080a66f","2ae941aca7","6843d38403","fb8f9c7a21","f799629ad9","7409e46bd3","aa0cc98b4c","8a0c6e133c","103cfa9924","18b5dbd7d8","7ef32e5a2a","531541d6e2","7409e46bd3","aa0cc98b4c","8a0c6e133c","103cfa9924","18b5dbd7d8","7ef32e5a2a","531541d6e2","4bfb9f23dc","8c692cac2c","223e06c2c3","9f23ad3bb3","daffe73d46","36a5a1c629","63a5e4d652","9ec76a065b","716a146cc9","7571236a7f","6f62586880","480178151c","70bbca6cd8","266d3880f7","14c308991f","f3148c6a87","b079245582","2182aaeb44","2ea965f174","683b87c0a8","68838f86d8","3cae040180","49c22fd938","601f74a147","23857e1edf","cc67ee4694","a832866ae6","5d200f75ec","3cae040180","49c22fd938","601f74a147","23857e1edf","cc67ee4694","a832866ae6","5d200f75ec","b9a187962d","5303746da3","33dda16994","a118c6fb43","dac29fec85","3e315f0d08","2d57451b03","b9a187962d","5303746da3","33dda16994","a118c6fb43","dac29fec85","3e315f0d08","2d57451b03","797c7cafd5","49298b214d","7bbac4c168","dfe64d9fbf","c70a7e8c0d","430a877e4f","65193e19cb","02498e0430","866e04e19b","60a655757d","6feb2ff054","065e5816f7","871775bfb3","f0b0b5895b","f04f6d125d","74b69e7b8a","fc1e88c1a0","912f79b4c4","171945bba9","09b8ac199e","e945a5cbeb","ee1748d81e","7fcbf7e81a","518914b067","5137729913","71290b1ccc","8e84a6534d","d10466d7ce","ee1748d81e","7fcbf7e81a","518914b067","5137729913","71290b1ccc","8e84a6534d","d10466d7ce","c2a835f588","20a6137919","9827b3398f","25e490c353","cf8fb3b126","99c35dc791","1f4a104d8c","d5d19c0656","f04f6c0901","0beaab0a53","2900338c64","dc984def1f","c2125b3969","0d787116b4","d5d19c0656","f04f6c0901","0beaab0a53","2900338c64","dc984def1f","c2125b3969","0d787116b4","c15b88bc51","9434b3a459","2f92d92dc7","9ed00f5fa5","b1ccba2619","0f7cab593c","9902ea99e6","c15b88bc51","9434b3a459","2f92d92dc7","9ed00f5fa5","b1ccba2619","0f7cab593c","9902ea99e6","9b322ea64c","84e9eeff5d","f93b67b484","35bd37cb92","a4d1baa820","d752ef0f40","987505f913","f6ef7de939","b021336b97","cb947262c4","8c0cef9bb8","081c628775","cd7d094e7d","03576a144b","383d6c6e3f","ded144b6a2","5baf918bd3","fafffa6663","7fd7aae38f","ff591c7f34","cfbbcd7f9e","8cddbd7f4f","fadddddb86","d353fc03de","fdc15325a1","dcc2023573","631df74253","c8a0cd3043","8cddbd7f4f","fadddddb86","d353fc03de","fdc15325a1","dcc2023573","631df74253","c8a0cd3043","f44cffbbed","124c1a012c","f5b3c2bcb1","7e4825a29f","53da24559d","298979140d","4491a5be63","cb696d0c78","ab70db66eb","fc7ad924af","43da14b0b0","444724570a","5c02c0668d","f59d0aacf8","098bdddce1","b386898a9e","b067c77fb1","28f526a933","409e2178a0","71ecd21a23","cbac802736","cb696d0c78","ab70db66eb","fc7ad924af","43da14b0b0","444724570a","5c02c0668d","f59d0aacf8","fbcb5fc0c5","2260d2ce8f","04fe085b19","2d92852420","21dfb57132","d19206e909","9a142e0752","74ab6d67bc","96fd1229cd","2b6217c73b","15894d1b5d","d2d7921d0d","42b63d4be2","fb2d8f50dc","9569c6b8a3","be2caeeb22","5a2eb0cbb4","10b23afce7","3e2bcf44c4","24d6c2bf7a","3e72b87648","9569c6b8a3","be2caeeb22","5a2eb0cbb4","10b23afce7","3e2bcf44c4","24d6c2bf7a","3e72b87648","996abb3978","af7a64897a","734cbb26b4","1dc00ada1e","ae4302a56b","2bccff175e","7aaaae67d0","0b506a2f2b","844cf9dd6f","80dee565d5","7ef2248a6b","ff6c9128b9","5de8d10af3","0b56de5fd4","ca468f51b2","d751d39514","6b2c48b56d","5fdd2f6e90","622f2fef92","0ee319c061","a14dd1c7f9","ca468f51b2","d751d39514","6b2c48b56d","5fdd2f6e90","622f2fef92","0ee319c061","a14dd1c7f9","9c8c74de5f","45660343b6","71712302b6","e4105b4096","85e45545b3","f17af334d0","03b73d23ae","ee6da6bbd0","baad031e3a","332422d898","a256fafe7b","84c4adc550","ff0779f114","9382789df4","7e7f2032ac","ff7f804bf6","8d285b3ed7","9cde9d8b35","5844bd0e78","44122d45d8","13e4a4bee4","ee6da6bbd0","baad031e3a","332422d898","a256fafe7b","84c4adc550","ff0779f114","9382789df4","052ee89465","af065d5504","5f8ae507b9","94ac41598c","eb92fbd79a","07eb5c635d","786dc26724","052ee89465","af065d5504","5f8ae507b9","94ac41598c","eb92fbd79a","07eb5c635d","786dc26724","960bf595f5","c4ddc603c7","fa4cb6bcc4","47be7db09f","d305e1ab7a","e5ac044808","ca0e80ede2","c49b70014e","fd839c3505","f83f480aa2","a3cdc91004","c88ed2601e","52c0c006dd","944cc06430","c49b70014e","fd839c3505","f83f480aa2","a3cdc91004","c88ed2601e","52c0c006dd","944cc06430"]} ```