Commit 82108382 authored by Maurelian's avatar Maurelian

contracts: Fix OZ-L-05 Warn about trapped funds

parent 53e3104a
...@@ -118,7 +118,9 @@ contract L1StandardBridge is StandardBridge { ...@@ -118,7 +118,9 @@ contract L1StandardBridge is StandardBridge {
/** /**
* @custom:legacy * @custom:legacy
* @notice Deposits some amount of ETH into a target account on L2. * @notice Deposits some amount of ETH into a target account on L2. Note that if ETH is sent to
* a contract on L2 and the call fails, then that ETH will be locked in the
* L2StandardBridge.
* *
* @param _to Address of the recipient on L2. * @param _to Address of the recipient on L2.
* @param _minGasLimit Minimum gas limit for the deposit message on L2. * @param _minGasLimit Minimum gas limit for the deposit message on L2.
......
...@@ -106,7 +106,9 @@ contract L2StandardBridge is StandardBridge { ...@@ -106,7 +106,9 @@ contract L2StandardBridge is StandardBridge {
/** /**
* @custom:legacy * @custom:legacy
* @notice Initiates a withdrawal from L2 to L1 to a target account on L1. * @notice Initiates a withdrawal from L2 to L1 to a target account on L1. Note that if ETH is
* sent to a contract on L1 and the call fails, then that ETH will be locked in the
* L1StandardBridge.
* *
* @param _l2Token Address of the L2 token to withdraw. * @param _l2Token Address of the L2 token to withdraw.
* @param _to Recipient account on L1. * @param _to Recipient account on L1.
...@@ -121,6 +123,7 @@ contract L2StandardBridge is StandardBridge { ...@@ -121,6 +123,7 @@ contract L2StandardBridge is StandardBridge {
uint32 _minGasLimit, uint32 _minGasLimit,
bytes calldata _data bytes calldata _data
) external payable virtual { ) external payable virtual {
// TODO: add onlyEOA check on ETH withdrawals to match L1Bridge.depositETHTo?
_initiateWithdrawal(_l2Token, msg.sender, _to, _amount, _minGasLimit, _data); _initiateWithdrawal(_l2Token, msg.sender, _to, _amount, _minGasLimit, _data);
} }
......
...@@ -139,7 +139,8 @@ abstract contract StandardBridge { ...@@ -139,7 +139,8 @@ abstract contract StandardBridge {
} }
/** /**
* @notice Send ETH to a specified account on the remote domain * @notice Send ETH to a specified account on the remote domain. Note that if ETH is sent to a
* contract and the call fails, then that ETH will be locked in the other bridge.
*/ */
function bridgeETHTo( function bridgeETHTo(
address _to, address _to,
......
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