Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L2 bridge missing EOA check for withdraw #53

Open
TheDZhon opened this issue Sep 20, 2023 · 0 comments
Open

L2 bridge missing EOA check for withdraw #53

TheDZhon opened this issue Sep 20, 2023 · 0 comments

Comments

@TheDZhon
Copy link
Contributor

TheDZhon commented Sep 20, 2023

Optimism standard L2 token bridge (onlyEOA modifier):

function withdraw(
    address _l2Token,
    uint256 _amount,
    uint32 _minGasLimit,
    bytes calldata _extraData
) external payable virtual onlyEOA {
    _initiateWithdrawal(_l2Token, msg.sender, msg.sender, _amount, _minGasLimit, _extraData);
}

For the wstETH version, this check is missing:

function withdraw(
    address l2Token_,
    uint256 amount_,
    uint32 l1Gas_,
    bytes calldata data_
) external whenWithdrawalsEnabled onlySupportedL2Token(l2Token_) {
    _initiateWithdrawal(msg.sender, msg.sender, amount_, l1Gas_, data_);
}

However, it should have been there due to known design decision of Optimism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant