Skip to content

feat: upgrade bridge to allow for transfer of all token assets#103

Open
0xClouds wants to merge 2 commits intobase:mainfrom
0xClouds:portal_upgrade
Open

feat: upgrade bridge to allow for transfer of all token assets#103
0xClouds wants to merge 2 commits intobase:mainfrom
0xClouds:portal_upgrade

Conversation

@0xClouds
Copy link

@0xClouds 0xClouds commented Feb 4, 2026

Upgrade the optimism portal contract to support withdrawal of all locked funds.

/// @param recipient The address that received the funds.
/// @param token The token address (Constants.ETHER for native ETH).
/// @param amount The amount withdrawn.
event EmergencyWithdrawal(address indexed recipient, address indexed token, uint256 amount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think emergency seems like unplanned.

I think this should be like ChainOperatorExitWithdrawal or something.

Also probably good to not call this Portal but PortalWithChainOperatatorExit or similar

amount = IERC20(token).balanceOf(address(this));
if (amount > 0) {
(address gasToken,) = gasPayingToken();
if (token == gasToken) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a nit but seems like we should be doing this after the safe transfer?

Cant recall if safeTransfer reverts or returns a bool as well

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

Successfully merging this pull request may close these issues.

2 participants