Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions l1-contracts/contracts/bridge/UpgradeableBeaconDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pragma solidity 0.8.28;
import {UpgradeableBeacon} from "@openzeppelin/contracts-v4/proxy/beacon/UpgradeableBeacon.sol";

import {BridgedStandardERC20} from "./BridgedStandardERC20.sol";
import {EmptyAddress} from "../common/L1ContractErrors.sol";

/// @author Matter Labs
/// @custom:security-contact [email protected]
Expand All @@ -13,6 +14,10 @@ import {BridgedStandardERC20} from "./BridgedStandardERC20.sol";
/// does not have to include BridgedStandardERC20 and UpgradeableBeacon and so can fit into the code size limit.
contract UpgradeableBeaconDeployer {
function deployUpgradeableBeacon(address _owner) external returns (address) {
if (_owner == address(0)) {
revert EmptyAddress();
}

address l2StandardToken = address(new BridgedStandardERC20{salt: bytes32(0)}());

UpgradeableBeacon tokenBeacon = new UpgradeableBeacon{salt: bytes32(0)}(l2StandardToken);
Expand Down
6 changes: 5 additions & 1 deletion l1-contracts/contracts/bridgehub/L1ChainAssetHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {IL1AssetHandler} from "../bridge/interfaces/IL1AssetHandler.sol";
import {IL1Bridgehub} from "./IL1Bridgehub.sol";
import {IMessageRoot} from "./IMessageRoot.sol";
import {IAssetRouterBase} from "../bridge/asset-router/IAssetRouterBase.sol";
import {ChainIdMismatch} from "../common/L1ContractErrors.sol";

/// @author Matter Labs
/// @custom:security-contact [email protected]
Expand Down Expand Up @@ -83,14 +84,17 @@ contract L1ChainAssetHandler is ChainAssetHandlerBase, IL1AssetHandler {
/// @param _depositSender the address of the entity that initiated the deposit.
// slither-disable-next-line locked-ether
function bridgeRecoverFailedTransfer(
// solhint-disable-next-line no-unused-vars
uint256 _chainId,
bytes32 _assetId,
address _depositSender,
bytes calldata _data
) external payable override requireZeroValue(msg.value) onlyAssetRouter {
BridgehubBurnCTMAssetData memory bridgehubBurnData = abi.decode(_data, (BridgehubBurnCTMAssetData));

if (_chainId != bridgehubBurnData.chainId) {
revert ChainIdMismatch();
}

(address zkChain, address ctm) = IBridgehubBase(_bridgehub()).forwardedBridgeRecoverFailedTransfer(
bridgehubBurnData.chainId
);
Expand Down
Loading