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"; ...@@ -10,12 +10,12 @@ import { Semver } from "../universal/Semver.sol";
* @title L1StandardBridge * @title L1StandardBridge
* @notice The L1StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and * @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 * 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. * contract. If the ERC20 token is native to L2, it will be burnt. Before Bedrock, ETH was
* ETH is transferred to and escrowed within the OptimismPortal contract. * stored within this contract. After Bedrock, ETH is instead stored inside the
* Note that this contract is not intended to support all variations of ERC20 tokens. * OptimismPortal contract.
* Examples of some token types that may not be properly supported by this contract include, * NOTE: this contract is not intended to support all variations of ERC20 tokens. Examples
* but are not limited to: tokens with transfer fees, rebasing tokens, and * of some token types that may not be properly supported by this contract include, but are
* tokens with blocklists. * not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists.
*/ */
contract L1StandardBridge is StandardBridge, Semver { contract L1StandardBridge is StandardBridge, Semver {
/** /**
......
...@@ -8,11 +8,10 @@ import { Types } from "../libraries/Types.sol"; ...@@ -8,11 +8,10 @@ import { Types } from "../libraries/Types.sol";
/** /**
* @custom:proxied * @custom:proxied
* @title L2OutputOracle * @title L2OutputOracle
* @notice The L2 state is committed to in this contract * @notice The L2OutputOracle contains an array of L2 state outputs, where each output is a
* The payable keyword is used on proposeL2Output to save gas on the msg.value check. * commitment to the state of the L2 chain. Other contracts like the OptimismPortal use
* This contract should be deployed behind an upgradable proxy * these outputs to verify information about the state of L2.
*/ */
// slither-disable-next-line locked-ether
contract L2OutputOracle is Initializable, Semver { contract L2OutputOracle is Initializable, Semver {
/** /**
* @notice The interval in L2 blocks at which checkpoints must be submitted. Although this is * @notice The interval in L2 blocks at which checkpoints must be submitted. Although this is
...@@ -149,9 +148,9 @@ contract L2OutputOracle is Initializable, Semver { ...@@ -149,9 +148,9 @@ contract L2OutputOracle is Initializable, Semver {
} }
/** /**
* @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. The * @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. The timestamp
* timestamp must be equal to the current value returned by `nextTimestamp()` in order * must be equal to the current value returned by `nextTimestamp()` in order to be
* to be accepted. This function may only be called by the Proposer. * accepted. This function may only be called by the Proposer.
* *
* @param _outputRoot The L2 output of the checkpoint block. * @param _outputRoot The L2 output of the checkpoint block.
* @param _l2BlockNumber The L2 block number that resulted in _outputRoot. * @param _l2BlockNumber The L2 block number that resulted in _outputRoot.
...@@ -321,8 +320,6 @@ contract L2OutputOracle is Initializable, Semver { ...@@ -321,8 +320,6 @@ contract L2OutputOracle is Initializable, Semver {
/** /**
* @notice Returns the L2 timestamp corresponding to a given L2 block number. * @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. * @param _l2BlockNumber The L2 block number of the target block.
* *
......
...@@ -32,9 +32,9 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -32,9 +32,9 @@ contract SystemConfig is OwnableUpgradeable, Semver {
uint256 public constant VERSION = 0; uint256 public constant VERSION = 0;
/** /**
* @notice Minimum gas limit. This should not be lower than the maximum deposit * @notice Minimum gas limit. This should not be lower than the maximum deposit gas resource
* gas resource limit in the ResourceMetering contract used by OptimismPortal, * limit in the ResourceMetering contract used by OptimismPortal, to ensure the L2
* to ensure the L2 block always has sufficient gas to process deposits. * block always has sufficient gas to process deposits.
*/ */
uint64 public constant MINIMUM_GAS_LIMIT = 8_000_000; uint64 public constant MINIMUM_GAS_LIMIT = 8_000_000;
......
...@@ -10,8 +10,7 @@ import { FeeVault } from "../universal/FeeVault.sol"; ...@@ -10,8 +10,7 @@ import { FeeVault } from "../universal/FeeVault.sol";
* @custom:proxied * @custom:proxied
* @custom:predeploy 0x4200000000000000000000000000000000000019 * @custom:predeploy 0x4200000000000000000000000000000000000019
* @title BaseFeeVault * @title BaseFeeVault
* @notice The BaseFeeVault accumulates the base fee that is paid by * @notice The BaseFeeVault accumulates the base fee that is paid by transactions.
* transactions.
*/ */
contract BaseFeeVault is FeeVault, Semver { contract BaseFeeVault is FeeVault, Semver {
/** /**
......
...@@ -6,17 +6,15 @@ import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol"; ...@@ -6,17 +6,15 @@ import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
/** /**
* @title CrossDomainOwnable * @title CrossDomainOwnable
* @notice This contract extends the OpenZeppelin `Ownable` contract * @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned
* for L2 contracts to be owned by contracts on L1. Note that * by contracts on L1. Note that this contract is only safe to be used if the
* this contract is only safe to be used if the CrossDomainMessenger * CrossDomainMessenger system is bypassed and the caller on L1 is calling the
* system is bypassed and the caller on L1 is calling the
* OptimismPortal directly. * OptimismPortal directly.
*/ */
abstract contract CrossDomainOwnable is Ownable { abstract contract CrossDomainOwnable is Ownable {
/** /**
* @notice Overrides the implementation of the `onlyOwner` modifier * @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased
* to check that the unaliased `msg.sender` is the owner * `msg.sender` is the owner of the contract.
* of the contract.
*/ */
function _checkOwner() internal view override { function _checkOwner() internal view override {
require( require(
......
...@@ -7,18 +7,16 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; ...@@ -7,18 +7,16 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
/** /**
* @title CrossDomainOwnable2 * @title CrossDomainOwnable2
* @notice This contract extends the OpenZeppelin `Ownable` contract * @notice This contract extends the OpenZeppelin `Ownable` contract for L2 contracts to be owned
* for L2 contracts to be owned by contracts on L1. Note that * by contracts on L1. Note that this contract is meant to be used with systems that use
* this contract is meant to be used with systems that use the * the CrossDomainMessenger system. It will not work if the OptimismPortal is used
* CrossDomainMessenger system. It will not work if the OptimismPortal * directly.
* is used directly.
*/ */
abstract contract CrossDomainOwnable2 is Ownable { abstract contract CrossDomainOwnable2 is Ownable {
/** /**
* @notice Overrides the implementation of the `onlyOwner` modifier * @notice Overrides the implementation of the `onlyOwner` modifier to check that the unaliased
* to check that the unaliased `xDomainMessageSender` * `xDomainMessageSender` is the owner of the contract. This value is set to the caller
* is the owner of the contract. This value is set * of the L1CrossDomainMessenger.
* to the caller of the L1CrossDomainMessenger.
*/ */
function _checkOwner() internal view override { function _checkOwner() internal view override {
L2CrossDomainMessenger messenger = L2CrossDomainMessenger( L2CrossDomainMessenger messenger = L2CrossDomainMessenger(
......
...@@ -13,10 +13,9 @@ import { OptimismMintableERC20 } from "../universal/OptimismMintableERC20.sol"; ...@@ -13,10 +13,9 @@ import { OptimismMintableERC20 } from "../universal/OptimismMintableERC20.sol";
* @notice The L2StandardBridge is responsible for transfering ETH and ERC20 tokens between L1 and * @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 * 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. * 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. * NOTE: this contract is not intended to support all variations of ERC20 tokens. Examples
* Examples of some token types that may not be properly supported by this contract include, * of some token types that may not be properly supported by this contract include, but are
* but are not limited to: tokens with transfer fees, rebasing tokens, and * not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists.
* tokens with blocklists.
*/ */
contract L2StandardBridge is StandardBridge, Semver { contract L2StandardBridge is StandardBridge, Semver {
/** /**
......
...@@ -13,7 +13,9 @@ import { OptimismMintableERC20 } from "./OptimismMintableERC20.sol"; ...@@ -13,7 +13,9 @@ import { OptimismMintableERC20 } from "./OptimismMintableERC20.sol";
/** /**
* @custom:upgradeable * @custom:upgradeable
* @title StandardBridge * @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 { abstract contract StandardBridge {
using SafeERC20 for IERC20; 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