Commit 0273081d authored by Maurelian's avatar Maurelian

contracts: Fix L-01 use _from instead of msg.sender

parent 9aa8049c
...@@ -75,8 +75,8 @@ L2StandardBridge_Test:test_finalizeDeposit() (gas: 93169) ...@@ -75,8 +75,8 @@ L2StandardBridge_Test:test_finalizeDeposit() (gas: 93169)
L2StandardBridge_Test:test_finalizeDeposit_failsToCompleteOutboundTransfer() (gas: 140106) L2StandardBridge_Test:test_finalizeDeposit_failsToCompleteOutboundTransfer() (gas: 140106)
L2StandardBridge_Test:test_initialize() (gas: 14812) L2StandardBridge_Test:test_initialize() (gas: 14812)
L2StandardBridge_Test:test_receive() (gas: 136415) L2StandardBridge_Test:test_receive() (gas: 136415)
L2StandardBridge_Test:test_withdraw() (gas: 352626) L2StandardBridge_Test:test_withdraw() (gas: 352632)
L2StandardBridge_Test:test_withdrawTo() (gas: 353477) L2StandardBridge_Test:test_withdrawTo() (gas: 353484)
L2ToL1MessagePasserTest:test_burn() (gas: 112046) L2ToL1MessagePasserTest:test_burn() (gas: 112046)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromContract() (gas: 67890) L2ToL1MessagePasserTest:test_initiateWithdrawal_fromContract() (gas: 67890)
L2ToL1MessagePasserTest:test_initiateWithdrawal_fromEOA() (gas: 74851) L2ToL1MessagePasserTest:test_initiateWithdrawal_fromEOA() (gas: 74851)
...@@ -161,4 +161,4 @@ SequencerFeeVault_Test:test_constructor() (gas: 7611) ...@@ -161,4 +161,4 @@ SequencerFeeVault_Test:test_constructor() (gas: 7611)
SequencerFeeVault_Test:test_minWithdrawalAmount() (gas: 5429) SequencerFeeVault_Test:test_minWithdrawalAmount() (gas: 5429)
SequencerFeeVault_Test:test_receive() (gas: 17280) SequencerFeeVault_Test:test_receive() (gas: 17280)
SequencerFeeVault_Test:test_revertWithdraw() (gas: 9245) SequencerFeeVault_Test:test_revertWithdraw() (gas: 9245)
SequencerFeeVault_Test:test_withdraw() (gas: 147274) SequencerFeeVault_Test:test_withdraw() (gas: 147275)
...@@ -172,6 +172,6 @@ contract L2StandardBridge is StandardBridge { ...@@ -172,6 +172,6 @@ contract L2StandardBridge is StandardBridge {
} else { } else {
_initiateBridgeERC20(_l2Token, l1Token, _from, _to, _amount, _minGasLimit, _data); _initiateBridgeERC20(_l2Token, l1Token, _from, _to, _amount, _minGasLimit, _data);
} }
emit WithdrawalInitiated(l1Token, _l2Token, msg.sender, _to, _amount, _data); emit WithdrawalInitiated(l1Token, _l2Token, _from, _to, _amount, _data);
} }
} }
...@@ -318,7 +318,7 @@ abstract contract StandardBridge { ...@@ -318,7 +318,7 @@ abstract contract StandardBridge {
"Wrong remote token for Optimism Mintable ERC20 local token" "Wrong remote token for Optimism Mintable ERC20 local token"
); );
OptimismMintableERC20(_localToken).burn(msg.sender, _amount); OptimismMintableERC20(_localToken).burn(_from, _amount);
} else { } else {
// TODO: Do we need to confirm that the transfer was successful? // TODO: Do we need to confirm that the transfer was successful?
IERC20(_localToken).safeTransferFrom(_from, address(this), _amount); IERC20(_localToken).safeTransferFrom(_from, address(this), _amount);
......
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