Commit 056a9dfe authored by Kelvin Fichter's avatar Kelvin Fichter

maint(ctb): minor comment cleanup

Cleans up a few minor issues with comments.
parent 902985f2
......@@ -10,12 +10,12 @@ import { Semver } from "../universal/Semver.sol";
* @title L1StandardBridge
* @notice The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and
* L2. In the case that an ERC20 token is native to L1, it will be escrowed within this
* contract. If the ERC20 token is native to L2, it will be burnt.
* ETH is transferred to and escrowed within the OptimismPortal contract.
* Note that this contract is not intended to support all variations of ERC20 tokens.
* Examples of some token types that may not be properly supported by this contract include,
* but are not limited to: tokens with transfer fees, rebasing tokens, and
* tokens with blocklists.
* contract. If the ERC20 token is native to L2, it will be burnt. Before Bedrock, ETH was
* stored within this contract. After Bedrock, ETH is instead stored inside the
* OptimismPortal contract.
* NOTE: this contract is not intended to support all variations of ERC20 tokens. Examples
* of some token types that may not be properly supported by this contract include, but are
* not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists.
*/
contract L1StandardBridge is StandardBridge, Semver {
/**
......
......@@ -8,11 +8,10 @@ import { Types } from "../libraries/Types.sol";
/**
* @custom:proxied
* @title L2OutputOracle
* @notice The L2 state is committed to in this contract
* The payable keyword is used on proposeL2Output to save gas on the msg.value check.
* This contract should be deployed behind an upgradable proxy
* @notice The L2OutputOracle contains an array of L2 state outputs, where each output is a
* commitment to the state of the L2 chain. Other contracts like the OptimismPortal use
* these outputs to verify information about the state of L2.
*/
// slither-disable-next-line locked-ether
contract L2OutputOracle is Initializable, Semver {
/**
* @notice The interval in L2 blocks at which checkpoints must be submitted. Although this is
......@@ -76,12 +75,12 @@ contract L2OutputOracle is Initializable, Semver {
/**
* @custom:semver 0.0.1
*
* @param _submissionInterval Interval in blocks at which checkpoints must be submitted.
* @param _l2BlockTime The time per L2 block, in seconds.
* @param _startingBlockNumber The number of the first L2 block.
* @param _startingTimestamp The timestamp of the first L2 block.
* @param _proposer The address of the proposer.
* @param _challenger The address of the challenger.
* @param _submissionInterval Interval in blocks at which checkpoints must be submitted.
* @param _l2BlockTime The time per L2 block, in seconds.
* @param _startingBlockNumber The number of the first L2 block.
* @param _startingTimestamp The timestamp of the first L2 block.
* @param _proposer The address of the proposer.
* @param _challenger The address of the challenger.
*/
constructor(
uint256 _submissionInterval,
......@@ -149,9 +148,9 @@ contract L2OutputOracle is Initializable, Semver {
}
/**
* @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. The
* timestamp must be equal to the current value returned by `nextTimestamp()` in order
* to be accepted. This function may only be called by the Proposer.
* @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. The timestamp
* must be equal to the current value returned by `nextTimestamp()` in order to be
* accepted. This function may only be called by the Proposer.
*
* @param _outputRoot The L2 output of the checkpoint block.
* @param _l2BlockNumber The L2 block number that resulted in _outputRoot.
......@@ -321,8 +320,6 @@ contract L2OutputOracle is Initializable, Semver {
/**
* @notice Returns the L2 timestamp corresponding to a given L2 block number.
* If the L2 block number provided is between checkpoints, this function will return the
* timestamp of the previous checkpoint.
*
* @param _l2BlockNumber The L2 block number of the target block.
*
......
......@@ -32,9 +32,9 @@ contract SystemConfig is OwnableUpgradeable, Semver {
uint256 public constant VERSION = 0;
/**
* @notice Minimum gas limit. This should not be lower than the maximum deposit
* gas resource limit in the ResourceMetering contract used by OptimismPortal,
* to ensure the L2 block always has sufficient gas to process deposits.
* @notice Minimum gas limit. This should not be lower than the maximum deposit gas resource
* limit in the ResourceMetering contract used by OptimismPortal, to ensure the L2
* block always has sufficient gas to process deposits.
*/
uint64 public constant MINIMUM_GAS_LIMIT = 8_000_000;
......
......@@ -10,8 +10,7 @@ import { FeeVault } from "../universal/FeeVault.sol";
* @custom:proxied
* @custom:predeploy 0x4200000000000000000000000000000000000019
* @title BaseFeeVault
* @notice The BaseFeeVault accumulates the base fee that is paid by
* transactions.
* @notice The BaseFeeVault accumulates the base fee that is paid by transactions.
*/
contract BaseFeeVault is FeeVault, Semver {
/**
......
......@@ -6,17 +6,15 @@ import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
/**
* @title CrossDomainOwnable
* @notice This contract extends the OpenZeppelin `Ownable` contract
* for L2 contracts to be owned by contracts on L1. Note that
* this contract is only safe to be used if the CrossDomainMessenger
* system is bypassed and the caller on L1 is calling the
* @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned
* by contracts on L1. Note that this contract is only safe to be used if the
* CrossDomainMessenger system is bypassed and the caller on L1 is calling the
* OptimismPortal directly.
*/
abstract contract CrossDomainOwnable is Ownable {
/**
* @notice Overrides the implementation of the `onlyOwner` modifier
* to check that the unaliased `msg.sender` is the owner
* of the contract.
* @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased
* `msg.sender` is the owner of the contract.
*/
function _checkOwner() internal view override {
require(
......
......@@ -7,18 +7,16 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title CrossDomainOwnable2
* @notice This contract extends the OpenZeppelin `Ownable` contract
* for L2 contracts to be owned by contracts on L1. Note that
* this contract is meant to be used with systems that use the
* CrossDomainMessenger system. It will not work if the OptimismPortal
* is used directly.
* @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned
* by contracts on L1. Note that this contract is meant to be used with systems that use
* the CrossDomainMessenger system. It will not work if the OptimismPortal is used
* directly.
*/
abstract contract CrossDomainOwnable2 is Ownable {
/**
* @notice Overrides the implementation of the `onlyOwner` modifier
* to check that the unaliased `xDomainMessageSender`
* is the owner of the contract. This value is set
* to the caller of the L1CrossDomainMessenger.
* @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased
* `xDomainMessageSender` is the owner of the contract. This value is set to the caller
* of the L1CrossDomainMessenger.
*/
function _checkOwner() internal view override {
L2CrossDomainMessenger messenger = L2CrossDomainMessenger(
......
......@@ -13,10 +13,9 @@ import { OptimismMintableERC20 } from "../universal/OptimismMintableERC20.sol";
* @notice The L2StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and
* L2. In the case that an ERC20 token is native to L2, it will be escrowed within this
* contract. If the ERC20 token is native to L1, it will be burnt.
* Note that this contract is not intended to support all variations of ERC20 tokens.
* Examples of some token types that may not be properly supported by this contract include,
* but are not limited to: tokens with transfer fees, rebasing tokens, and
* tokens with blocklists.
* NOTE: this contract is not intended to support all variations of ERC20 tokens. Examples
* of some token types that may not be properly supported by this contract include, but are
* not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists.
*/
contract L2StandardBridge is StandardBridge, Semver {
/**
......
......@@ -13,7 +13,9 @@ import { OptimismMintableERC20 } from "./OptimismMintableERC20.sol";
/**
* @custom:upgradeable
* @title StandardBridge
* @notice StandardBridge is a base contract for the L1 and L2 standard ERC20 bridges.
* @notice StandardBridge is a base contract for the L1 and L2 standard ERC20 bridges. It handles
* the core bridging logic, including escrowing tokens that are native to the local chain
* and minting/burning tokens that are native to the remote chain.
*/
abstract contract StandardBridge {
using SafeERC20 for IERC20;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment