Commit 522c6818 authored by Diego's avatar Diego Committed by GitHub

fix(ctb): type definition in ERC721Bridge (#10755)

* contracts-bedrock: change type of otherBridge in ERC721Bridge to ERC721Bridge

* contracts-bedrock: update semver-lock

* contracts-bedrock: update snapshots

* contracts-bedrock: bump version for L2ERC721Bridge

* contracts-bedrock: bump version for L1ERC721Bridge

* contracts-bedrock: update semver-lock

* contracts-bedrock: update snapshots
parent deaa6fa4
......@@ -20,8 +20,8 @@
"sourceCodeHash": "0x56a2d3abed97eb7b292db758aac1e36fc08a12bfa44f7969824e26866a1417fa"
},
"src/L1/L1ERC721Bridge.sol": {
"initCodeHash": "0xec73b46e68ea29298707f7b9709e7948afe303907b6c4e8b161e2ded2c85ee9c",
"sourceCodeHash": "0xd57acdbd001941e75cf4326ba7c1bdad809912f10b1e44ffaebe073917cdd296"
"initCodeHash": "0xd56de5c193758c0c2ef3456ef9331fbcb56f7f6f4185d4a2ceeebf4f31512013",
"sourceCodeHash": "0xa8b7c9682717efbc27212ead24ba345253d18f2068126b905cc7515603288553"
},
"src/L1/L1StandardBridge.sol": {
"initCodeHash": "0x508977d2517b49649bef57899e2c2519c271953708b2c84325377dae64a92baf",
......@@ -88,8 +88,8 @@
"sourceCodeHash": "0x440d299b7429c44f6faa4005b33428f9edc1283027d9c78a63eb3d76452bfa47"
},
"src/L2/L2ERC721Bridge.sol": {
"initCodeHash": "0xcafa012b2d8f1bb05c11cbbff9749c0fe6f995c9afb1d26d2d71f03384e34a22",
"sourceCodeHash": "0xa7646a588275046f92525ef121e5a0fe149e7752ea51fe62f7e0686a21153542"
"initCodeHash": "0x72443939e0218f1faca4cabe957a77bb232db726d74d422bda15d1cb26857735",
"sourceCodeHash": "0xb0806d362ba5cc39acfb09e0606059a2b10a7c1d5bc1f86cd4561fd24f7dcada"
},
"src/L2/L2StandardBridge.sol": {
"initCodeHash": "0xb6af582e9edaae531d48559b7cd0ca5813a112361ea19b8cb46292726ad88d40",
......
......@@ -22,7 +22,7 @@
"name": "OTHER_BRIDGE",
"outputs": [
{
"internalType": "contract StandardBridge",
"internalType": "contract ERC721Bridge",
"name": "",
"type": "address"
}
......@@ -204,7 +204,7 @@
"name": "otherBridge",
"outputs": [
{
"internalType": "contract StandardBridge",
"internalType": "contract ERC721Bridge",
"name": "",
"type": "address"
}
......
......@@ -22,7 +22,7 @@
"name": "OTHER_BRIDGE",
"outputs": [
{
"internalType": "contract StandardBridge",
"internalType": "contract ERC721Bridge",
"name": "",
"type": "address"
}
......@@ -170,7 +170,7 @@
"name": "otherBridge",
"outputs": [
{
"internalType": "contract StandardBridge",
"internalType": "contract ERC721Bridge",
"name": "",
"type": "address"
}
......
......@@ -32,7 +32,7 @@
"label": "otherBridge",
"offset": 0,
"slot": "2",
"type": "contract StandardBridge"
"type": "contract ERC721Bridge"
},
{
"bytes": "1472",
......
......@@ -32,7 +32,7 @@
"label": "otherBridge",
"offset": 0,
"slot": "2",
"type": "contract StandardBridge"
"type": "contract ERC721Bridge"
},
{
"bytes": "1472",
......
......@@ -24,8 +24,8 @@ contract L1ERC721Bridge is ERC721Bridge, ISemver {
SuperchainConfig public superchainConfig;
/// @notice Semantic version.
/// @custom:semver 2.1.0
string public constant version = "2.1.0";
/// @custom:semver 2.1.1+beta.1
string public constant version = "2.1.1+beta.1";
/// @notice Constructs the L1ERC721Bridge contract.
constructor() ERC721Bridge() {
......@@ -37,10 +37,7 @@ contract L1ERC721Bridge is ERC721Bridge, ISemver {
/// @param _superchainConfig Contract of the SuperchainConfig contract on this network.
function initialize(CrossDomainMessenger _messenger, SuperchainConfig _superchainConfig) public initializer {
superchainConfig = _superchainConfig;
__ERC721Bridge_init({
_messenger: _messenger,
_otherBridge: StandardBridge(payable(Predeploys.L2_ERC721_BRIDGE))
});
__ERC721Bridge_init({ _messenger: _messenger, _otherBridge: ERC721Bridge(payable(Predeploys.L2_ERC721_BRIDGE)) });
}
/// @inheritdoc ERC721Bridge
......
......@@ -6,7 +6,6 @@ import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC16
import { L1ERC721Bridge } from "src/L1/L1ERC721Bridge.sol";
import { IOptimismMintableERC721 } from "src/universal/IOptimismMintableERC721.sol";
import { CrossDomainMessenger } from "src/universal/CrossDomainMessenger.sol";
import { StandardBridge } from "src/universal/StandardBridge.sol";
import { ISemver } from "src/universal/ISemver.sol";
import { Constants } from "src/libraries/Constants.sol";
import { Predeploys } from "src/libraries/Predeploys.sol";
......@@ -21,8 +20,8 @@ import { Predeploys } from "src/libraries/Predeploys.sol";
/// wait for the one-week challenge period to elapse before their Optimism-native NFT
/// can be refunded on L2.
contract L2ERC721Bridge is ERC721Bridge, ISemver {
/// @custom:semver 1.7.0
string public constant version = "1.7.0";
/// @custom:semver 1.7.1+beta.1
string public constant version = "1.7.1+beta.1";
/// @notice Constructs the L2ERC721Bridge contract.
constructor() ERC721Bridge() {
......@@ -34,7 +33,7 @@ contract L2ERC721Bridge is ERC721Bridge, ISemver {
function initialize(address payable _l1ERC721Bridge) public initializer {
__ERC721Bridge_init({
_messenger: CrossDomainMessenger(Predeploys.L2_CROSS_DOMAIN_MESSENGER),
_otherBridge: StandardBridge(_l1ERC721Bridge)
_otherBridge: ERC721Bridge(_l1ERC721Bridge)
});
}
......
......@@ -2,7 +2,6 @@
pragma solidity 0.8.15;
import { CrossDomainMessenger } from "src/universal/CrossDomainMessenger.sol";
import { StandardBridge } from "src/universal/StandardBridge.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";
......@@ -20,7 +19,7 @@ abstract contract ERC721Bridge is Initializable {
/// @notice Contract of the bridge on the other network.
/// @custom:network-specific
StandardBridge public otherBridge;
ERC721Bridge public otherBridge;
/// @notice Reserve extra slots (to a total of 50) in the storage layout for future upgrades.
uint256[46] private __gap;
......@@ -71,7 +70,7 @@ abstract contract ERC721Bridge is Initializable {
/// @param _otherBridge Contract of the ERC721 bridge on the other network.
function __ERC721Bridge_init(
CrossDomainMessenger _messenger,
StandardBridge _otherBridge
ERC721Bridge _otherBridge
)
internal
onlyInitializing
......@@ -92,7 +91,7 @@ abstract contract ERC721Bridge is Initializable {
/// Public getter is legacy and will be removed in the future. Use `otherBridge` instead.
/// @return Contract of the bridge on the other network.
/// @custom:legacy
function OTHER_BRIDGE() external view returns (StandardBridge) {
function OTHER_BRIDGE() external view returns (ERC721Bridge) {
return otherBridge;
}
......
......@@ -15,7 +15,7 @@ contract DeploymentSummary is DeploymentSummaryCode {
address internal constant addressManagerAddress = 0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3;
address internal constant l1CrossDomainMessengerAddress = 0x094e6508ba9d9bf1ce421fff3dE06aE56e67901b;
address internal constant l1CrossDomainMessengerProxyAddress = 0x20A42a5a785622c6Ba2576B2D6e924aA82BFA11D;
address internal constant l1ERC721BridgeAddress = 0x44637A4292E0CD2B17A55d5F6B2F05AFcAcD0586;
address internal constant l1ERC721BridgeAddress = 0x5C4F5e749A61a9503c4AAE8a9393e89609a0e804;
address internal constant l1ERC721BridgeProxyAddress = 0xDeF3bca8c80064589E6787477FFa7Dd616B5574F;
address internal constant l1StandardBridgeAddress = 0xb7900B27Be8f0E0fF65d1C3A4671e1220437dd2b;
address internal constant l1StandardBridgeProxyAddress = 0x0c8b5822b6e02CDa722174F19A1439A7495a3fA6;
......@@ -374,7 +374,7 @@ contract DeploymentSummary is DeploymentSummaryCode {
value = hex"0000000000000000000000000000000000000000000000000000000000000006";
vm.store(systemOwnerSafeAddress, slot, value);
slot = hex"360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
value = hex"00000000000000000000000044637a4292e0cd2b17a55d5f6b2f05afcacd0586";
value = hex"0000000000000000000000005c4f5e749a61a9503c4aae8a9393e89609a0e804";
vm.store(l1ERC721BridgeProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
......
......@@ -21,7 +21,7 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
address internal constant disputeGameFactoryProxyAddress = 0x8B71b41D4dBEb2b6821d44692d3fACAAf77480Bb;
address internal constant l1CrossDomainMessengerAddress = 0x094e6508ba9d9bf1ce421fff3dE06aE56e67901b;
address internal constant l1CrossDomainMessengerProxyAddress = 0xc7B87b2b892EA5C3CfF47168881FE168C00377FB;
address internal constant l1ERC721BridgeAddress = 0x44637A4292E0CD2B17A55d5F6B2F05AFcAcD0586;
address internal constant l1ERC721BridgeAddress = 0x5C4F5e749A61a9503c4AAE8a9393e89609a0e804;
address internal constant l1ERC721BridgeProxyAddress = 0xD31598c909d9C935a9e35bA70d9a3DD47d4D5865;
address internal constant l1StandardBridgeAddress = 0xb7900B27Be8f0E0fF65d1C3A4671e1220437dd2b;
address internal constant l1StandardBridgeProxyAddress = 0xDeF3bca8c80064589E6787477FFa7Dd616B5574F;
......@@ -469,7 +469,7 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
value = hex"0000000000000000000000000000000000000000000000000000000000000006";
vm.store(systemOwnerSafeAddress, slot, value);
slot = hex"360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
value = hex"00000000000000000000000044637a4292e0cd2b17a55d5f6b2f05afcacd0586";
value = hex"0000000000000000000000005c4f5e749a61a9503c4aae8a9393e89609a0e804";
vm.store(l1ERC721BridgeProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
......
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