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

Add withdrawal amount #1397

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion packages/boba/contracts/contracts/LP/L2LiquidityPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ contract L2LiquidityPool is CrossDomainEnabled, ReentrancyGuardUpgradeable, Paus

if (_tokenAddress == Lib_PredeployAddresses.OVM_ETH) {
require(_amount <= address(this).balance, "Requested ETH exceeds pool balance");
L2StandardBridge(Lib_PredeployAddresses.L2_STANDARD_BRIDGE).withdrawTo(
L2LiquidityPoolHelper(payable(Lib_PredeployAddresses.L2_STANDARD_BRIDGE)).withdrawTo{ value: _amount }(
_tokenAddress,
L1LiquidityPoolAddress,
_amount,
Expand Down Expand Up @@ -1032,3 +1032,15 @@ contract L2LiquidityPool is CrossDomainEnabled, ReentrancyGuardUpgradeable, Paus
}

}

interface L2LiquidityPoolHelper {
function withdrawTo(
address _l2Token,
address _to,
uint256 _amount,
uint32 _l1Gas,
bytes calldata _data
)
external
payable;
}
Loading