Skip to content

Commit

Permalink
contracts-bedrock: create OptimismPortalInterop
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfuturistic committed May 24, 2024
1 parent 4c3f63d commit 6fe0a99
Show file tree
Hide file tree
Showing 12 changed files with 961 additions and 20 deletions.
16 changes: 9 additions & 7 deletions packages/contracts-bedrock/scripts/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { L2OutputOracle } from "src/L1/L2OutputOracle.sol";
import { OptimismMintableERC20Factory } from "src/universal/OptimismMintableERC20Factory.sol";
import { SuperchainConfig } from "src/L1/SuperchainConfig.sol";
import { SystemConfig } from "src/L1/SystemConfig.sol";
import { SystemConfigInterop } from "src/L1/SystemConfigInterop.sol";
import { ResourceMetering } from "src/L1/ResourceMetering.sol";
import { DataAvailabilityChallenge } from "src/L1/DataAvailabilityChallenge.sol";
import { Constants } from "src/libraries/Constants.sol";
Expand Down Expand Up @@ -812,19 +813,20 @@ contract Deploy is Deployer {
/// @notice Deploy the SystemConfig
function deploySystemConfig() public broadcast returns (address addr_) {
console.log("Deploying SystemConfig implementation");
SystemConfig config = new SystemConfig{ salt: _implSalt() }();

save("SystemConfig", address(config));
console.log("SystemConfig deployed at %s", address(config));
if (cfg.useInterop()) {
addr_ = address(new SystemConfigInterop{ salt: _implSalt() }());
} else {
addr_ = address(new SystemConfig{ salt: _implSalt() }());
}
save("SystemConfig", addr_);
console.log("SystemConfig deployed at %s", addr_);

// Override the `SystemConfig` contract to the deployed implementation. This is necessary
// to check the `SystemConfig` implementation alongside dependent contracts, which
// are always proxies.
Types.ContractSet memory contracts = _proxiesUnstrict();
contracts.SystemConfig = address(config);
contracts.SystemConfig = addr_;
ChainAssertions.checkSystemConfig({ _contracts: contracts, _cfg: cfg, _isProxy: false });

addr_ = address(config);
}

/// @notice Deploy the L1StandardBridge
Expand Down
8 changes: 6 additions & 2 deletions packages/contracts-bedrock/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@
"sourceCodeHash": "0xd6a894e371c2c7182b5960c507491f81c3775dda0efedd29475f7c30ca07b004"
},
"src/L1/SystemConfig.sol": {
"initCodeHash": "0x6160c9c96d0972e0761ab3b9d4f6d1b8543288c4c3aea9e132008a40e4c5d202",
"sourceCodeHash": "0xd27df6e227cc4728471641aec25a1fe6f79a12ce96d3ce6c1774d9411a54133e"
"initCodeHash": "0x3324c93485f594bccb2af1a0c5a3551948ae9b347baea371764ce8fe239c39be",
"sourceCodeHash": "0xaed39fb8a0ce4b8d7a97ead42074e0c672fa18a58a57227b9d32abe2c3600223"
},
"src/L1/SystemConfigInterop.sol": {
"initCodeHash": "0x710484da188ec16a0ade97d99ecd4f5e910bc87ad01e448db4cf3f0e5050aaee",
"sourceCodeHash": "0x40d708140ee6345e146e358c169a191dbbc991782560a2dcbf90ba45a82f7117"
},
"src/L2/BaseFeeVault.sol": {
"initCodeHash": "0x2744d34573be83206d1b75d049d18a7bb37f9058e68c0803e5008c46b0dc2474",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/snapshots/abi/SystemConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@
"type": "string"
}
],
"stateMutability": "view",
"stateMutability": "pure",
"type": "function"
},
{
Expand Down
Loading

0 comments on commit 6fe0a99

Please sign in to comment.