Commit fd1e0622 authored by Maurelian's avatar Maurelian Committed by GitHub

Revert "feat: Isthmus Contracts (#12746)"git (#12870)

* Revert "feat: Isthmus Contracts (#12746)"

This reverts commit dad10877.

* temporarily reduce heavy fuzz runs
parent 0ff55dde
......@@ -131,7 +131,7 @@ rules:
- pattern-not: require($ERR);
- focus-metavariable: $ERR
- pattern-not-regex: \"(\w+:\s[^"]+)\"
- pattern-not-regex: string\.concat\(\"(\w+:\s)\"[^)]+\)
- pattern-not-regex: string\.concat\(\"(\w+:\s[^"]+)\"\,[^"]+\)
- pattern-not-regex: \"([a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+)\"
- pattern-not-regex: \"([a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+)\"
paths:
......@@ -152,7 +152,7 @@ rules:
- pattern-not: revert $ERR(...);
- focus-metavariable: $MSG
- pattern-not-regex: \"(\w+:\s[^"]+)\"
- pattern-not-regex: string\.concat\(\"(\w+:\s)\"[^)]+\)
- pattern-not-regex: string\.concat\(\"(\w+:\s[^"]+)\"\,[^"]+\)
- pattern-not-regex: \"([a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+)\"
- pattern-not-regex: \"([a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+)\"
paths:
......
......@@ -497,9 +497,6 @@ contract SemgrepTest__sol_style_malformed_require {
)
);
// ok: sol-style-malformed-require
require(result.length > 0, string.concat("ForgeArtifacts: ", _contractName, "is not initializable"));
// ruleid: sol-style-malformed-require
require(cond, "MyContract: ");
......@@ -544,9 +541,6 @@ contract SemgrepTest__sol_style_malformed_revert {
)
);
// ok: sol-style-malformed-revert
revert(string.concat("ForgeArtifacts: ", _contractName, "is not initializable"));
// ruleid: sol-style-malformed-revert
revert("MyContract: ");
......
......@@ -24,7 +24,7 @@ parser.add_argument('--allocs', help='Only create the allocs and exit', type=boo
log = logging.getLogger()
# Global constants
FORKS = ["delta", "ecotone", "fjord", "granite", "holocene", "isthmus"]
FORKS = ["delta", "ecotone", "fjord", "granite", "holocene"]
# Global environment variables
DEVNET_NO_BUILD = os.getenv('DEVNET_NO_BUILD') == "true"
......
......@@ -158,8 +158,6 @@ const (
SequencerFeeVaultRecipientRole ChainOperatorRole = 9
// SystemConfigOwner is the key that can make SystemConfig changes.
SystemConfigOwner ChainOperatorRole = 10
// SystemConfigFeeAdmin is the key that can make SystemConfigFee changes.
SystemConfigFeeAdmin ChainOperatorRole = 11
)
func (role ChainOperatorRole) String() string {
......@@ -186,8 +184,6 @@ func (role ChainOperatorRole) String() string {
return "sequencer-fee-vault-recipient"
case SystemConfigOwner:
return "system-config-owner"
case SystemConfigFeeAdmin:
return "system-config-fee-admin"
default:
return fmt.Sprintf("unknown-operator-%d", uint64(role))
}
......
......@@ -286,9 +286,6 @@ type OperatorDeployConfig struct {
// BatchSenderAddress represents the initial sequencer account that authorizes batches.
// Transactions sent from this account to the batch inbox address are considered valid.
BatchSenderAddress common.Address `json:"batchSenderAddress"`
// SystemConfigfeeAdmin is the address of the account that has the ability to set the fee parameters.
SystemConfigfeeAdmin common.Address `json:"systemConfigFeeAdmin"`
}
var _ ConfigChecker = (*OperatorDeployConfig)(nil)
......
......@@ -22,7 +22,6 @@
"l1GenesisBlockGasLimit": "0x1c9c380",
"l1GenesisBlockDifficulty": "0x1",
"finalSystemOwner": "0xbcd4042de499d14e55001ccbb24a551f3b954096",
"systemConfigFeeAdmin": "0xbcd4042de499d14e55001ccbb24a551f3b954096",
"superchainConfigGuardian": "0x0000000000000000000000000000000000000112",
"finalizationPeriodSeconds": 2,
"l1GenesisBlockMixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
......
......@@ -71,11 +71,10 @@ func (c *SuperchainConfig) Check(log log.Logger) error {
}
type L2Config struct {
Deployer common.Address // account used to deploy contracts to L2
Proposer common.Address
Challenger common.Address
SystemConfigOwner common.Address
SystemConfigFeeAdmin common.Address
Deployer common.Address // account used to deploy contracts to L2
Proposer common.Address
Challenger common.Address
SystemConfigOwner common.Address
genesis.L2InitializationConfig
Prefund map[common.Address]*big.Int
SaltMixer string
......
......@@ -200,27 +200,25 @@ func DeployL2ToL1(l1Host *script.Host, superCfg *SuperchainConfig, superDeployme
l1Host.SetTxOrigin(cfg.Deployer)
output, err := opcm.DeployOPChainIsthmus(l1Host, opcm.DeployOPChainInputIsthmus{
DeployOPChainInputV160: opcm.DeployOPChainInputV160{
OpChainProxyAdminOwner: cfg.ProxyAdminOwner,
SystemConfigOwner: cfg.SystemConfigOwner,
Batcher: cfg.BatchSenderAddress,
UnsafeBlockSigner: cfg.P2PSequencerAddress,
Proposer: cfg.Proposer,
Challenger: cfg.Challenger,
BasefeeScalar: cfg.GasPriceOracleBaseFeeScalar,
BlobBaseFeeScalar: cfg.GasPriceOracleBlobBaseFeeScalar,
L2ChainId: new(big.Int).SetUint64(cfg.L2ChainID),
OpcmProxy: superDeployment.OpcmProxy,
SaltMixer: cfg.SaltMixer,
GasLimit: cfg.GasLimit,
DisputeGameType: cfg.DisputeGameType,
DisputeAbsolutePrestate: cfg.DisputeAbsolutePrestate,
DisputeMaxGameDepth: cfg.DisputeMaxGameDepth,
DisputeSplitDepth: cfg.DisputeSplitDepth,
DisputeClockExtension: cfg.DisputeClockExtension,
DisputeMaxClockDuration: cfg.DisputeMaxClockDuration},
SystemConfigFeeAdmin: cfg.SystemConfigFeeAdmin,
output, err := opcm.DeployOPChainV160(l1Host, opcm.DeployOPChainInputV160{
OpChainProxyAdminOwner: cfg.ProxyAdminOwner,
SystemConfigOwner: cfg.SystemConfigOwner,
Batcher: cfg.BatchSenderAddress,
UnsafeBlockSigner: cfg.P2PSequencerAddress,
Proposer: cfg.Proposer,
Challenger: cfg.Challenger,
BasefeeScalar: cfg.GasPriceOracleBaseFeeScalar,
BlobBaseFeeScalar: cfg.GasPriceOracleBlobBaseFeeScalar,
L2ChainId: new(big.Int).SetUint64(cfg.L2ChainID),
OpcmProxy: superDeployment.OpcmProxy,
SaltMixer: cfg.SaltMixer,
GasLimit: cfg.GasLimit,
DisputeGameType: cfg.DisputeGameType,
DisputeAbsolutePrestate: cfg.DisputeAbsolutePrestate,
DisputeMaxGameDepth: cfg.DisputeMaxGameDepth,
DisputeSplitDepth: cfg.DisputeSplitDepth,
DisputeClockExtension: cfg.DisputeClockExtension,
DisputeMaxClockDuration: cfg.DisputeMaxClockDuration,
})
if err != nil {
return nil, fmt.Errorf("failed to deploy L2 OP chain: %w", err)
......
......@@ -178,17 +178,12 @@ func InteropL2DevConfig(l1ChainID, l2ChainID uint64, addrs devkeys.Addresses) (*
if err != nil {
return nil, err
}
systemConfigFeeAdmin, err := addrs.Address(chainOps(devkeys.SystemConfigFeeAdmin))
if err != nil {
return nil, err
}
l2Cfg := &L2Config{
Deployer: deployer,
Proposer: proposer,
Challenger: challenger,
SystemConfigOwner: systemConfigOwner,
SystemConfigFeeAdmin: systemConfigFeeAdmin,
Deployer: deployer,
Proposer: proposer,
Challenger: challenger,
SystemConfigOwner: systemConfigOwner,
L2InitializationConfig: genesis.L2InitializationConfig{
DevDeployConfig: genesis.DevDeployConfig{
FundDevAccounts: true,
......
......@@ -59,7 +59,7 @@ type opcmDeployInputV160 struct {
type opcmRolesIsthmus struct {
opcmRolesBase
SystemConfigFeeAdmin common.Address
FeeAdmin common.Address
}
type opcmDeployInputIsthmus struct {
......@@ -135,8 +135,8 @@ func DeployOPChainInputIsthmusDeployCalldata(input DeployOPChainInputIsthmus) an
v160Data := DeployOPChainInputV160DeployCalldata(input.DeployOPChainInputV160).(opcmDeployInputV160)
return opcmDeployInputIsthmus{
Roles: opcmRolesIsthmus{
opcmRolesBase: v160Data.Roles,
SystemConfigFeeAdmin: input.SystemConfigFeeAdmin,
opcmRolesBase: v160Data.Roles,
FeeAdmin: input.SystemConfigFeeAdmin,
},
opcmDeployInputBase: v160Data.opcmDeployInputBase,
}
......
......@@ -276,7 +276,7 @@ func makeDCIIsthmus(intent *state.Intent, thisIntent *state.ChainIntent, chainID
return opcm.DeployOPChainInputIsthmus{
DeployOPChainInputV160: dci,
SystemConfigFeeAdmin: thisIntent.Roles.SystemConfigFeeAdmin,
SystemConfigFeeAdmin: common.Address{'D', 'E', 'A', 'D'},
}, nil
}
......
......@@ -176,8 +176,6 @@ type ChainRoles struct {
SystemConfigOwner common.Address `json:"systemConfigOwner" toml:"systemConfigOwner"`
SystemConfigFeeAdmin common.Address `json:"systemConfigFeeAdmin" toml:"systemConfigFeeAdmin"`
UnsafeBlockSigner common.Address `json:"unsafeBlockSigner" toml:"unsafeBlockSigner"`
Batcher common.Address `json:"batcher" toml:"batcher"`
......@@ -201,10 +199,6 @@ func (c *ChainIntent) Check() error {
c.Roles.SystemConfigOwner = c.Roles.L1ProxyAdminOwner
}
if c.Roles.SystemConfigFeeAdmin == emptyAddress {
return fmt.Errorf("systemConfigFeeAdmin must be set")
}
if c.Roles.L2ProxyAdminOwner == emptyAddress {
return fmt.Errorf("l2ProxyAdminOwner must be set")
}
......
......@@ -3,35 +3,31 @@ package testutil
import (
"context"
"fmt"
"net/url"
"path"
"runtime"
"testing"
"github.com/ethereum-optimism/optimism/op-service/testlog"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts"
artifacts2 "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts"
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
op_service "github.com/ethereum-optimism/optimism/op-service"
"github.com/stretchr/testify/require"
)
func LocalArtifacts(t *testing.T) (*artifacts.Locator, foundry.StatDirFs) {
func LocalArtifacts(t *testing.T) (*artifacts2.Locator, foundry.StatDirFs) {
_, testFilename, _, ok := runtime.Caller(0)
require.Truef(t, ok, "failed to get test filename")
monorepoDir, err := op_service.FindMonorepoRoot(testFilename)
require.NoError(t, err)
artifactsDir := path.Join(monorepoDir, "packages", "contracts-bedrock", "forge-artifacts")
return ArtifactsFromURL(t, fmt.Sprintf("file://%s", artifactsDir))
}
func ArtifactsFromURL(t *testing.T, artifactsURLStr string) (*artifacts.Locator, foundry.StatDirFs) {
loc := new(artifacts.Locator)
require.NoError(t, loc.UnmarshalText([]byte(artifactsURLStr)))
artifactsURL, err := url.Parse(fmt.Sprintf("file://%s", artifactsDir))
require.NoError(t, err)
loc := &artifacts2.Locator{
URL: artifactsURL,
}
progressor := artifacts.LogProgressor(testlog.Logger(t, log.LevelInfo))
artifactsFS, cleanupArtifacts, err := artifacts.Download(context.Background(), loc, progressor)
artifactsFS, cleanupArtifacts, err := artifacts2.Download(context.Background(), loc, artifacts2.NoopDownloadProgressor)
require.NoError(t, err)
t.Cleanup(func() {
_ = cleanupArtifacts()
......
This diff is collapsed.
......@@ -159,21 +159,18 @@ func setCustomGasToken(t *testing.T, cfg e2esys.SystemConfig, sys *e2esys.System
require.NoError(t, err)
// Get existing parameters from SystemConfigProxy contract
roles := bindings.SystemConfigRoles{}
roles.Owner, err = systemConfig.Owner(&bind.CallOpts{})
require.NoError(t, err)
roles.FeeAdmin, err = systemConfig.FeeAdmin(&bind.CallOpts{})
require.NoError(t, err)
roles.UnsafeBlockSigner, err = systemConfig.UnsafeBlockSigner(&bind.CallOpts{})
require.NoError(t, err)
roles.BatcherHash, err = systemConfig.BatcherHash(&bind.CallOpts{})
owner, err := systemConfig.Owner(&bind.CallOpts{})
require.NoError(t, err)
basefeeScalar, err := systemConfig.BasefeeScalar(&bind.CallOpts{})
require.NoError(t, err)
blobbasefeeScalar, err := systemConfig.BlobbasefeeScalar(&bind.CallOpts{})
require.NoError(t, err)
batcherHash, err := systemConfig.BatcherHash(&bind.CallOpts{})
require.NoError(t, err)
gasLimit, err := systemConfig.GasLimit(&bind.CallOpts{})
require.NoError(t, err)
unsafeBlockSigner, err := systemConfig.UnsafeBlockSigner(&bind.CallOpts{})
require.NoError(t, err)
resourceConfig, err := systemConfig.ResourceConfig(&bind.CallOpts{})
require.NoError(t, err)
batchInbox, err := systemConfig.BatchInbox(&bind.CallOpts{})
......@@ -231,10 +228,12 @@ func setCustomGasToken(t *testing.T, cfg e2esys.SystemConfig, sys *e2esys.System
waitForTx(t, tx, err, l1Client)
// Reinitialise with existing initializer values but with custom gas token set
tx, err = systemConfig.Initialize(deployerOpts, roles,
tx, err = systemConfig.Initialize(deployerOpts, owner,
basefeeScalar,
blobbasefeeScalar,
batcherHash,
gasLimit,
unsafeBlockSigner,
resourceConfig,
batchInbox,
addresses)
......
......@@ -4,14 +4,14 @@ GasBenchMark_L1BlockInterop_SetValuesInterop:test_setL1BlockValuesInterop_benchm
GasBenchMark_L1BlockInterop_SetValuesInterop_Warm:test_setL1BlockValuesInterop_benchmark() (gas: 5099)
GasBenchMark_L1Block_SetValuesEcotone:test_setL1BlockValuesEcotone_benchmark() (gas: 158531)
GasBenchMark_L1Block_SetValuesEcotone_Warm:test_setL1BlockValuesEcotone_benchmark() (gas: 7597)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 367239)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2965379)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 560245)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 4072288)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 462746)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 3508450)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 70492)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 369280)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2967420)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_0() (gas: 564398)
GasBenchMark_L1StandardBridge_Deposit:test_depositERC20_benchmark_1() (gas: 4076613)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_0() (gas: 467098)
GasBenchMark_L1StandardBridge_Deposit:test_depositETH_benchmark_1() (gas: 3512802)
GasBenchMark_L1StandardBridge_Finalize:test_finalizeETHWithdrawal_benchmark() (gas: 72664)
GasBenchMark_L2OutputOracle:test_proposeL2Output_benchmark() (gas: 92973)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 68366)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 68930)
GasBenchMark_OptimismPortal:test_proveWithdrawalTransaction_benchmark() (gas: 155655)
\ No newline at end of file
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark() (gas: 68422)
GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 68986)
GasBenchMark_OptimismPortal:test_proveWithdrawalTransaction_benchmark() (gas: 155610)
\ No newline at end of file
......@@ -27,7 +27,6 @@
"sequencerFeeVaultWithdrawalNetwork": 0,
"proxyAdminOwner": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
"finalSystemOwner": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
"systemConfigFeeAdmin": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
"superchainConfigGuardian": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
"finalizationPeriodSeconds": 2,
"fundDevAccounts": true,
......
{
"finalSystemOwner": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"systemConfigFeeAdmin": "0x976EA74026E726554dB657fA54763abd0C3a0aa9",
"superchainConfigGuardian": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"proxyAdminOwner": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"l1StartingBlockTag": "earliest",
......
......@@ -76,8 +76,8 @@ runs = 256
depth = 32
[profile.ciheavy]
# temp reduce fuzz runs for 1 pr
# fuzz = { runs = 20000 }
# temporary reduce fuzz runs to unblock CI
fuzz = { runs = 200 }
[profile.ciheavy.invariant]
......
......@@ -47,6 +47,7 @@ abstract contract Artifacts {
/// @notice Setup function. The arguments here
function setUp() public virtual {
deploymentOutfile = Config.deploymentOutfile();
console.log("Writing artifact to %s", deploymentOutfile);
ForgeArtifacts.ensurePath(deploymentOutfile);
uint256 chainId = Config.chainID();
......@@ -182,6 +183,7 @@ abstract contract Artifacts {
/// @param _name The name of the deployment.
/// @param _deployed The address of the deployment.
function save(string memory _name, address _deployed) public {
console.log("Saving %s: %s", _name, _deployed);
if (bytes(_name).length == 0) {
revert InvalidDeployment("EmptyName");
}
......
......@@ -155,7 +155,7 @@ contract Deploy is Deployer {
DelayedWETH: getAddress("DelayedWETHProxy"),
PermissionedDelayedWETH: getAddress("PermissionedDelayedWETHProxy"),
AnchorStateRegistry: getAddress("AnchorStateRegistryProxy"),
OptimismMintableERC20Factory: getAddress("L1OptimismMintableERC20FactoryProxy"),
OptimismMintableERC20Factory: getAddress("OptimismMintableERC20FactoryProxy"),
OptimismPortal: getAddress("OptimismPortalProxy"),
OptimismPortal2: getAddress("OptimismPortalProxy"),
SystemConfig: getAddress("SystemConfigProxy"),
......@@ -176,7 +176,7 @@ contract Deploy is Deployer {
DelayedWETH: getAddress("DelayedWETH"),
PermissionedDelayedWETH: getAddress("PermissionedDelayedWETH"),
AnchorStateRegistry: getAddress("AnchorStateRegistry"),
OptimismMintableERC20Factory: getAddress("L1OptimismMintableERC20Factory"),
OptimismMintableERC20Factory: getAddress("OptimismMintableERC20Factory"),
OptimismPortal: getAddress("OptimismPortal"),
OptimismPortal2: getAddress("OptimismPortal2"),
SystemConfig: getAddress("SystemConfig"),
......@@ -398,9 +398,7 @@ contract Deploy is Deployer {
}
save("L1CrossDomainMessenger", address(dio.l1CrossDomainMessengerImpl()));
// Save under both names for backwards compatibility
save("OptimismMintableERC20Factory", address(dio.optimismMintableERC20FactoryImpl()));
save("L1OptimismMintableERC20Factory", address(dio.optimismMintableERC20FactoryImpl()));
save("SystemConfig", address(dio.systemConfigImpl()));
save("L1StandardBridge", address(dio.l1StandardBridgeImpl()));
save("L1ERC721Bridge", address(dio.l1ERC721BridgeImpl()));
......@@ -415,7 +413,7 @@ contract Deploy is Deployer {
save("OPContractsManager", address(dio.opcmImpl()));
Types.ContractSet memory contracts = _impls();
ChainAssertions.checkL1CrossDomainMessenger({ _contracts: contracts, _isProxy: false });
ChainAssertions.checkL1CrossDomainMessenger({ _contracts: contracts, _vm: vm, _isProxy: false });
ChainAssertions.checkL1StandardBridge({ _contracts: contracts, _isProxy: false });
ChainAssertions.checkL1ERC721Bridge({ _contracts: contracts, _isProxy: false });
ChainAssertions.checkOptimismPortal2({ _contracts: contracts, _cfg: cfg, _isProxy: false });
......@@ -458,9 +456,7 @@ contract Deploy is Deployer {
save("AddressManager", address(deployOutput.addressManager));
save("L1ERC721BridgeProxy", address(deployOutput.l1ERC721BridgeProxy));
save("SystemConfigProxy", address(deployOutput.systemConfigProxy));
// Save under both names for backwards compatibility
save("OptimismMintableERC20FactoryProxy", address(deployOutput.optimismMintableERC20FactoryProxy));
save("L1OptimismMintableERC20FactoryProxy", address(deployOutput.optimismMintableERC20FactoryProxy));
save("L1StandardBridgeProxy", address(deployOutput.l1StandardBridgeProxy));
save("L1CrossDomainMessengerProxy", address(deployOutput.l1CrossDomainMessengerProxy));
......@@ -827,15 +823,12 @@ contract Deploy is Deployer {
_data: abi.encodeCall(
ISystemConfig.initialize,
(
ISystemConfig.Roles({
owner: cfg.finalSystemOwner(),
feeAdmin: cfg.systemConfigFeeAdmin(),
unsafeBlockSigner: cfg.p2pSequencerAddress(),
batcherHash: batcherHash
}),
cfg.finalSystemOwner(),
cfg.basefeeScalar(),
cfg.blobbasefeeScalar(),
batcherHash,
uint64(cfg.l2GenesisBlockGasLimit()),
cfg.p2pSequencerAddress(),
Constants.DEFAULT_RESOURCE_CONFIG(),
cfg.batchInboxAddress(),
ISystemConfig.Addresses({
......@@ -844,7 +837,7 @@ contract Deploy is Deployer {
l1StandardBridge: mustGetAddress("L1StandardBridgeProxy"),
disputeGameFactory: mustGetAddress("DisputeGameFactoryProxy"),
optimismPortal: mustGetAddress("OptimismPortalProxy"),
optimismMintableERC20Factory: mustGetAddress("L1OptimismMintableERC20FactoryProxy"),
optimismMintableERC20Factory: mustGetAddress("OptimismMintableERC20FactoryProxy"),
gasPayingToken: customGasTokenAddress
})
)
......@@ -1271,8 +1264,7 @@ contract Deploy is Deployer {
batcher: cfg.batchSenderAddress(),
unsafeBlockSigner: cfg.p2pSequencerAddress(),
proposer: cfg.l2OutputOracleProposer(),
challenger: cfg.l2OutputOracleChallenger(),
systemConfigFeeAdmin: cfg.systemConfigFeeAdmin()
challenger: cfg.l2OutputOracleChallenger()
}),
basefeeScalar: cfg.basefeeScalar(),
blobBasefeeScalar: cfg.blobbasefeeScalar(),
......
......@@ -86,7 +86,6 @@ contract DeployConfig is Script {
uint256 public daResolveWindow;
uint256 public daBondSize;
uint256 public daResolverRefundPercentage;
address public systemConfigFeeAdmin;
bool public useCustomGasToken;
address public customGasTokenAddress;
......@@ -102,7 +101,6 @@ contract DeployConfig is Script {
}
finalSystemOwner = stdJson.readAddress(_json, "$.finalSystemOwner");
systemConfigFeeAdmin = stdJson.readAddress(_json, "$.systemConfigFeeAdmin");
superchainConfigGuardian = stdJson.readAddress(_json, "$.superchainConfigGuardian");
l1ChainID = stdJson.readUint(_json, "$.l1ChainID");
l2ChainID = stdJson.readUint(_json, "$.l2ChainID");
......
......@@ -29,8 +29,7 @@ import { ISystemConfig } from "src/L1/interfaces/ISystemConfig.sol";
import { IL1CrossDomainMessenger } from "src/L1/interfaces/IL1CrossDomainMessenger.sol";
import { IL1ERC721Bridge } from "src/L1/interfaces/IL1ERC721Bridge.sol";
import { IL1StandardBridge } from "src/L1/interfaces/IL1StandardBridge.sol";
import { IL1OptimismMintableERC20Factory as IOptimismMintableERC20Factory } from
"src/L1/interfaces/IL1OptimismMintableERC20Factory.sol";
import { IOptimismMintableERC20Factory } from "src/universal/interfaces/IOptimismMintableERC20Factory.sol";
import { OPContractsManagerInterop } from "src/L1/OPContractsManagerInterop.sol";
import { IOptimismPortalInterop } from "src/L1/interfaces/IOptimismPortalInterop.sol";
......@@ -371,19 +370,19 @@ contract DeployImplementationsOutput is BaseDeployIO {
DeployUtils.assertInitialized({ _contractAddress: address(systemConfig), _slot: 0, _offset: 0 });
require(systemConfig.owner() == address(0), "SYSCON-10");
require(systemConfig.owner() == address(0xdead), "SYSCON-10");
require(systemConfig.overhead() == 0, "SYSCON-20");
require(systemConfig.scalar() == 0, "SYSCON-30");
require(systemConfig.scalar() == uint256(0x01) << 248, "SYSCON-30");
require(systemConfig.basefeeScalar() == 0, "SYSCON-40");
require(systemConfig.blobbasefeeScalar() == 0, "SYSCON-50");
require(systemConfig.batcherHash() == bytes32(0), "SYSCON-60");
require(systemConfig.gasLimit() == 0, "SYSCON-70");
require(systemConfig.gasLimit() == 1, "SYSCON-70");
require(systemConfig.unsafeBlockSigner() == address(0), "SYSCON-80");
IResourceMetering.ResourceConfig memory resourceConfig = systemConfig.resourceConfig();
require(resourceConfig.maxResourceLimit == 0, "SYSCON-90");
require(resourceConfig.elasticityMultiplier == 0, "SYSCON-100");
require(resourceConfig.baseFeeMaxChangeDenominator == 0, "SYSCON-110");
require(resourceConfig.maxResourceLimit == 1, "SYSCON-90");
require(resourceConfig.elasticityMultiplier == 1, "SYSCON-100");
require(resourceConfig.baseFeeMaxChangeDenominator == 2, "SYSCON-110");
require(resourceConfig.systemTxMaxGas == 0, "SYSCON-120");
require(resourceConfig.minimumBaseFee == 0, "SYSCON-130");
require(resourceConfig.maximumBaseFee == 0, "SYSCON-140");
......@@ -401,7 +400,7 @@ contract DeployImplementationsOutput is BaseDeployIO {
function assertValidL1CrossDomainMessengerImpl(DeployImplementationsInput) internal view {
IL1CrossDomainMessenger messenger = l1CrossDomainMessengerImpl();
DeployUtils.assertInitialized({ _contractAddress: address(messenger), _slot: 250, _offset: 0 });
DeployUtils.assertInitialized({ _contractAddress: address(messenger), _slot: 0, _offset: 20 });
require(address(messenger.OTHER_MESSENGER()) == Predeploys.L2_CROSS_DOMAIN_MESSENGER, "L1xDM-10");
require(address(messenger.otherMessenger()) == Predeploys.L2_CROSS_DOMAIN_MESSENGER, "L1xDM-20");
......@@ -409,15 +408,14 @@ contract DeployImplementationsOutput is BaseDeployIO {
require(address(messenger.portal()) == address(0), "L1xDM-40");
require(address(messenger.superchainConfig()) == address(0), "L1xDM-50");
// TODO: vm.expectRevert is not supported by op-chain-ops, so we can't check this yet.
// vm.expectRevert("CrossDomainMessenger: xDomainMessageSender is not set");
// messenger.xDomainMessageSender();
bytes32 xdmSenderSlot = vm.load(address(messenger), bytes32(uint256(204)));
require(address(uint160(uint256(xdmSenderSlot))) == Constants.DEFAULT_L2_SENDER, "L1xDM-60");
}
function assertValidL1ERC721BridgeImpl(DeployImplementationsInput) internal view {
IL1ERC721Bridge bridge = l1ERC721BridgeImpl();
DeployUtils.assertInitialized({ _contractAddress: address(bridge) });
DeployUtils.assertInitialized({ _contractAddress: address(bridge), _slot: 0, _offset: 0 });
require(address(bridge.OTHER_BRIDGE()) == Predeploys.L2_ERC721_BRIDGE, "L721B-10");
require(address(bridge.otherBridge()) == Predeploys.L2_ERC721_BRIDGE, "L721B-20");
......@@ -429,7 +427,7 @@ contract DeployImplementationsOutput is BaseDeployIO {
function assertValidL1StandardBridgeImpl(DeployImplementationsInput) internal view {
IL1StandardBridge bridge = l1StandardBridgeImpl();
DeployUtils.assertInitialized({ _contractAddress: address(bridge), _slot: 49, _offset: 0 });
DeployUtils.assertInitialized({ _contractAddress: address(bridge), _slot: 0, _offset: 0 });
require(address(bridge.MESSENGER()) == address(0), "L1SB-10");
require(address(bridge.messenger()) == address(0), "L1SB-20");
......@@ -441,7 +439,7 @@ contract DeployImplementationsOutput is BaseDeployIO {
function assertValidOptimismMintableERC20FactoryImpl(DeployImplementationsInput) internal view {
IOptimismMintableERC20Factory factory = optimismMintableERC20FactoryImpl();
DeployUtils.assertInitialized({ _contractAddress: address(factory), _slot: 51, _offset: 0 });
DeployUtils.assertInitialized({ _contractAddress: address(factory), _slot: 0, _offset: 0 });
require(address(factory.BRIDGE()) == address(0), "MERC20F-10");
require(address(factory.bridge()) == address(0), "MERC20F-20");
......@@ -790,7 +788,7 @@ contract DeployImplementations is Script {
vm.broadcast(msg.sender);
impl = IOptimismMintableERC20Factory(
DeployUtils.create1({
_name: "L1OptimismMintableERC20Factory",
_name: "OptimismMintableERC20Factory",
_args: DeployUtils.encodeConstructor(abi.encodeCall(IOptimismMintableERC20Factory.__constructor__, ()))
})
);
......@@ -798,7 +796,7 @@ contract DeployImplementations is Script {
revert(string.concat("DeployImplementations: failed to deploy release ", release));
}
vm.label(address(impl), "L1OptimismMintableERC20FactoryImpl");
vm.label(address(impl), "OptimismMintableERC20FactoryImpl");
_dio.set(_dio.optimismMintableERC20FactoryImpl.selector, address(impl));
}
......
......@@ -38,7 +38,6 @@ import { IOptimismMintableERC20Factory } from "src/universal/interfaces/IOptimis
contract DeployOPChainInput is BaseDeployIO {
address internal _opChainProxyAdminOwner;
address internal _systemConfigOwner;
address internal _systemConfigFeeAdmin;
address internal _batcher;
address internal _unsafeBlockSigner;
address internal _proposer;
......@@ -65,7 +64,6 @@ contract DeployOPChainInput is BaseDeployIO {
require(_addr != address(0), "DeployOPChainInput: cannot set zero address");
if (_sel == this.opChainProxyAdminOwner.selector) _opChainProxyAdminOwner = _addr;
else if (_sel == this.systemConfigOwner.selector) _systemConfigOwner = _addr;
else if (_sel == this.systemConfigFeeAdmin.selector) _systemConfigFeeAdmin = _addr;
else if (_sel == this.batcher.selector) _batcher = _addr;
else if (_sel == this.unsafeBlockSigner.selector) _unsafeBlockSigner = _addr;
else if (_sel == this.proposer.selector) _proposer = _addr;
......@@ -125,11 +123,6 @@ contract DeployOPChainInput is BaseDeployIO {
return _systemConfigOwner;
}
function systemConfigFeeAdmin() public view returns (address) {
require(_systemConfigFeeAdmin != address(0), "DeployOPChainInput: not set");
return _systemConfigFeeAdmin;
}
function batcher() public view returns (address) {
require(_batcher != address(0), "DeployOPChainInput: not set");
return _batcher;
......@@ -362,8 +355,7 @@ contract DeployOPChain is Script {
batcher: _doi.batcher(),
unsafeBlockSigner: _doi.unsafeBlockSigner(),
proposer: _doi.proposer(),
challenger: _doi.challenger(),
systemConfigFeeAdmin: _doi.systemConfigFeeAdmin()
challenger: _doi.challenger()
});
OPContractsManager.DeployInput memory deployInput = OPContractsManager.DeployInput({
roles: roles,
......@@ -580,7 +572,7 @@ contract DeployOPChain is Script {
function assertValidL1CrossDomainMessenger(DeployOPChainInput _doi, DeployOPChainOutput _doo) internal {
IL1CrossDomainMessenger messenger = _doo.l1CrossDomainMessengerProxy();
DeployUtils.assertInitialized({ _contractAddress: address(messenger), _slot: 250, _offset: 0 });
DeployUtils.assertInitialized({ _contractAddress: address(messenger), _slot: 0, _offset: 20 });
require(address(messenger.OTHER_MESSENGER()) == Predeploys.L2_CROSS_DOMAIN_MESSENGER, "L1xDM-10");
require(address(messenger.otherMessenger()) == Predeploys.L2_CROSS_DOMAIN_MESSENGER, "L1xDM-20");
......@@ -589,16 +581,15 @@ contract DeployOPChain is Script {
require(address(messenger.portal()) == address(_doo.optimismPortalProxy()), "L1xDM-40");
require(address(messenger.superchainConfig()) == address(_doi.opcmProxy().superchainConfig()), "L1xDM-50");
// TODO: vm.expectRevert is not supported by op-chain-ops, so we can't check this yet.
// vm.expectRevert("CrossDomainMessenger: xDomainMessageSender is not set");
// messenger.xDomainMessageSender();
bytes32 xdmSenderSlot = vm.load(address(messenger), bytes32(uint256(204)));
require(address(uint160(uint256(xdmSenderSlot))) == Constants.DEFAULT_L2_SENDER, "L1xDM-60");
}
function assertValidL1StandardBridge(DeployOPChainInput _doi, DeployOPChainOutput _doo) internal {
IL1StandardBridge bridge = _doo.l1StandardBridgeProxy();
IL1CrossDomainMessenger messenger = _doo.l1CrossDomainMessengerProxy();
DeployUtils.assertInitialized({ _contractAddress: address(bridge), _slot: 49, _offset: 0 });
DeployUtils.assertInitialized({ _contractAddress: address(bridge), _slot: 0, _offset: 0 });
require(address(bridge.MESSENGER()) == address(messenger), "L1SB-10");
require(address(bridge.messenger()) == address(messenger), "L1SB-20");
......@@ -610,7 +601,7 @@ contract DeployOPChain is Script {
function assertValidOptimismMintableERC20Factory(DeployOPChainInput, DeployOPChainOutput _doo) internal {
IOptimismMintableERC20Factory factory = _doo.optimismMintableERC20FactoryProxy();
DeployUtils.assertInitialized({ _contractAddress: address(factory), _slot: 51, _offset: 0 });
DeployUtils.assertInitialized({ _contractAddress: address(factory), _slot: 0, _offset: 0 });
require(factory.BRIDGE() == address(_doo.l1StandardBridgeProxy()), "MERC20F-10");
require(factory.bridge() == address(_doo.l1StandardBridgeProxy()), "MERC20F-20");
......@@ -619,7 +610,7 @@ contract DeployOPChain is Script {
function assertValidL1ERC721Bridge(DeployOPChainInput _doi, DeployOPChainOutput _doo) internal {
IL1ERC721Bridge bridge = _doo.l1ERC721BridgeProxy();
DeployUtils.assertInitialized({ _contractAddress: address(bridge) });
DeployUtils.assertInitialized({ _contractAddress: address(bridge), _slot: 0, _offset: 0 });
require(address(bridge.OTHER_BRIDGE()) == Predeploys.L2_ERC721_BRIDGE, "L721B-10");
require(address(bridge.otherBridge()) == Predeploys.L2_ERC721_BRIDGE, "L721B-20");
......
......@@ -359,7 +359,6 @@ contract DeploySuperchain is Script {
function deployAndInitializeSuperchainConfig(DeploySuperchainInput _dsi, DeploySuperchainOutput _dso) public {
address guardian = _dsi.guardian();
address upgrader = _dsi.superchainProxyAdminOwner();
bool paused = _dsi.paused();
IProxyAdmin superchainProxyAdmin = _dso.superchainProxyAdmin();
......@@ -377,7 +376,7 @@ contract DeploySuperchain is Script {
superchainProxyAdmin.upgradeAndCall(
payable(address(superchainConfigProxy)),
address(superchainConfigImpl),
abi.encodeCall(ISuperchainConfig.initialize, (guardian, upgrader, paused))
abi.encodeCall(ISuperchainConfig.initialize, (guardian, paused))
);
vm.stopBroadcast();
......
......@@ -34,11 +34,10 @@ enum Fork {
ECOTONE,
FJORD,
GRANITE,
HOLOCENE,
ISTHMUS
HOLOCENE
}
Fork constant LATEST_FORK = Fork.ISTHMUS;
Fork constant LATEST_FORK = Fork.HOLOCENE;
library ForkUtils {
function toString(Fork _fork) internal pure returns (string memory) {
......@@ -54,8 +53,6 @@ library ForkUtils {
return "granite";
} else if (_fork == Fork.HOLOCENE) {
return "holocene";
} else if (_fork == Fork.ISTHMUS) {
return "isthmus";
} else {
return "unknown";
}
......@@ -171,8 +168,6 @@ library Config {
return Fork.GRANITE;
} else if (forkHash == keccak256(bytes("holocene"))) {
return Fork.HOLOCENE;
} else if (forkHash == keccak256(bytes("isthmus"))) {
return Fork.ISTHMUS;
} else {
revert(string.concat("Config: unknown fork: ", forkStr));
}
......
......@@ -351,11 +351,6 @@ library DeployUtils {
}
}
/// @notice The unstructured storage slot that is used for v5 openzeppelin initializable. Computed as:
/// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) &
/// ~bytes32(uint256(0xff))
bytes32 internal constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/// @notice Asserts that for a given contract the value of a storage slot at an offset is 1 or
/// `type(uint8).max`. The value is set to 1 when a contract is initialized, and set to
/// `type(uint8).max` when `_disableInitializers` is called.
......@@ -367,9 +362,4 @@ library DeployUtils {
"DeployUtils: value at the given slot and offset does not indicate initialization"
);
}
/// @notice Asserts that the contract has been initialized, assuming that it is using openzeppelin v5 initializable.
function assertInitialized(address _contractAddress) internal view {
assertInitialized({ _contractAddress: _contractAddress, _slot: uint256(INITIALIZABLE_STORAGE), _offset: 0 });
}
}
......@@ -5,7 +5,6 @@ import { Vm } from "forge-std/Vm.sol";
import { stdJson } from "forge-std/StdJson.sol";
import { LibString } from "@solady/utils/LibString.sol";
import { Executables } from "scripts/libraries/Executables.sol";
import { DeployUtils } from "scripts/libraries/DeployUtils.sol";
import { Process } from "scripts/libraries/Process.sol";
/// @notice Contains information about a storage slot. Mirrors the layout of the storage
......@@ -191,19 +190,6 @@ library ForgeArtifacts {
function getInitializedSlot(string memory _contractName) internal returns (StorageSlot memory slot_) {
string memory storageLayout = getStorageLayout(_contractName);
// Contracts that use oz v5 should be here
if (LibString.eq(_contractName, "L1ERC721Bridge")) {
StorageSlot memory slot = StorageSlot({
astId: 0,
_contract: _contractName,
label: "_initialized",
offset: 0,
slot: vm.toString(DeployUtils.INITIALIZABLE_STORAGE),
_type: "bool"
});
return slot;
}
// FaultDisputeGame and PermissionedDisputeGame use a different name for the initialized storage slot.
string memory slotName = "_initialized";
string memory slotType = "t_uint8";
......@@ -228,10 +214,7 @@ library ForgeArtifacts {
slotType,
"\")'"
);
bytes memory result = Process.run(command);
require(result.length > 0, string.concat("ForgeArtifacts: ", _contractName, "is not initializable"));
bytes memory rawSlot = vm.parseJson(string(result));
bytes memory rawSlot = vm.parseJson(string(Process.run(command)));
slot_ = abi.decode(rawSlot, (StorageSlot));
}
......
This diff is collapsed.
[
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_minWithdrawalAmount",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "_withdrawalNetwork",
"type": "uint8"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "receive"
......@@ -35,30 +56,7 @@
"outputs": [
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "config",
"outputs": [
{
"internalType": "address",
"name": "recipient_",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount_",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"name": "",
"type": "uint8"
}
],
......@@ -130,7 +128,7 @@
"outputs": [
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"name": "network_",
"type": "uint8"
}
],
......
......@@ -121,25 +121,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"name": "_type",
"type": "uint8"
}
],
"name": "getConfig",
"outputs": [
{
"internalType": "bytes",
"name": "data_",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "hash",
......@@ -166,19 +147,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isIsthmus",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "l1FeeOverhead",
......@@ -231,24 +199,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"name": "_type",
"type": "uint8"
},
{
"internalType": "bytes",
"name": "_value",
"type": "bytes"
}
],
"name": "setConfig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
......@@ -277,13 +227,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "setIsthmus",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
......@@ -400,10 +343,5 @@
"inputs": [],
"name": "NotDepositor",
"type": "error"
},
{
"inputs": [],
"name": "UnsafeCast",
"type": "error"
}
]
\ No newline at end of file
......@@ -141,25 +141,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"name": "_type",
"type": "uint8"
}
],
"name": "getConfig",
"outputs": [
{
"internalType": "bytes",
"name": "data_",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "hash",
......@@ -218,19 +199,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isIsthmus",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "l1FeeOverhead",
......@@ -286,7 +254,7 @@
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"internalType": "enum ConfigType",
"name": "_type",
"type": "uint8"
},
......@@ -329,13 +297,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "setIsthmus",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
......@@ -510,10 +471,5 @@
"inputs": [],
"name": "NotDepositor",
"type": "error"
},
{
"inputs": [],
"name": "UnsafeCast",
"type": "error"
}
]
\ No newline at end of file
......@@ -223,7 +223,7 @@
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......
......@@ -209,7 +209,7 @@
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......@@ -342,22 +342,12 @@
"inputs": [
{
"indexed": false,
"internalType": "uint64",
"internalType": "uint8",
"name": "version",
"type": "uint64"
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"inputs": [],
"name": "InvalidInitialization",
"type": "error"
},
{
"inputs": [],
"name": "NotInitializing",
"type": "error"
}
]
\ No newline at end of file
[
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_minWithdrawalAmount",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "_withdrawalNetwork",
"type": "uint8"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "receive"
......@@ -35,30 +56,7 @@
"outputs": [
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "config",
"outputs": [
{
"internalType": "address",
"name": "recipient_",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount_",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"name": "",
"type": "uint8"
}
],
......@@ -130,7 +128,7 @@
"outputs": [
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"name": "network_",
"type": "uint8"
}
],
......
......@@ -26,7 +26,7 @@
"name": "OTHER_BRIDGE",
"outputs": [
{
"internalType": "contract IStandardBridge",
"internalType": "contract StandardBridge",
"name": "",
"type": "address"
}
......@@ -447,7 +447,7 @@
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......@@ -468,12 +468,12 @@
"name": "otherBridge",
"outputs": [
{
"internalType": "contract IStandardBridge",
"internalType": "contract StandardBridge",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "MESSAGE_VERSION",
......@@ -159,6 +164,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract CrossDomainMessenger",
"name": "_l1CrossDomainMessenger",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "l1CrossDomainMessenger",
......@@ -330,6 +348,19 @@
"name": "FailedRelayedMessage",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
......
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "MESSENGER",
......@@ -134,6 +139,19 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "_l1ERC721Bridge",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "messenger",
......@@ -144,7 +162,7 @@
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......@@ -271,5 +289,18 @@
],
"name": "ERC721BridgeInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
}
]
\ No newline at end of file
[
{
"inputs": [],
"name": "BRIDGE",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "bridge",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_remoteToken",
"type": "address"
},
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "string",
"name": "_symbol",
"type": "string"
}
],
"name": "createOptimismMintableERC20",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_remoteToken",
"type": "address"
},
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "string",
"name": "_symbol",
"type": "string"
},
{
"internalType": "uint8",
"name": "_decimals",
"type": "uint8"
}
],
"name": "createOptimismMintableERC20WithDecimals",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_remoteToken",
"type": "address"
},
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "string",
"name": "_symbol",
"type": "string"
}
],
"name": "createStandardL2Token",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "deployments",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "localToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "remoteToken",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "deployer",
"type": "address"
}
],
"name": "OptimismMintableERC20Created",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "remoteToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "localToken",
"type": "address"
}
],
"name": "StandardL2TokenCreated",
"type": "event"
}
]
\ No newline at end of file
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "addressManager",
"outputs": [
{
"internalType": "contract IAddressManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "_proxy",
"type": "address"
},
{
"internalType": "address",
"name": "_newAdmin",
"type": "address"
}
],
"name": "changeProxyAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "_proxy",
"type": "address"
}
],
"name": "getProxyAdmin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_proxy",
"type": "address"
}
],
"name": "getProxyImplementation",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "implementationName",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "isUpgrading",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "proxyType",
"outputs": [
{
"internalType": "enum ProxyAdmin.ProxyType",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "address",
"name": "_address",
"type": "address"
}
],
"name": "setAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IAddressManager",
"name": "_address",
"type": "address"
}
],
"name": "setAddressManager",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_address",
"type": "address"
},
{
"internalType": "string",
"name": "_name",
"type": "string"
}
],
"name": "setImplementationName",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_address",
"type": "address"
},
{
"internalType": "enum ProxyAdmin.ProxyType",
"name": "_type",
"type": "uint8"
}
],
"name": "setProxyType",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "_upgrading",
"type": "bool"
}
],
"name": "setUpgrading",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "_proxy",
"type": "address"
},
{
"internalType": "address",
"name": "_implementation",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "_proxy",
"type": "address"
},
{
"internalType": "address",
"name": "_implementation",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "upgradeAndCall",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
}
]
\ No newline at end of file
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "receive"
......@@ -21,7 +26,7 @@
"name": "OTHER_BRIDGE",
"outputs": [
{
"internalType": "contract IStandardBridge",
"internalType": "contract StandardBridge",
"name": "",
"type": "address"
}
......@@ -231,6 +236,19 @@
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract StandardBridge",
"name": "_otherBridge",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "l1TokenBridge",
......@@ -254,7 +272,7 @@
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......@@ -262,7 +280,7 @@
"name": "otherBridge",
"outputs": [
{
"internalType": "contract IStandardBridge",
"internalType": "contract StandardBridge",
"name": "",
"type": "address"
}
......@@ -548,6 +566,19 @@
"name": "ETHBridgeInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
......
......@@ -21,7 +21,7 @@
"name": "OTHER_BRIDGE",
"outputs": [
{
"internalType": "contract IStandardBridge",
"internalType": "contract StandardBridge",
"name": "",
"type": "address"
}
......@@ -254,6 +254,19 @@
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract StandardBridge",
"name": "_otherBridge",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "l1TokenBridge",
......@@ -277,7 +290,7 @@
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......@@ -285,7 +298,7 @@
"name": "otherBridge",
"outputs": [
{
"internalType": "contract IStandardBridge",
"internalType": "contract StandardBridge",
"name": "",
"type": "address"
}
......@@ -602,6 +615,19 @@
"name": "ETHBridgeInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
......
......@@ -137,11 +137,6 @@
"internalType": "address",
"name": "challenger",
"type": "address"
},
{
"internalType": "address",
"name": "systemConfigFeeAdmin",
"type": "address"
}
],
"internalType": "struct OPContractsManager.Roles",
......
......@@ -137,11 +137,6 @@
"internalType": "address",
"name": "challenger",
"type": "address"
},
{
"internalType": "address",
"name": "systemConfigFeeAdmin",
"type": "address"
}
],
"internalType": "struct OPContractsManager.Roles",
......
......@@ -2,7 +2,7 @@
{
"inputs": [
{
"internalType": "contract IL2ERC721Bridge",
"internalType": "address",
"name": "_bridge",
"type": "address"
},
......@@ -35,7 +35,7 @@
"name": "BRIDGE",
"outputs": [
{
"internalType": "contract IL2ERC721Bridge",
"internalType": "address",
"name": "",
"type": "address"
}
......@@ -124,7 +124,7 @@
"name": "bridge",
"outputs": [
{
"internalType": "contract IL2ERC721Bridge",
"internalType": "address",
"name": "",
"type": "address"
}
......
[
{
"inputs": [
{
"internalType": "address",
"name": "_bridge",
"type": "address"
},
{
"internalType": "uint256",
"name": "_remoteChainId",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "BRIDGE",
"outputs": [
{
"internalType": "contract IL2ERC721Bridge",
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......@@ -30,12 +46,12 @@
"name": "bridge",
"outputs": [
{
"internalType": "contract IL2ERC721Bridge",
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "pure",
"stateMutability": "view",
"type": "function"
},
{
......@@ -88,7 +104,7 @@
},
{
"inputs": [],
"name": "remoteChainId",
"name": "remoteChainID",
"outputs": [
{
"internalType": "uint256",
......
......@@ -413,17 +413,27 @@
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"name": "_type",
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "uint8",
"name": "_decimals",
"type": "uint8"
},
{
"internalType": "bytes",
"name": "_value",
"type": "bytes"
"internalType": "bytes32",
"name": "_name",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_symbol",
"type": "bytes32"
}
],
"name": "setConfig",
"name": "setGasPayingToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
......
......@@ -605,17 +605,27 @@
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"name": "_type",
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "uint8",
"name": "_decimals",
"type": "uint8"
},
{
"internalType": "bytes",
"name": "_value",
"type": "bytes"
"internalType": "bytes32",
"name": "_name",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_symbol",
"type": "bytes32"
}
],
"name": "setConfig",
"name": "setGasPayingToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
......@@ -659,24 +669,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "_gasLimit",
"type": "uint32"
},
{
"internalType": "bytes",
"name": "_calldata",
"type": "bytes"
}
],
"name": "upgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
......
......@@ -605,7 +605,7 @@
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"internalType": "enum ConfigType",
"name": "_type",
"type": "uint8"
},
......@@ -620,6 +620,34 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "uint8",
"name": "_decimals",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "_name",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_symbol",
"type": "bytes32"
}
],
"name": "setGasPayingToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
......@@ -659,24 +687,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "_gasLimit",
"type": "uint32"
},
{
"internalType": "bytes",
"name": "_calldata",
"type": "bytes"
}
],
"name": "upgrade",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "version",
......
[
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_minWithdrawalAmount",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "_withdrawalNetwork",
"type": "uint8"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "receive"
......@@ -35,30 +56,7 @@
"outputs": [
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "config",
"outputs": [
{
"internalType": "address",
"name": "recipient_",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount_",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"name": "",
"type": "uint8"
}
],
......@@ -71,7 +69,7 @@
"outputs": [
{
"internalType": "address",
"name": "recipient_",
"name": "",
"type": "address"
}
],
......@@ -143,7 +141,7 @@
"outputs": [
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "withdrawalNetwork_",
"name": "network_",
"type": "uint8"
}
],
......
......@@ -30,19 +30,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "UPGRADER_SLOT",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "guardian",
......@@ -63,11 +50,6 @@
"name": "_guardian",
"type": "address"
},
{
"internalType": "address",
"name": "_upgrader",
"type": "address"
},
{
"internalType": "bool",
"name": "_paused",
......@@ -112,19 +94,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "upgrader",
"outputs": [
{
"internalType": "address",
"name": "upgrader_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "version",
......
......@@ -225,19 +225,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeAdmin",
"outputs": [
{
"internalType": "address",
"name": "addr_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "gasLimit",
......@@ -298,31 +285,9 @@
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "feeAdmin",
"type": "address"
},
{
"internalType": "address",
"name": "unsafeBlockSigner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "batcherHash",
"type": "bytes32"
}
],
"internalType": "struct SystemConfig.Roles",
"name": "_roles",
"type": "tuple"
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "uint32",
......@@ -334,11 +299,21 @@
"name": "_blobbasefeeScalar",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "_batcherHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "_gasLimit",
"type": "uint64"
},
{
"internalType": "address",
"name": "_unsafeBlockSigner",
"type": "address"
},
{
"components": [
{
......@@ -655,34 +630,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"name": "_type",
"type": "uint8"
},
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_min",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "_network",
"type": "uint8"
}
],
"name": "setFeeVaultConfig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
......@@ -853,10 +800,5 @@
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "UnsafeCast",
"type": "error"
}
]
\ No newline at end of file
......@@ -246,19 +246,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeAdmin",
"outputs": [
{
"internalType": "address",
"name": "addr_",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "gasLimit",
......@@ -319,31 +306,9 @@
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "feeAdmin",
"type": "address"
},
{
"internalType": "address",
"name": "unsafeBlockSigner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "batcherHash",
"type": "bytes32"
}
],
"internalType": "struct SystemConfig.Roles",
"name": "_roles",
"type": "tuple"
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "uint32",
......@@ -355,11 +320,21 @@
"name": "_blobbasefeeScalar",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "_batcherHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "_gasLimit",
"type": "uint64"
},
{
"internalType": "address",
"name": "_unsafeBlockSigner",
"type": "address"
},
{
"components": [
{
......@@ -443,6 +418,11 @@
"internalType": "struct SystemConfig.Addresses",
"name": "_addresses",
"type": "tuple"
},
{
"internalType": "address",
"name": "_dependencyManager",
"type": "address"
}
],
"name": "initialize",
......@@ -453,31 +433,9 @@
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "feeAdmin",
"type": "address"
},
{
"internalType": "address",
"name": "unsafeBlockSigner",
"type": "address"
},
{
"internalType": "bytes32",
"name": "batcherHash",
"type": "bytes32"
}
],
"internalType": "struct SystemConfig.Roles",
"name": "_roles",
"type": "tuple"
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "uint32",
......@@ -489,11 +447,21 @@
"name": "_blobbasefeeScalar",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "_batcherHash",
"type": "bytes32"
},
{
"internalType": "uint64",
"name": "_gasLimit",
"type": "uint64"
},
{
"internalType": "address",
"name": "_unsafeBlockSigner",
"type": "address"
},
{
"components": [
{
......@@ -577,11 +545,6 @@
"internalType": "struct SystemConfig.Addresses",
"name": "_addresses",
"type": "tuple"
},
{
"internalType": "address",
"name": "_dependencyManager",
"type": "address"
}
],
"name": "initialize",
......@@ -828,34 +791,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "enum Types.ConfigType",
"name": "_type",
"type": "uint8"
},
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "_min",
"type": "uint256"
},
{
"internalType": "enum Types.WithdrawalNetwork",
"name": "_network",
"type": "uint8"
}
],
"name": "setFeeVaultConfig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
......@@ -1026,10 +961,5 @@
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "UnsafeCast",
"type": "error"
}
]
\ No newline at end of file
[
{
"bytes": "20",
"label": "spacer_0_0_20",
"offset": 0,
"slot": "0",
"type": "address"
}
]
\ No newline at end of file
[
{
"bytes": "1600",
"label": "spacer_1_0_1600",
"offset": 0,
"slot": "0",
"type": "uint256[50]"
},
{
"bytes": "20",
"label": "spacer_51_0_20",
"offset": 0,
"slot": "50",
"type": "address"
},
{
"bytes": "1568",
"label": "spacer_52_0_1568",
"offset": 0,
"slot": "51",
"type": "uint256[49]"
},
{
"bytes": "1",
"label": "spacer_101_0_1",
"offset": 0,
"slot": "100",
"type": "bool"
},
{
"bytes": "1568",
"label": "spacer_102_0_1568",
"offset": 0,
"slot": "101",
"type": "uint256[49]"
},
{
"bytes": "32",
"label": "spacer_151_0_32",
"offset": 0,
"slot": "150",
"type": "uint256"
},
{
"bytes": "1568",
"label": "spacer_152_0_1568",
"offset": 0,
"slot": "151",
"type": "uint256[49]"
},
{
"bytes": "32",
"label": "spacer_201_0_32",
"offset": 0,
"slot": "200",
"type": "mapping(bytes32 => bool)"
},
{
"bytes": "32",
"label": "spacer_202_0_32",
"offset": 0,
"slot": "201",
"type": "mapping(bytes32 => bool)"
}
]
\ No newline at end of file
......@@ -75,12 +75,5 @@
"offset": 0,
"slot": "7",
"type": "uint256"
},
{
"bytes": "1",
"label": "isIsthmus",
"offset": 0,
"slot": "8",
"type": "bool"
}
]
\ No newline at end of file
......@@ -76,18 +76,11 @@
"slot": "7",
"type": "uint256"
},
{
"bytes": "1",
"label": "isIsthmus",
"offset": 0,
"slot": "8",
"type": "bool"
},
{
"bytes": "64",
"label": "dependencySet",
"offset": 0,
"slot": "9",
"slot": "8",
"type": "struct EnumerableSet.UintSet"
}
]
\ No newline at end of file
......@@ -7,11 +7,18 @@
"type": "address"
},
{
"bytes": "12",
"label": "spacer_0_20_12",
"bytes": "1",
"label": "_initialized",
"offset": 20,
"slot": "0",
"type": "bytes12"
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 21,
"slot": "0",
"type": "bool"
},
{
"bytes": "1600",
......@@ -85,10 +92,10 @@
},
{
"bytes": "20",
"label": "spacer_204_0_20",
"label": "xDomainMsgSender",
"offset": 0,
"slot": "204",
"type": "bytes20"
"type": "address"
},
{
"bytes": "30",
......@@ -106,52 +113,17 @@
},
{
"bytes": "20",
"label": "spacer_207_0_20",
"label": "otherMessenger",
"offset": 0,
"slot": "207",
"type": "address"
},
{
"bytes": "20",
"label": "xDomainMsgSender",
"offset": 0,
"slot": "208",
"type": "address"
"type": "contract CrossDomainMessenger"
},
{
"bytes": "12",
"label": "spacer_208_20_12",
"offset": 20,
"slot": "208",
"type": "bytes12"
},
{
"bytes": "1312",
"bytes": "1376",
"label": "__gap",
"offset": 0,
"slot": "209",
"type": "uint256[41]"
},
{
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "250",
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "250",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_250_2_30",
"offset": 2,
"slot": "250",
"type": "bytes30"
"slot": "208",
"type": "uint256[43]"
},
{
"bytes": "20",
......
[
{
"bytes": "32",
"label": "spacer_0_0_32",
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "bytes32"
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_0_2_30",
"offset": 2,
"slot": "0",
"type": "bytes30"
},
{
"bytes": "20",
"label": "spacer_1_0_20",
"label": "messenger",
"offset": 0,
"slot": "1",
"type": "address"
"type": "contract ICrossDomainMessenger"
},
{
"bytes": "20",
"label": "spacer_2_0_20",
"label": "otherBridge",
"offset": 0,
"slot": "2",
"type": "address"
"type": "contract ERC721Bridge"
},
{
"bytes": "1472",
......@@ -40,12 +54,5 @@
"offset": 0,
"slot": "50",
"type": "contract ISuperchainConfig"
},
{
"bytes": "20",
"label": "crossDomainMessenger",
"offset": 0,
"slot": "51",
"type": "contract ICrossDomainMessenger"
}
]
\ No newline at end of file
[
{
"bytes": "32",
"label": "spacer_0_0_32",
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "bytes32"
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_0_2_30",
"offset": 2,
"slot": "0",
"type": "bytes30"
},
{
"bytes": "20",
......@@ -22,45 +36,24 @@
},
{
"bytes": "20",
"label": "spacer_3_0_20",
"label": "messenger",
"offset": 0,
"slot": "3",
"type": "address"
"type": "contract ICrossDomainMessenger"
},
{
"bytes": "20",
"label": "spacer_4_0_20",
"label": "otherBridge",
"offset": 0,
"slot": "4",
"type": "address"
"type": "contract StandardBridge"
},
{
"bytes": "1408",
"bytes": "1440",
"label": "__gap",
"offset": 0,
"slot": "5",
"type": "uint256[44]"
},
{
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "49",
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "49",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_49_2_30",
"offset": 2,
"slot": "49",
"type": "bytes30"
"type": "uint256[45]"
},
{
"bytes": "20",
......@@ -75,12 +68,5 @@
"offset": 0,
"slot": "51",
"type": "contract ISystemConfig"
},
{
"bytes": "20",
"label": "crossDomainMessenger",
"offset": 0,
"slot": "52",
"type": "contract ICrossDomainMessenger"
}
]
\ No newline at end of file
......@@ -7,11 +7,18 @@
"type": "address"
},
{
"bytes": "12",
"label": "spacer_0_20_12",
"bytes": "1",
"label": "_initialized",
"offset": 20,
"slot": "0",
"type": "bytes12"
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 21,
"slot": "0",
"type": "bool"
},
{
"bytes": "1600",
......@@ -85,10 +92,10 @@
},
{
"bytes": "20",
"label": "spacer_204_0_20",
"label": "xDomainMsgSender",
"offset": 0,
"slot": "204",
"type": "bytes20"
"type": "address"
},
{
"bytes": "30",
......@@ -106,30 +113,16 @@
},
{
"bytes": "20",
"label": "spacer_207_0_20",
"label": "otherMessenger",
"offset": 0,
"slot": "207",
"type": "address"
"type": "contract CrossDomainMessenger"
},
{
"bytes": "20",
"label": "xDomainMsgSender",
"offset": 0,
"slot": "208",
"type": "address"
},
{
"bytes": "12",
"label": "spacer_208_20_12",
"offset": 20,
"slot": "208",
"type": "bytes12"
},
{
"bytes": "1312",
"bytes": "1376",
"label": "__gap",
"offset": 0,
"slot": "209",
"type": "uint256[41]"
"slot": "208",
"type": "uint256[43]"
}
]
\ No newline at end of file
[
{
"bytes": "32",
"label": "spacer_0_0_32",
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "bytes32"
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_0_2_30",
"offset": 2,
"slot": "0",
"type": "bytes30"
},
{
"bytes": "20",
"label": "spacer_1_0_20",
"label": "messenger",
"offset": 0,
"slot": "1",
"type": "address"
"type": "contract ICrossDomainMessenger"
},
{
"bytes": "20",
"label": "spacer_2_0_20",
"label": "otherBridge",
"offset": 0,
"slot": "2",
"type": "address"
"type": "contract ERC721Bridge"
},
{
"bytes": "1472",
......
[
{
"bytes": "32",
"label": "spacer_0_0_32",
"offset": 0,
"slot": "0",
"type": "bytes32"
},
{
"bytes": "32",
"label": "spacer_1_0_32",
"offset": 0,
"slot": "1",
"type": "bytes32"
},
{
"bytes": "32",
"label": "deployments",
"offset": 0,
"slot": "2",
"type": "mapping(address => address)"
},
{
"bytes": "1536",
"label": "__gap",
"offset": 0,
"slot": "3",
"type": "uint256[48]"
}
]
\ No newline at end of file
[
{
"bytes": "20",
"label": "_owner",
"offset": 0,
"slot": "0",
"type": "address"
},
{
"bytes": "32",
"label": "proxyType",
"offset": 0,
"slot": "1",
"type": "mapping(address => enum ProxyAdmin.ProxyType)"
},
{
"bytes": "32",
"label": "implementationName",
"offset": 0,
"slot": "2",
"type": "mapping(address => string)"
},
{
"bytes": "20",
"label": "addressManager",
"offset": 0,
"slot": "3",
"type": "contract IAddressManager"
},
{
"bytes": "1",
"label": "upgrading",
"offset": 20,
"slot": "3",
"type": "bool"
}
]
\ No newline at end of file
[
{
"bytes": "32",
"label": "spacer_0_0_32",
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "bytes32"
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_0_2_30",
"offset": 2,
"slot": "0",
"type": "bytes30"
},
{
"bytes": "20",
......@@ -22,23 +36,23 @@
},
{
"bytes": "20",
"label": "spacer_3_0_20",
"label": "messenger",
"offset": 0,
"slot": "3",
"type": "address"
"type": "contract ICrossDomainMessenger"
},
{
"bytes": "20",
"label": "spacer_4_0_20",
"label": "otherBridge",
"offset": 0,
"slot": "4",
"type": "address"
"type": "contract StandardBridge"
},
{
"bytes": "1408",
"bytes": "1440",
"label": "__gap",
"offset": 0,
"slot": "5",
"type": "uint256[44]"
"type": "uint256[45]"
}
]
\ No newline at end of file
[
{
"bytes": "32",
"label": "spacer_0_0_32",
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "bytes32"
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_0_2_30",
"offset": 2,
"slot": "0",
"type": "bytes30"
},
{
"bytes": "20",
......@@ -22,23 +36,23 @@
},
{
"bytes": "20",
"label": "spacer_3_0_20",
"label": "messenger",
"offset": 0,
"slot": "3",
"type": "address"
"type": "contract ICrossDomainMessenger"
},
{
"bytes": "20",
"label": "spacer_4_0_20",
"label": "otherBridge",
"offset": 0,
"slot": "4",
"type": "address"
"type": "contract StandardBridge"
},
{
"bytes": "1408",
"bytes": "1440",
"label": "__gap",
"offset": 0,
"slot": "5",
"type": "uint256[44]"
"type": "uint256[45]"
}
]
\ No newline at end of file
[
{
"bytes": "32",
"label": "spacer_0_0_32",
"offset": 0,
"slot": "0",
"type": "bytes32"
},
{
"bytes": "32",
"label": "spacer_1_0_32",
"offset": 0,
"slot": "1",
"type": "bytes32"
},
{
"bytes": "32",
"label": "deployments",
"offset": 0,
"slot": "2",
"type": "mapping(address => address)"
},
{
"bytes": "1536",
"label": "__gap",
"offset": 0,
"slot": "3",
"type": "uint256[48]"
},
{
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "51",
"slot": "0",
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "51",
"slot": "0",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_51_2_30",
"label": "spacer_0_2_30",
"offset": 2,
"slot": "51",
"slot": "0",
"type": "bytes30"
},
{
"bytes": "20",
"label": "standardBridge",
"label": "bridge",
"offset": 0,
"slot": "52",
"slot": "1",
"type": "address"
},
{
"bytes": "32",
"label": "deployments",
"offset": 0,
"slot": "2",
"type": "mapping(address => address)"
},
{
"bytes": "1536",
"label": "__gap",
"offset": 0,
"slot": "3",
"type": "uint256[48]"
}
]
\ No newline at end of file
......@@ -3,7 +3,6 @@ pragma solidity 0.8.15;
// Contracts
import { CrossDomainMessenger } from "src/universal/CrossDomainMessenger.sol";
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
// Libraries
import { Predeploys } from "src/libraries/Predeploys.sol";
......@@ -19,10 +18,7 @@ import { IOptimismPortal } from "src/L1/interfaces/IOptimismPortal.sol";
/// @notice The L1CrossDomainMessenger is a message passing interface between L1 and L2 responsible
/// for sending and receiving data on the L1 side. Users are encouraged to use this
/// interface instead of interacting with lower-level contracts directly.
contract L1CrossDomainMessenger is CrossDomainMessenger, ISemver, Initializable {
/// @notice Spacer to give the initializer a full slot, to avoid offsetting the superchainConfig slot.
bytes30 private spacer_250_2_30;
contract L1CrossDomainMessenger is CrossDomainMessenger, ISemver {
/// @notice Contract of the SuperchainConfig.
ISuperchainConfig public superchainConfig;
......@@ -34,12 +30,16 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, ISemver, Initializable
ISystemConfig public systemConfig;
/// @notice Semantic version.
/// @custom:semver 2.4.1-beta.3
string public constant version = "2.4.1-beta.3";
/// @custom:semver 2.4.1-beta.2
string public constant version = "2.4.1-beta.2";
/// @notice Constructs the L1CrossDomainMessenger contract.
constructor() CrossDomainMessenger() {
_disableInitializers();
initialize({
_superchainConfig: ISuperchainConfig(address(0)),
_portal: IOptimismPortal(payable(address(0))),
_systemConfig: ISystemConfig(address(0))
});
}
/// @notice Initializes the contract.
......@@ -57,12 +57,7 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, ISemver, Initializable
superchainConfig = _superchainConfig;
portal = _portal;
systemConfig = _systemConfig;
}
/// @notice Getter function for the other messenger.
/// @return Contract of the messenger on the other network.
function otherMessenger() public pure override returns (CrossDomainMessenger) {
return CrossDomainMessenger(Predeploys.L2_CROSS_DOMAIN_MESSENGER);
__CrossDomainMessenger_init({ _otherMessenger: CrossDomainMessenger(Predeploys.L2_CROSS_DOMAIN_MESSENGER) });
}
/// @inheritdoc CrossDomainMessenger
......@@ -91,7 +86,7 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, ISemver, Initializable
/// @inheritdoc CrossDomainMessenger
function _isOtherMessenger() internal view override returns (bool) {
return msg.sender == address(portal) && portal.l2Sender() == address(otherMessenger());
return msg.sender == address(portal) && portal.l2Sender() == address(otherMessenger);
}
/// @inheritdoc CrossDomainMessenger
......
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity 0.8.15;
// Contracts
import { ERC721Bridge } from "src/universal/ERC721Bridge.sol";
import { Initializable } from "@openzeppelin/contracts-v5/proxy/utils/Initializable.sol";
// Libraries
import { Predeploys } from "src/libraries/Predeploys.sol";
......@@ -20,7 +19,7 @@ import { IL2ERC721Bridge } from "src/L2/interfaces/IL2ERC721Bridge.sol";
/// @notice The L1 ERC721 bridge is a contract which works together with the L2 ERC721 bridge to
/// make it possible to transfer ERC721 tokens from Ethereum to Optimism. This contract
/// acts as an escrow for ERC721 tokens deposited into L2.
contract L1ERC721Bridge is ERC721Bridge, Initializable, ISemver {
contract L1ERC721Bridge is ERC721Bridge, ISemver {
/// @notice Mapping of L1 token to L2 token to ID to boolean, indicating if the given L1 token
/// by ID was deposited for a given L2 token.
mapping(address => mapping(address => mapping(uint256 => bool))) public deposits;
......@@ -28,16 +27,13 @@ contract L1ERC721Bridge is ERC721Bridge, Initializable, ISemver {
/// @notice Address of the SuperchainConfig contract.
ISuperchainConfig public superchainConfig;
/// @notice Contract of the CrossDomainMessenger on this chain.
ICrossDomainMessenger internal crossDomainMessenger;
/// @notice Semantic version.
/// @custom:semver 2.1.1-beta.3
string public constant version = "2.1.1-beta.3";
/// @custom:semver 2.2.0-beta.1
string public constant version = "2.2.0-beta.1";
/// @notice Constructs the L1ERC721Bridge contract.
constructor() ERC721Bridge() {
_disableInitializers();
initialize({ _messenger: ICrossDomainMessenger(address(0)), _superchainConfig: ISuperchainConfig(address(0)) });
}
/// @notice Initializes the contract.
......@@ -45,19 +41,7 @@ contract L1ERC721Bridge is ERC721Bridge, Initializable, ISemver {
/// @param _superchainConfig Contract of the SuperchainConfig contract on this network.
function initialize(ICrossDomainMessenger _messenger, ISuperchainConfig _superchainConfig) public initializer {
superchainConfig = _superchainConfig;
crossDomainMessenger = _messenger;
}
/// @notice Getter function for the CrossDomainMessenger contract on this chain.
/// @return Contract of the CrossDomainMessenger on this chain.
function messenger() public view override returns (ICrossDomainMessenger) {
return ICrossDomainMessenger(crossDomainMessenger);
}
/// @notice Getter function for the other bridge.
/// @return Contract of the bridge on the other network.
function otherBridge() public pure override returns (ERC721Bridge) {
return ERC721Bridge(payable(Predeploys.L2_ERC721_BRIDGE));
__ERC721Bridge_init({ _messenger: _messenger, _otherBridge: ERC721Bridge(payable(Predeploys.L2_ERC721_BRIDGE)) });
}
/// @inheritdoc ERC721Bridge
......@@ -132,7 +116,7 @@ contract L1ERC721Bridge is ERC721Bridge, Initializable, ISemver {
IERC721(_localToken).transferFrom({ from: _from, to: address(this), tokenId: _tokenId });
// Send calldata into L2
messenger().sendMessage({ _target: address(otherBridge()), _message: message, _minGasLimit: _minGasLimit });
messenger.sendMessage({ _target: address(otherBridge), _message: message, _minGasLimit: _minGasLimit });
emit ERC721BridgeInitiated(_localToken, _remoteToken, _from, _to, _tokenId, _extraData);
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { OptimismMintableERC20Factory } from "src/universal/OptimismMintableERC20Factory.sol";
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
/// @custom:proxied true
/// @title L1OptimismMintableERC20Factory
/// @notice Allows users to create L1 tokens that represent L2 native tokens.
contract L1OptimismMintableERC20Factory is OptimismMintableERC20Factory, Initializable {
/// @custom:semver 1.3.1-beta.5
/// @notice Semantic version.
/// The semver MUST be bumped any time that there is a change in
/// the OptimismMintableERC20 token contract since this contract
/// is responsible for deploying OptimismMintableERC20 contracts.
string public constant version = "1.3.1-beta.5";
/// @custom:spacer
/// @notice Spacer to fill the remainder of the _initialized slot, preventing the standardBridge
/// address from being packed with it.
bytes30 private spacer_51_2_30;
/// @notice Address of the bridge on this domain.
address internal standardBridge;
constructor() {
_disableInitializers();
}
/// @notice Initializes the contract.
/// @param _bridge Contract of the bridge on this domain.
function initialize(address _bridge) public initializer {
standardBridge = _bridge;
}
/// @notice Getter function for the bridge contract.
/// @return Contract of the bridge on this domain.
function bridge() public view virtual override returns (address) {
return standardBridge;
}
}
......@@ -3,16 +3,15 @@ pragma solidity 0.8.15;
// Contracts
import { StandardBridge } from "src/universal/StandardBridge.sol";
// Libraries
import { Predeploys } from "src/libraries/Predeploys.sol";
// Interfaces
import { ISemver } from "src/universal/interfaces/ISemver.sol";
import { ICrossDomainMessenger } from "src/universal/interfaces/ICrossDomainMessenger.sol";
import { IStandardBridge } from "src/universal/interfaces/IStandardBridge.sol";
import { ISuperchainConfig } from "src/L1/interfaces/ISuperchainConfig.sol";
import { ISystemConfig } from "src/L1/interfaces/ISystemConfig.sol";
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
/// @custom:proxied true
/// @title L1StandardBridge
......@@ -24,7 +23,7 @@ import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable
/// NOTE: this contract is not intended to support all variations of ERC20 tokens. Examples
/// of some token types that may not be properly supported by this contract include, but are
/// not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists.
contract L1StandardBridge is StandardBridge, ISemver, Initializable {
contract L1StandardBridge is StandardBridge, ISemver {
/// @custom:legacy
/// @notice Emitted whenever a deposit of ETH from L1 into L2 is initiated.
/// @param from Address of the depositor.
......@@ -76,13 +75,8 @@ contract L1StandardBridge is StandardBridge, ISemver, Initializable {
);
/// @notice Semantic version.
/// @custom:semver 2.2.1-beta.3
string public constant version = "2.2.1-beta.3";
/// @custom:spacer
/// @notice Spacer to fill the remainder of the _initialized slot, preventing the superchainConfig
/// address from being packed with it.
bytes30 private spacer_49_2_30;
/// @custom:semver 2.2.1-beta.2
string public constant version = "2.2.1-beta.2";
/// @notice Address of the SuperchainConfig contract.
ISuperchainConfig public superchainConfig;
......@@ -90,12 +84,13 @@ contract L1StandardBridge is StandardBridge, ISemver, Initializable {
/// @notice Address of the SystemConfig contract.
ISystemConfig public systemConfig;
/// @notice Contract for the CrossDomainMessenger on this network.
ICrossDomainMessenger internal crossDomainMessenger;
/// @notice Constructs the L1StandardBridge contract.
constructor() StandardBridge() {
_disableInitializers();
initialize({
_messenger: ICrossDomainMessenger(address(0)),
_superchainConfig: ISuperchainConfig(address(0)),
_systemConfig: ISystemConfig(address(0))
});
}
/// @notice Initializer.
......@@ -111,19 +106,10 @@ contract L1StandardBridge is StandardBridge, ISemver, Initializable {
{
superchainConfig = _superchainConfig;
systemConfig = _systemConfig;
crossDomainMessenger = _messenger;
}
/// @notice Returns the contract of the bridge on the other chain.
/// @return Contract of the bridge on the other chain.
function otherBridge() public pure override returns (IStandardBridge) {
return IStandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE));
}
/// @notice Getter function for the messenger contract.
/// @return Contract of the messenger on this domain.
function messenger() public view override returns (ICrossDomainMessenger) {
return ICrossDomainMessenger(crossDomainMessenger);
__StandardBridge_init({
_messenger: _messenger,
_otherBridge: StandardBridge(payable(Predeploys.L2_STANDARD_BRIDGE))
});
}
/// @inheritdoc StandardBridge
......@@ -255,8 +241,8 @@ contract L1StandardBridge is StandardBridge, ISemver, Initializable {
/// @custom:legacy
/// @notice Retrieves the access of the corresponding L2 bridge contract.
/// @return Address of the corresponding L2 bridge contract.
function l2TokenBridge() external pure returns (address) {
return address(otherBridge());
function l2TokenBridge() external view returns (address) {
return address(otherBridge);
}
/// @notice Internal function for initiating an ETH deposit.
......
......@@ -46,7 +46,6 @@ contract OPContractsManager is ISemver, Initializable {
address unsafeBlockSigner;
address proposer;
address challenger;
address systemConfigFeeAdmin;
}
/// @notice The full set of inputs to deploy a new OP Stack chain.
......@@ -130,8 +129,8 @@ contract OPContractsManager is ISemver, Initializable {
// -------- Constants and Variables --------
/// @custom:semver 1.0.0-beta.21
string public constant version = "1.0.0-beta.21";
/// @custom:semver 1.0.0-beta.20
string public constant version = "1.0.0-beta.20";
/// @notice Represents the interface version so consumers know how to decode the DeployOutput struct
/// that's emitted in the `Deployed` event. Whenever that struct changes, a new version should be used.
......@@ -255,7 +254,7 @@ contract OPContractsManager is ISemver, Initializable {
output.systemConfigProxy =
ISystemConfig(deployProxy(l2ChainId, output.opChainProxyAdmin, saltMixer, "SystemConfig"));
output.optimismMintableERC20FactoryProxy = IOptimismMintableERC20Factory(
deployProxy(l2ChainId, output.opChainProxyAdmin, saltMixer, "L1OptimismMintableERC20Factory")
deployProxy(l2ChainId, output.opChainProxyAdmin, saltMixer, "OptimismMintableERC20Factory")
);
output.disputeGameFactoryProxy =
IDisputeGameFactory(deployProxy(l2ChainId, output.opChainProxyAdmin, saltMixer, "DisputeGameFactory"));
......@@ -469,15 +468,12 @@ contract OPContractsManager is ISemver, Initializable {
return abi.encodeWithSelector(
_selector,
ISystemConfig.Roles({
owner: _input.roles.systemConfigOwner,
feeAdmin: _input.roles.systemConfigFeeAdmin,
unsafeBlockSigner: _input.roles.unsafeBlockSigner,
batcherHash: bytes32(uint256(uint160(_input.roles.batcher)))
}),
_input.roles.systemConfigOwner,
_input.basefeeScalar,
_input.blobBasefeeScalar,
bytes32(uint256(uint160(_input.roles.batcher))), // batcherHash
_input.gasLimit,
_input.roles.unsafeBlockSigner,
referenceResourceConfig,
chainIdToBatchInboxAddress(_input.l2ChainId),
opChainAddrs
......@@ -491,15 +487,12 @@ contract OPContractsManager is ISemver, Initializable {
return abi.encodeWithSelector(
_selector,
ISystemConfig.Roles({
owner: _input.roles.systemConfigOwner,
feeAdmin: _input.roles.systemConfigFeeAdmin,
unsafeBlockSigner: _input.roles.unsafeBlockSigner,
batcherHash: bytes32(uint256(uint160(_input.roles.batcher)))
}),
_input.roles.systemConfigOwner,
_input.basefeeScalar,
_input.blobBasefeeScalar,
bytes32(uint256(uint160(_input.roles.batcher))), // batcherHash
_input.gasLimit,
_input.roles.unsafeBlockSigner,
referenceResourceConfig,
chainIdToBatchInboxAddress(_input.l2ChainId),
opChainAddrs
......
......@@ -41,15 +41,12 @@ contract OPContractsManagerInterop is OPContractsManager {
return abi.encodeWithSelector(
_selector,
ISystemConfig.Roles({
owner: _input.roles.systemConfigOwner,
feeAdmin: _input.roles.systemConfigFeeAdmin,
unsafeBlockSigner: _input.roles.unsafeBlockSigner,
batcherHash: bytes32(uint256(uint160(_input.roles.batcher)))
}),
_input.roles.systemConfigOwner,
_input.basefeeScalar,
_input.blobBasefeeScalar,
bytes32(uint256(uint160(_input.roles.batcher))), // batcherHash
_input.gasLimit,
_input.roles.unsafeBlockSigner,
referenceResourceConfig,
chainIdToBatchInboxAddress(_input.l2ChainId),
opChainAddrs,
......
......@@ -146,9 +146,9 @@ contract OptimismPortal is Initializable, ResourceMetering, ISemver {
}
/// @notice Semantic version.
/// @custom:semver 2.8.1-beta.5
/// @custom:semver 2.8.1-beta.4
function version() public pure virtual returns (string memory) {
return "2.8.1-beta.5";
return "2.8.1-beta.4";
}
/// @notice Constructs the OptimismPortal contract.
......@@ -584,17 +584,17 @@ contract OptimismPortal is Initializable, ResourceMetering, ISemver {
emit TransactionDeposited(from, _to, DEPOSIT_VERSION, opaqueData);
}
/// @notice Sets static configuration options for the L2 system.
/// @param _type Type of configuration to set.
/// @param _value Encoded value of the configuration.
function setConfig(Types.ConfigType _type, bytes memory _value) external {
/// @notice Sets the gas paying token for the L2 system. This token is used as the
/// L2 native asset. Only the SystemConfig contract can call this function.
function setGasPayingToken(address _token, uint8 _decimals, bytes32 _name, bytes32 _symbol) external {
if (msg.sender != address(systemConfig)) revert Unauthorized();
// Set L2 deposit gas as used without paying burning gas. Ensures that deposits cannot use too much L2 gas.
// This value must be large enough to cover the cost of calling `L1Block.setConfig`.
// This value must be large enough to cover the cost of calling `L1Block.setGasPayingToken`.
useGas(SYSTEM_DEPOSIT_GAS_LIMIT);
// Emit the special deposit transaction directly that sets the config in the L1Block predeploy contract.
// Emit the special deposit transaction directly that sets the gas paying
// token in the L1Block predeploy contract.
emit TransactionDeposited(
Constants.DEPOSITOR_ACCOUNT,
Predeploys.L1_BLOCK_ATTRIBUTES,
......@@ -604,7 +604,7 @@ contract OptimismPortal is Initializable, ResourceMetering, ISemver {
uint256(0), // value
uint64(SYSTEM_DEPOSIT_GAS_LIMIT), // gasLimit
false, // isCreation,
abi.encodeCall(IL1Block.setConfig, (_type, _value))
abi.encodeCall(IL1Block.setGasPayingToken, (_token, _decimals, _name, _symbol))
)
);
}
......
......@@ -183,9 +183,9 @@ contract OptimismPortal2 is Initializable, ResourceMetering, ISemver {
}
/// @notice Semantic version.
/// @custom:semver 3.11.0-beta.7
/// @custom:semver 3.11.0-beta.6
function version() public pure virtual returns (string memory) {
return "3.11.0-beta.7";
return "3.11.0-beta.6";
}
/// @notice Constructs the OptimismPortal contract.
......@@ -605,17 +605,17 @@ contract OptimismPortal2 is Initializable, ResourceMetering, ISemver {
emit TransactionDeposited(from, _to, DEPOSIT_VERSION, opaqueData);
}
/// @notice Sets static configuration options for the L2 system.
/// @param _type Type of configuration to set.
/// @param _value Encoded value of the configuration.
function setConfig(Types.ConfigType _type, bytes memory _value) external {
/// @notice Sets the gas paying token for the L2 system. This token is used as the
/// L2 native asset. Only the SystemConfig contract can call this function.
function setGasPayingToken(address _token, uint8 _decimals, bytes32 _name, bytes32 _symbol) external {
if (msg.sender != address(systemConfig)) revert Unauthorized();
// Set L2 deposit gas as used without paying burning gas. Ensures that deposits cannot use too much L2 gas.
// This value must be large enough to cover the cost of calling `L1Block.setConfig`.
// This value must be large enough to cover the cost of calling `L1Block.setGasPayingToken`.
useGas(SYSTEM_DEPOSIT_GAS_LIMIT);
// Emit the special deposit transaction directly that sets the config in the L1Block predeploy contract.
// Emit the special deposit transaction directly that sets the gas paying
// token in the L1Block predeploy contract.
emit TransactionDeposited(
Constants.DEPOSITOR_ACCOUNT,
Predeploys.L1_BLOCK_ATTRIBUTES,
......@@ -625,30 +625,7 @@ contract OptimismPortal2 is Initializable, ResourceMetering, ISemver {
uint256(0), // value
uint64(SYSTEM_DEPOSIT_GAS_LIMIT), // gasLimit
false, // isCreation,
abi.encodeCall(IL1Block.setConfig, (_type, _value))
)
);
}
/// @notice Calls the L2ProxyAdmin as the DEPOSITOR_ACCOUNT. This function can be used
/// to upgrade the predeploys on L2. Only callable by the upgrader role on the
/// SuperchainConfig.
function upgrade(uint32 _gasLimit, bytes memory _calldata) external {
if (msg.sender != superchainConfig.upgrader()) revert Unauthorized();
useGas(_gasLimit);
// Emit the special deposit transaction which calls to the L2 Proxy Admin
emit TransactionDeposited(
Constants.DEPOSITOR_ACCOUNT,
Predeploys.PROXY_ADMIN,
DEPOSIT_VERSION,
abi.encodePacked(
uint256(0), // mint
uint256(0), // value
uint64(_gasLimit), // gasLimit
false, // isCreation,
_calldata // data
abi.encodeCall(IL1Block.setGasPayingToken, (_token, _decimals, _name, _symbol))
)
);
}
......
......@@ -3,6 +3,12 @@ pragma solidity 0.8.15;
// Contracts
import { OptimismPortal2 } from "src/L1/OptimismPortal2.sol";
import { L1BlockInterop, ConfigType } from "src/L2/L1BlockInterop.sol";
// Libraries
import { Predeploys } from "src/libraries/Predeploys.sol";
import { Constants } from "src/libraries/Constants.sol";
import { Unauthorized } from "src/libraries/PortalErrors.sol";
/// @custom:proxied true
/// @title OptimismPortalInterop
......@@ -17,8 +23,33 @@ contract OptimismPortalInterop is OptimismPortal2 {
OptimismPortal2(_proofMaturityDelaySeconds, _disputeGameFinalityDelaySeconds)
{ }
/// @custom:semver +interop-beta.3
/// @custom:semver +interop-beta.2
function version() public pure override returns (string memory) {
return string.concat(super.version(), "+interop-beta.3");
return string.concat(super.version(), "+interop-beta.2");
}
/// @notice Sets static configuration options for the L2 system.
/// @param _type Type of configuration to set.
/// @param _value Encoded value of the configuration.
function setConfig(ConfigType _type, bytes memory _value) external {
if (msg.sender != address(systemConfig)) revert Unauthorized();
// Set L2 deposit gas as used without paying burning gas. Ensures that deposits cannot use too much L2 gas.
// This value must be large enough to cover the cost of calling `L1Block.setConfig`.
useGas(SYSTEM_DEPOSIT_GAS_LIMIT);
// Emit the special deposit transaction directly that sets the config in the L1Block predeploy contract.
emit TransactionDeposited(
Constants.DEPOSITOR_ACCOUNT,
Predeploys.L1_BLOCK_ATTRIBUTES,
DEPOSIT_VERSION,
abi.encodePacked(
uint256(0), // mint
uint256(0), // value
uint64(SYSTEM_DEPOSIT_GAS_LIMIT), // gasLimit
false, // isCreation,
abi.encodeCall(L1BlockInterop.setConfig, (_type, _value))
)
);
}
}
......@@ -12,10 +12,8 @@ import { Storage } from "src/libraries/Storage.sol";
contract SuperchainConfig is Initializable, ISemver {
/// @notice Enum representing different types of updates.
/// @custom:value GUARDIAN Represents an update to the guardian.
/// @custom:value UPGRADER Represents an update to the upgrader.
enum UpdateType {
GUARDIAN,
UPGRADER
GUARDIAN
}
/// @notice Whether or not the Superchain is paused.
......@@ -25,10 +23,6 @@ contract SuperchainConfig is Initializable, ISemver {
/// It can only be modified by an upgrade.
bytes32 public constant GUARDIAN_SLOT = bytes32(uint256(keccak256("superchainConfig.guardian")) - 1);
/// @notice The address of the upgrader, which can faciliate upgrades of L2 predeploys.
/// . It can only be modified by an upgrade.
bytes32 public constant UPGRADER_SLOT = bytes32(uint256(keccak256("superchainConfig.upgrader")) - 1);
/// @notice Emitted when the pause is triggered.
/// @param identifier A string helping to identify provenance of the pause transaction.
event Paused(string identifier);
......@@ -42,20 +36,19 @@ contract SuperchainConfig is Initializable, ISemver {
event ConfigUpdate(UpdateType indexed updateType, bytes data);
/// @notice Semantic version.
/// @custom:semver 1.1.1-beta.2
string public constant version = "1.1.1-beta.2";
/// @custom:semver 1.1.1-beta.1
string public constant version = "1.1.1-beta.1";
/// @notice Constructs the SuperchainConfig contract.
constructor() {
_disableInitializers();
initialize({ _guardian: address(0), _paused: false });
}
/// @notice Initializer.
/// @param _guardian Address of the guardian, can pause the OptimismPortal.
/// @param _paused Initial paused status.
function initialize(address _guardian, address _upgrader, bool _paused) public initializer {
function initialize(address _guardian, bool _paused) public initializer {
_setGuardian(_guardian);
_setUpgrader(_upgrader);
if (_paused) {
_pause("Initializer paused");
}
......@@ -66,11 +59,6 @@ contract SuperchainConfig is Initializable, ISemver {
guardian_ = Storage.getAddress(GUARDIAN_SLOT);
}
/// @notice Getter for the upgrader address.
function upgrader() public view returns (address upgrader_) {
upgrader_ = Storage.getAddress(UPGRADER_SLOT);
}
/// @notice Getter for the current paused status.
function paused() public view returns (bool paused_) {
paused_ = Storage.getBool(PAUSED_SLOT);
......@@ -104,12 +92,4 @@ contract SuperchainConfig is Initializable, ISemver {
Storage.setAddress(GUARDIAN_SLOT, _guardian);
emit ConfigUpdate(UpdateType.GUARDIAN, abi.encode(_guardian));
}
/// @notice Sets the upgrader address. This is only callable during initialization, so an upgrade
/// will be required to change the upgrader.
/// @param _upgrader The new upgrader address.
function _setUpgrader(address _upgrader) internal {
Storage.setAddress(UPGRADER_SLOT, _upgrader);
emit ConfigUpdate(UpdateType.UPGRADER, abi.encode(_upgrader));
}
}
......@@ -7,8 +7,6 @@ import { IOptimismPortal } from "src/L1/interfaces/IOptimismPortal.sol";
import { ISystemConfig } from "src/L1/interfaces/ISystemConfig.sol";
interface IL1CrossDomainMessenger is ICrossDomainMessenger {
event Initialized(uint8 version);
function PORTAL() external view returns (IOptimismPortal);
function initialize(
ISuperchainConfig _superchainConfig,
......@@ -16,8 +14,6 @@ interface IL1CrossDomainMessenger is ICrossDomainMessenger {
ISystemConfig _systemConfig
)
external;
function OTHER_MESSENGER() external view returns (ICrossDomainMessenger);
function otherMessenger() external pure returns (ICrossDomainMessenger);
function portal() external view returns (IOptimismPortal);
function superchainConfig() external view returns (ISuperchainConfig);
function systemConfig() external view returns (ISystemConfig);
......
......@@ -6,11 +6,6 @@ import { ICrossDomainMessenger } from "src/universal/interfaces/ICrossDomainMess
import { ISuperchainConfig } from "src/L1/interfaces/ISuperchainConfig.sol";
interface IL1ERC721Bridge is IERC721Bridge {
error InvalidInitialization();
error NotInitializing();
event Initialized(uint64 version);
function bridgeERC721(
address _localToken,
address _remoteToken,
......@@ -39,7 +34,6 @@ interface IL1ERC721Bridge is IERC721Bridge {
)
external;
function initialize(ICrossDomainMessenger _messenger, ISuperchainConfig _superchainConfig) external;
function otherBridge() external pure returns (IERC721Bridge);
function paused() external view returns (bool);
function superchainConfig() external view returns (ISuperchainConfig);
function version() external view returns (string memory);
......
......@@ -25,7 +25,6 @@ interface IL1StandardBridge is IStandardBridge {
);
event ETHDepositInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData);
event ETHWithdrawalFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData);
event Initialized(uint8 version);
function depositERC20(
address _l1Token,
......@@ -69,9 +68,7 @@ interface IL1StandardBridge is IStandardBridge {
ISystemConfig _systemConfig
)
external;
function l2TokenBridge() external pure returns (address);
function OTHER_BRIDGE() external view returns (IStandardBridge);
function otherBridge() external pure returns (IStandardBridge);
function l2TokenBridge() external view returns (address);
function superchainConfig() external view returns (ISuperchainConfig);
function systemConfig() external view returns (ISystemConfig);
function version() external view returns (string memory);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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