Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
ee96ff85
Unverified
Commit
ee96ff85
authored
Dec 05, 2022
by
mergify[bot]
Committed by
GitHub
Dec 05, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4204 from ethereum-optimism/sc/ctb-comment-cleanup
maint(ctb): minor comment cleanup
parents
94b88453
056a9dfe
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
47 deletions
+40
-47
L1StandardBridge.sol
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
+6
-6
L2OutputOracle.sol
packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol
+12
-15
SystemConfig.sol
packages/contracts-bedrock/contracts/L1/SystemConfig.sol
+3
-3
BaseFeeVault.sol
packages/contracts-bedrock/contracts/L2/BaseFeeVault.sol
+1
-2
CrossDomainOwnable.sol
...ges/contracts-bedrock/contracts/L2/CrossDomainOwnable.sol
+5
-7
CrossDomainOwnable2.sol
...es/contracts-bedrock/contracts/L2/CrossDomainOwnable2.sol
+7
-9
L2StandardBridge.sol
packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol
+3
-4
StandardBridge.sol
.../contracts-bedrock/contracts/universal/StandardBridge.sol
+3
-1
No files found.
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
View file @
ee96ff85
...
@@ -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 {
/**
/**
...
...
packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol
View file @
ee96ff85
...
@@ -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 L2
OutputOracle 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.
*
*
...
...
packages/contracts-bedrock/contracts/L1/SystemConfig.sol
View file @
ee96ff85
...
@@ -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;
...
...
packages/contracts-bedrock/contracts/L2/BaseFeeVault.sol
View file @
ee96ff85
...
@@ -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 {
/**
/**
...
...
packages/contracts-bedrock/contracts/L2/CrossDomainOwnable.sol
View file @
ee96ff85
...
@@ -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(
...
...
packages/contracts-bedrock/contracts/L2/CrossDomainOwnable2.sol
View file @
ee96ff85
...
@@ -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(
...
...
packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol
View file @
ee96ff85
...
@@ -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 {
/**
/**
...
...
packages/contracts-bedrock/contracts/universal/StandardBridge.sol
View file @
ee96ff85
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment