Commit 1e159c7e authored by Mark Tyneway's avatar Mark Tyneway Committed by Maurelian

contracts-bedrock: ERC721Bridge pausable

Enable pausability in the ERC721Bridge following the other bridges
that also received pausability.
parent 13a12557
This diff is collapsed.
......@@ -42,7 +42,7 @@ library ChainAssertions {
checkL1StandardBridge({ _contracts: _prox, _isProxy: true });
checkL2OutputOracle(_prox, _cfg, _l2OutputOracleStartingTimestamp, _l2OutputOracleStartingBlockNumber);
checkOptimismMintableERC20Factory(_prox);
checkL1ERC721Bridge(_prox);
checkL1ERC721Bridge({ _contracts: _prox, _isProxy: true });
checkOptimismPortal({ _contracts: _prox, _cfg: _cfg, _isProxy: true });
checkProtocolVersions({ _contracts: _prox, _cfg: _cfg, _isProxy: true });
}
......
......@@ -690,7 +690,11 @@ contract Deploy is Deployer {
// are always proxies.
Types.ContractSet memory contracts = _proxiesUnstrict();
contracts.L1ERC721Bridge = address(bridge);
ChainAssertions.checkL1ERC721Bridge(contracts);
ChainAssertions.checkL1ERC721Bridge({
_contracts: contracts,
_isProxy: false
});
addr_ = address(bridge);
}
......@@ -811,17 +815,22 @@ contract Deploy is Deployer {
ProxyAdmin proxyAdmin = ProxyAdmin(mustGetAddress("ProxyAdmin"));
address l1ERC721BridgeProxy = mustGetAddress("L1ERC721BridgeProxy");
address l1ERC721Bridge = mustGetAddress("L1ERC721Bridge");
address superchainConfigProxy = mustGetAddress("SuperchainConfigProxy");
_callViaSafe({
_target: address(proxyAdmin),
_data: abi.encodeCall(ProxyAdmin.upgrade, (payable(l1ERC721BridgeProxy), l1ERC721Bridge))
_upgradeAndCallViaSafe({
_proxy: payable(l1ERC721BridgeProxy),
_implementation: l1ERC721Bridge,
_innerCallData: abi.encodeCall(L1ERC721Bridge.initialize, (SuperchainConfig(superchainConfigProxy)))
});
L1ERC721Bridge bridge = L1ERC721Bridge(l1ERC721BridgeProxy);
string memory version = bridge.version();
console.log("L1ERC721Bridge version: %s", version);
ChainAssertions.checkL1ERC721Bridge(_proxies());
ChainAssertions.checkL1ERC721Bridge({
_contracts: _proxies(),
_isProxy: true
});
}
/// @notice Ininitialize the OptimismMintableERC20Factory
......
......@@ -8,6 +8,7 @@ import { ISemver } from "src/universal/ISemver.sol";
import { Predeploys } from "src/libraries/Predeploys.sol";
import { CrossDomainMessenger } from "src/universal/CrossDomainMessenger.sol";
import { Constants } from "src/libraries/Constants.sol";
import { SuperchainConfig } from "src/L1/SuperchainConfig.sol";
/// @title L1ERC721Bridge
/// @notice The L1 ERC721 bridge is a contract which works together with the L2 ERC721 bridge to
......@@ -25,7 +26,15 @@ contract L1ERC721Bridge is ERC721Bridge, ISemver {
/// @notice Constructs the L1ERC721Bridge contract.
/// @param _messenger Address of the CrossDomainMessenger on this network.
/// @param _otherBridge Address of the ERC721 bridge on the other network.
constructor(address _messenger, address _otherBridge) ERC721Bridge(_messenger, _otherBridge) { }
constructor(address _messenger, address _otherBridge) ERC721Bridge(_messenger, _otherBridge) {
initialize(SuperchainConfig(address(0)));
}
/// @notice Initializes the contract.
/// @param _superchainConfig Address of the SuperchainConfig contract on this network.
function initialize(SuperchainConfig _superchainConfig) public initializer {
superChainConfig = _superchainConfig;
}
/// @notice Completes an ERC721 bridge from the other domain and sends the ERC721 token to the
/// recipient on this domain.
......
......@@ -2,12 +2,16 @@
pragma solidity 0.8.15;
import { CrossDomainMessenger } from "src/universal/CrossDomainMessenger.sol";
import { SuperchainConfig } from "src/L1/SuperchainConfig.sol";
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
/// @title ERC721Bridge
/// @notice ERC721Bridge is a base contract for the L1 and L2 ERC721 bridges.
abstract contract ERC721Bridge {
abstract contract ERC721Bridge is Initializable {
/// @notice
SuperchainConfig public superChainConfig;
/// @notice Messenger contract on this domain. This will be removed in the
/// future, use `messenger` instead.
/// @custom:legacy
......@@ -19,7 +23,7 @@ abstract contract ERC721Bridge {
address public immutable OTHER_BRIDGE;
/// @notice Reserve extra slots (to a total of 50) in the storage layout for future upgrades.
uint256[49] private __gap;
uint256[48] private __gap;
/// @notice Emitted when an ERC721 bridge to the other network is initiated.
/// @param localToken Address of the token on this domain.
......
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