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
c427f0c0
Unverified
Commit
c427f0c0
authored
Sep 21, 2022
by
Maurelian
Committed by
GitHub
Sep 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctb: Natspec say ERC20 instead of ETH where appropriate (#3516)
parent
ec8a5110
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
18 deletions
+23
-18
fast-mails-hope.md
.changeset/fast-mails-hope.md
+5
-0
L1StandardBridge.sol
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
+1
-1
StandardBridge.sol
.../contracts-bedrock/contracts/universal/StandardBridge.sol
+5
-6
bridges.md
specs/bridges.md
+12
-11
No files found.
.changeset/fast-mails-hope.md
0 → 100644
View file @
c427f0c0
---
'
@eth-optimism/contracts-bedrock'
:
patch
---
Fixes to natspec docs
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
View file @
c427f0c0
...
...
@@ -108,7 +108,7 @@ contract L1StandardBridge is StandardBridge, Semver {
* @param _l2Token Address of the corresponding token on L2.
* @param _from Address of the withdrawer on L2.
* @param _to Address of the recipient on L1.
* @param _amount Amount of
ETH
to withdraw.
* @param _amount Amount of
the ERC20
to withdraw.
* @param _extraData Optional data forwarded from L2.
*/
function finalizeERC20Withdrawal(
...
...
packages/contracts-bedrock/contracts/universal/StandardBridge.sol
View file @
c427f0c0
...
...
@@ -96,7 +96,7 @@ abstract contract StandardBridge {
* @param remoteToken Address of the ERC20 on the remote chain.
* @param from Address of the sender.
* @param to Address of the receiver.
* @param amount Amount of
ETH
sent.
* @param amount Amount of
the ERC20
sent.
* @param extraData Extra data sent with the transaction.
*/
event ERC20BridgeInitiated(
...
...
@@ -115,7 +115,7 @@ abstract contract StandardBridge {
* @param remoteToken Address of the ERC20 on the remote chain.
* @param from Address of the sender.
* @param to Address of the receiver.
* @param amount Amount of
ETH
sent.
* @param amount Amount of
the ERC20
sent.
* @param extraData Extra data sent with the transaction.
*/
event ERC20BridgeFinalized(
...
...
@@ -134,7 +134,7 @@ abstract contract StandardBridge {
* @param remoteToken Address of the ERC20 on the remote chain.
* @param from Address of the sender.
* @param to Address of the receiver.
* @param amount Amount of
ETH
sent.
* @param amount Amount of
the ERC20
sent.
* @param extraData Extra data sent with the transaction.
*/
event ERC20BridgeFailed(
...
...
@@ -325,12 +325,11 @@ abstract contract StandardBridge {
* @notice Finalizes an ERC20 bridge on this chain. Can only be triggered by the other
* StandardBridge contract on the remote chain.
*
*
* @param _localToken Address of the ERC20 on this chain.
* @param _remoteToken Address of the corresponding token on the remote chain.
* @param _from Address of the sender.
* @param _to Address of the receiver.
* @param _amount Amount of
ETH
being bridged.
* @param _amount Amount of
the ERC20
being bridged.
* @param _extraData Extra data to be sent with the transaction. Note that the recipient will
* not be triggered with this data, but it will be emitted and can be used
* to identify the transaction.
...
...
@@ -376,7 +375,7 @@ abstract contract StandardBridge {
* @param _localToken Address of the ERC20 on this chain.
* @param _remoteToken Address of the corresponding token on the remote chain.
* @param _to Address of the receiver.
* @param _amount Amount of
ETH
being bridged.
* @param _amount Amount of
the ERC20
being bridged.
*/
function completeOutboundTransfer(
address _localToken,
...
...
specs/bridges.md
View file @
c427f0c0
...
...
@@ -22,18 +22,19 @@ The `L2StandardBridge` is a predeploy contract located at
```
solidity
interface StandardBridge {
event ERC20BridgeFinalized(address indexed _localToken, address indexed _remoteToken, address indexed _from, address _to, uint256 _amount, bytes _data);
event ERC20BridgeInitiated(address indexed _localToken, address indexed _remoteToken, address indexed _from, address _to, uint256 _amount, bytes _data);
event ETHBridgeFinalized(address indexed _from, address indexed _to, uint256 _amount, bytes _data);
event ETHBridgeInitiated(address indexed _from, address indexed _to, uint256 _amount, bytes _data);
function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes memory _data) external;
function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes memory _data) external;
function bridgeETH(uint32 _minGasLimit, bytes memory _data) payable external;
function bridgeETHTo(address _to, uint32 _minGasLimit, bytes memory _data) payable external;
event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData);
event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData);
event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData);
event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData);
event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData);
function bridgeERC20(address _localToken, address _remoteToken, uint256 _amount, uint32 _minGasLimit, bytes memory _extraData) external;
function bridgeERC20To(address _localToken, address _remoteToken, address _to, uint256 _amount, uint32 _minGasLimit, bytes memory _extraData) external;
function bridgeETH(uint32 _minGasLimit, bytes memory _extraData) payable external;
function bridgeETHTo(address _to, uint32 _minGasLimit, bytes memory _extraData) payable external;
function deposits(address, address) view external returns (uint256);
function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes memory _
d
ata) external;
function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes memory _
d
ata) payable external;
function finalizeBridgeERC20(address _localToken, address _remoteToken, address _from, address _to, uint256 _amount, bytes memory _
extraD
ata) external;
function finalizeBridgeETH(address _from, address _to, uint256 _amount, bytes memory _
extraD
ata) payable external;
function messenger() view external returns (address);
function otherBridge() view external returns (address);
}
...
...
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