Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 3.45 KB

shark-Q.md

File metadata and controls

63 lines (42 loc) · 3.45 KB

Unspecific Pragma Version

The compiler version pragma ^0.8.0 is very unspecific.

Locking the pragma helps ensure that contracts don't get deployed with unintended versions, for example, the latest compiler which may have higher risks of undiscovered bugs.

Insufficient NatSpec

All the functions and state variables should be well commented using the NatSpec documentation.

Here are some instances: File: Executor.sol Line 80-86 File: Executor.sol Line 274-293 File: Executor.sol Line 372-374 File: Executor.sol Line 376-382

Lines are too long

For readability, the maximum suggested line length is 120 characters.

Here are some instances of this issue:

File: ethereum/contracts/zksync/Config.sol Line 8 File: ethereum/contracts/zksync/Config.sol Line 59

File: ethereum/contracts/zksync/Storage.sol Line 9 File: ethereum/contracts/zksync/Storage.sol Line 15

File: ethereum/contracts/zksync/facets/DiamondCut.sol Line 104 File: ethereum/contracts/zksync/facets/DiamondCut.sol Line 108 File: ethereum/contracts/zksync/facets/DiamondCut.sol Line 112

File: ethereum/contracts/zksync/libraries/Diamond.sol Line 14

Typo Mistakes

File: DiamondProxy.sol

/// @audit Cotract
7: /// @title Diamond Proxy Cotract (EIP-2535)

File: Storage.sol

/// @audit addreses
36: /// @dev The sender is an `address` type, although we are using `uint256` for addreses in `L2CanonicalTransaction`.

File: Plonk4VerifierWithAccessToDNext.sol

@audit callee
613:        // we set first two items in calee side so start idx from 2

File: libraries/Diamond.sol

@audit dellegate
63:    /// @param initAddress The address that's dellegate called after setting up new facet changes