Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

improve: [L03] Missing docstrings #253

Merged
merged 2 commits into from
Mar 16, 2023
Merged

improve: [L03] Missing docstrings #253

merged 2 commits into from
Mar 16, 2023

Conversation

nicholaspai
Copy link
Member

From Audit

Throughout the codebase, there are several parts that do not have docstrings. In particular:

  • AdapterInterface.sol , lines 13-20: the interface functions are undocumented.
    AbitrumAdapter.sol , lines 9-54: the ArbitrumL1InboxLike and
    ArbitrumL1ERC20GatewayLike interfaces and their functions are undocumented.
  • LpTokenFactoryInterface.sol , lines 4-5: the interface and its functions are
    undocumented.
  • Optimism_Adapter.sol , lines 15-16: the SynthetixBridgeToOptimism interface
    and its function are undocumented.
  • Polygon_Adapter.sol , lines 10-30: the IRootChainManager ,
  • IFxStateSender , and DepositManager interfaces and their functions are
    undocumented.
  • Polygon_SpokePool.sol , line 11: the processMessageFromRoot function is
    undocumented.
  • SpokePool.sol , lines 169-196: the RelayExecution , RelayExecutionInfo ,
    and DepositUpdate structs have undocumented members.
  • Succinct_SpokePool.sol , line 57: the initialize function has no docstring.
  • Succinct_SpokePool.sol , line 57: the handleTelepathy function has no
    docstring.
  • WETH9Interface.sol , lines 4-11: the interface and its functions are undocumented.
  • ZkSync_Adapter.sol , lines 13-30: the ZkSyncLike and ZkBridgeLike
    interfaces and their functions are undocumented.
  • ZkSync_SpokePool.sol , lines 6-12: the ZkBridgeLike interface and its function
    are undocumented.

Consider thoroughly documenting all functions (and their parameters) that are part of any
contract's public API. Functions implementing sensitive functionality, even if not public, should
be clearly documented as well. When writing docstrings, consider following the Ethereum
Natural Specification Format (NatSpec).

Developer response

All suggested comments are implemented except for ZkSync_ contracts which were out of audit scope and are still in progress and not live.

## From Audit

Throughout the codebase, there are several parts that do not have docstrings. In particular:
AdapterInterface.sol , lines 13-20: the interface functions are undocumented.
AbitrumAdapter.sol , lines 9-54: the ArbitrumL1InboxLike and
ArbitrumL1ERC20GatewayLike interfaces and their functions are undocumented.
LpTokenFactoryInterface.sol , lines 4-5: the interface and its functions are
undocumented.
•

•

•
•

•

UMA Across V2 Incremental Audit − Low Severity − 8

Optimism_Adapter.sol , lines 15-16: the SynthetixBridgeToOptimism interface
and its function are undocumented.
Polygon_Adapter.sol , lines 10-30: the IRootChainManager ,
IFxStateSender , and DepositManager interfaces and their functions are
undocumented.
Polygon_SpokePool.sol , line 11: the processMessageFromRoot function is
undocumented.
SpokePool.sol , lines 169-196: the RelayExecution , RelayExecutionInfo ,
and DepositUpdate structs have undocumented members.
Succinct_SpokePool.sol , line 57: the initialize function has no docstring.
Succinct_SpokePool.sol , line 57: the handleTelepathy function has no
docstring.
WETH9Interface.sol , lines 4-11: the interface and its functions are undocumented.
ZkSync_Adapter.sol , lines 13-30: the ZkSyncLike and ZkBridgeLike
interfaces and their functions are undocumented.
ZkSync_SpokePool.sol , lines 6-12: the ZkBridgeLike interface and its function
are undocumented.
Consider thoroughly documenting all functions (and their parameters) that are part of any
contract's public API. Functions implementing sensitive functionality, even if not public, should
be clearly documented as well. When writing docstrings, consider following the Ethereum
Natural Specification Format (NatSpec).

## Developer response

All suggested comments are implemented except for `ZkSync_` contracts which were out of audit scope and are still in progress and not live.
@nicholaspai nicholaspai added the OZ Audit - March 2023 Resolves issue discovered in March 2023 OZ Audit label Mar 15, 2023
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nicholaspai nicholaspai merged commit 5d1090a into master Mar 16, 2023
@nicholaspai nicholaspai deleted the audit/l03 branch March 16, 2023 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OZ Audit - March 2023 Resolves issue discovered in March 2023 OZ Audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants