Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion op-chain-ops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ fuzz:


sync-standard-version:
curl -Lo ./deployer/opsm/standard-versions.toml https://raw.githubusercontent.com/ethereum-optimism/superchain-registry/refs/heads/main/validation/standard/standard-versions.toml
curl -Lo ./deployer/opcm/standard-versions.toml https://raw.githubusercontent.com/ethereum-optimism/superchain-registry/refs/heads/main/validation/standard/standard-versions.toml

.PHONY: test fuzz op-deployer sync-standard-version
2 changes: 1 addition & 1 deletion op-chain-ops/deployer/integration_test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestEndToEndApply(t *testing.T) {
{"SuperchainConfigImpl", st.SuperchainDeployment.SuperchainConfigImplAddress},
{"ProtocolVersionsProxy", st.SuperchainDeployment.ProtocolVersionsProxyAddress},
{"ProtocolVersionsImpl", st.SuperchainDeployment.ProtocolVersionsImplAddress},
{"OpsmProxy", st.ImplementationsDeployment.OpsmProxyAddress},
{"OpcmProxy", st.ImplementationsDeployment.OpcmProxyAddress},
{"DelayedWETHImpl", st.ImplementationsDeployment.DelayedWETHImplAddress},
{"OptimismPortalImpl", st.ImplementationsDeployment.OptimismPortalImplAddress},
{"PreimageOracleSingleton", st.ImplementationsDeployment.PreimageOracleSingletonAddress},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package opsm
package opcm

import (
"fmt"
Expand All @@ -16,7 +16,7 @@ type DeployImplementationsInput struct {
ChallengePeriodSeconds *big.Int
ProofMaturityDelaySeconds *big.Int
DisputeGameFinalityDelaySeconds *big.Int
// Release version to set OPSM implementations for, of the format `op-contracts/vX.Y.Z`.
// Release version to set OPCM implementations for, of the format `op-contracts/vX.Y.Z`.
Release string
SuperchainConfigProxy common.Address
ProtocolVersionsProxy common.Address
Expand All @@ -31,8 +31,8 @@ func (input *DeployImplementationsInput) InputSet() bool {
}

type DeployImplementationsOutput struct {
OpsmProxy common.Address
OpsmImpl common.Address
OpcmProxy common.Address
OpcmImpl common.Address
DelayedWETHImpl common.Address
OptimismPortalImpl common.Address
PreimageOracleSingleton common.Address
Expand Down Expand Up @@ -84,12 +84,12 @@ func DeployImplementations(
}
defer cleanupDeploy()

opsmContract := "OPStackManager"
opcmContract := "OPContractsManager"
if input.UseInterop {
opsmContract = "OPStackManagerInterop"
opcmContract = "OPContractsManagerInterop"
}
if err := host.RememberOnLabel("OPStackManager", opsmContract+".sol", opsmContract); err != nil {
return output, fmt.Errorf("failed to link OPStackManager label: %w", err)
if err := host.RememberOnLabel("OPContractsManager", opcmContract+".sol", opcmContract); err != nil {
return output, fmt.Errorf("failed to link OPContractsManager label: %w", err)
}

// So we can see in detail where the SystemConfig interop initializer fails
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package opsm
package opcm

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package opsm
package opcm

import (
"fmt"
Expand Down Expand Up @@ -26,7 +26,7 @@ type DeployOPChainInput struct {
BasefeeScalar uint32
BlobBaseFeeScalar uint32
L2ChainId *big.Int
OpsmProxy common.Address
OpcmProxy common.Address
}

func (input *DeployOPChainInput) InputSet() bool {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package opsm
package opcm

import "embed"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package opsm
package opcm

import (
"fmt"
Expand Down
12 changes: 6 additions & 6 deletions op-chain-ops/deployer/pipeline/implementations.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"math/big"

"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opsm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opcm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/state"
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
"github.com/ethereum-optimism/optimism/op-chain-ops/script"
Expand All @@ -22,7 +22,7 @@ func DeployImplementations(ctx context.Context, env *Env, artifactsFS foundry.St
lgr.Info("deploying implementations")

var dump *foundry.ForgeAllocs
var dio opsm.DeployImplementationsOutput
var dio opcm.DeployImplementationsOutput
var err error
err = CallScriptBroadcast(
ctx,
Expand All @@ -37,9 +37,9 @@ func DeployImplementations(ctx context.Context, env *Env, artifactsFS foundry.St
Handler: func(host *script.Host) error {
host.SetEnvVar("IMPL_SALT", st.Create2Salt.Hex()[2:])
host.ImportState(st.SuperchainDeployment.StateDump)
dio, err = opsm.DeployImplementations(
dio, err = opcm.DeployImplementations(
host,
opsm.DeployImplementationsInput{
opcm.DeployImplementationsInput{
Salt: st.Create2Salt,
WithdrawalDelaySeconds: big.NewInt(604800),
MinProposalSizeBytes: big.NewInt(126000),
Expand All @@ -50,7 +50,7 @@ func DeployImplementations(ctx context.Context, env *Env, artifactsFS foundry.St
SuperchainConfigProxy: st.SuperchainDeployment.SuperchainConfigProxyAddress,
ProtocolVersionsProxy: st.SuperchainDeployment.ProtocolVersionsProxyAddress,
SuperchainProxyAdmin: st.SuperchainDeployment.ProxyAdminAddress,
StandardVersionsToml: opsm.StandardVersionsData,
StandardVersionsToml: opcm.StandardVersionsData,
UseInterop: false,
},
)
Expand All @@ -70,7 +70,7 @@ func DeployImplementations(ctx context.Context, env *Env, artifactsFS foundry.St
}

st.ImplementationsDeployment = &state.ImplementationsDeployment{
OpsmProxyAddress: dio.OpsmProxy,
OpcmProxyAddress: dio.OpcmProxy,
DelayedWETHImplAddress: dio.DelayedWETHImpl,
OptimismPortalImplAddress: dio.OptimismPortalImpl,
PreimageOracleSingletonAddress: dio.PreimageOracleSingleton,
Expand Down
6 changes: 3 additions & 3 deletions op-chain-ops/deployer/pipeline/l2genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"math/big"

"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opsm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opcm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/state"
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
"github.com/ethereum-optimism/optimism/op-chain-ops/script"
Expand Down Expand Up @@ -47,8 +47,8 @@ func GenerateL2Genesis(ctx context.Context, env *Env, artifactsFS foundry.StatDi
Client: env.L1Client,
Broadcaster: DiscardBroadcaster,
Handler: func(host *script.Host) error {
err := opsm.L2Genesis(host, &opsm.L2GenesisInput{
L1Deployments: opsm.L1Deployments{
err := opcm.L2Genesis(host, &opcm.L2GenesisInput{
L1Deployments: opcm.L1Deployments{
L1CrossDomainMessengerProxy: thisChainState.L1CrossDomainMessengerProxyAddress,
L1StandardBridgeProxy: thisChainState.L1StandardBridgeProxyAddress,
L1ERC721BridgeProxy: thisChainState.L1ERC721BridgeProxyAddress,
Expand Down
10 changes: 5 additions & 5 deletions op-chain-ops/deployer/pipeline/opchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"math/big"

"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opsm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opcm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/state"
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
"github.com/ethereum-optimism/optimism/op-chain-ops/script"
Expand All @@ -27,7 +27,7 @@ func DeployOPChain(ctx context.Context, env *Env, artifactsFS foundry.StatDirFs,
return fmt.Errorf("failed to get chain intent: %w", err)
}

var dco opsm.DeployOPChainOutput
var dco opcm.DeployOPChainOutput
err = CallScriptBroadcast(
ctx,
CallScriptBroadcastOpts{
Expand All @@ -40,9 +40,9 @@ func DeployOPChain(ctx context.Context, env *Env, artifactsFS foundry.StatDirFs,
Broadcaster: KeyedBroadcaster,
Handler: func(host *script.Host) error {
host.ImportState(st.ImplementationsDeployment.StateDump)
dco, err = opsm.DeployOPChain(
dco, err = opcm.DeployOPChain(
host,
opsm.DeployOPChainInput{
opcm.DeployOPChainInput{
OpChainProxyAdminOwner: thisIntent.Roles.ProxyAdminOwner,
SystemConfigOwner: thisIntent.Roles.SystemConfigOwner,
Batcher: thisIntent.Roles.Batcher,
Expand All @@ -52,7 +52,7 @@ func DeployOPChain(ctx context.Context, env *Env, artifactsFS foundry.StatDirFs,
BasefeeScalar: 1368,
BlobBaseFeeScalar: 801949,
L2ChainId: chainID.Big(),
OpsmProxy: st.ImplementationsDeployment.OpsmProxyAddress,
OpcmProxy: st.ImplementationsDeployment.OpcmProxyAddress,
},
)
return err
Expand Down
8 changes: 4 additions & 4 deletions op-chain-ops/deployer/pipeline/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/ethereum-optimism/optimism/op-chain-ops/script"

"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opsm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opcm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/state"
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
"github.com/ethereum-optimism/optimism/op-node/rollup"
Expand All @@ -24,7 +24,7 @@ func DeploySuperchain(ctx context.Context, env *Env, artifactsFS foundry.StatDir
lgr.Info("deploying superchain")

var dump *foundry.ForgeAllocs
var dso opsm.DeploySuperchainOutput
var dso opcm.DeploySuperchainOutput
var err error
err = CallScriptBroadcast(
ctx,
Expand All @@ -37,9 +37,9 @@ func DeploySuperchain(ctx context.Context, env *Env, artifactsFS foundry.StatDir
Client: env.L1Client,
Broadcaster: KeyedBroadcaster,
Handler: func(host *script.Host) error {
dso, err = opsm.DeploySuperchain(
dso, err = opcm.DeploySuperchain(
host,
opsm.DeploySuperchainInput{
opcm.DeploySuperchainInput{
ProxyAdminOwner: intent.SuperchainRoles.ProxyAdminOwner,
ProtocolVersionsOwner: intent.SuperchainRoles.ProtocolVersionsOwner,
Guardian: intent.SuperchainRoles.Guardian,
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/deployer/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type SuperchainDeployment struct {
}

type ImplementationsDeployment struct {
OpsmProxyAddress common.Address `json:"opsmProxyAddress"`
OpcmProxyAddress common.Address `json:"opcmProxyAddress"`
DelayedWETHImplAddress common.Address `json:"delayedWETHImplAddress"`
OptimismPortalImplAddress common.Address `json:"optimismPortalImplAddress"`
PreimageOracleSingletonAddress common.Address `json:"preimageOracleSingletonAddress"`
Expand Down
4 changes: 2 additions & 2 deletions op-chain-ops/interopgen/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type SuperFaultProofConfig struct {
DisputeGameFinalityDelaySeconds *big.Int
}

type OPSMImplementationsConfig struct {
type OPCMImplementationsConfig struct {
Release string

FaultProof SuperFaultProofConfig
Expand All @@ -51,7 +51,7 @@ type SuperchainConfig struct {

Paused bool

Implementations OPSMImplementationsConfig
Implementations OPCMImplementationsConfig

genesis.SuperchainL1DeployConfig
}
Expand Down
17 changes: 8 additions & 9 deletions op-chain-ops/interopgen/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import (
"fmt"
"math/big"

"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opsm"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"

"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opcm"
"github.com/ethereum-optimism/optimism/op-chain-ops/foundry"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis/beacondeposit"
Expand Down Expand Up @@ -149,7 +148,7 @@ func prepareInitialL1(l1Host *script.Host, cfg *L1Config) (*L1Deployment, error)
func deploySuperchainToL1(l1Host *script.Host, superCfg *SuperchainConfig) (*SuperchainDeployment, error) {
l1Host.SetTxOrigin(superCfg.Deployer)

superDeployment, err := opsm.DeploySuperchain(l1Host, opsm.DeploySuperchainInput{
superDeployment, err := opcm.DeploySuperchain(l1Host, opcm.DeploySuperchainInput{
ProxyAdminOwner: superCfg.ProxyAdminOwner,
ProtocolVersionsOwner: superCfg.ProtocolVersionsOwner,
Guardian: superCfg.SuperchainConfigGuardian,
Expand All @@ -161,7 +160,7 @@ func deploySuperchainToL1(l1Host *script.Host, superCfg *SuperchainConfig) (*Sup
return nil, fmt.Errorf("failed to deploy Superchain contracts: %w", err)
}

implementationsDeployment, err := opsm.DeployImplementations(l1Host, opsm.DeployImplementationsInput{
implementationsDeployment, err := opcm.DeployImplementations(l1Host, opcm.DeployImplementationsInput{
WithdrawalDelaySeconds: superCfg.Implementations.FaultProof.WithdrawalDelaySeconds,
MinProposalSizeBytes: superCfg.Implementations.FaultProof.MinProposalSizeBytes,
ChallengePeriodSeconds: superCfg.Implementations.FaultProof.ChallengePeriodSeconds,
Expand All @@ -172,7 +171,7 @@ func deploySuperchainToL1(l1Host *script.Host, superCfg *SuperchainConfig) (*Sup
ProtocolVersionsProxy: superDeployment.ProtocolVersionsProxy,
SuperchainProxyAdmin: superDeployment.SuperchainProxyAdmin,
UseInterop: superCfg.Implementations.UseInterop,
StandardVersionsToml: opsm.StandardVersionsData,
StandardVersionsToml: opcm.StandardVersionsData,
})
if err != nil {
return nil, fmt.Errorf("failed to deploy Implementations contracts: %w", err)
Expand All @@ -197,7 +196,7 @@ func deployL2ToL1(l1Host *script.Host, superCfg *SuperchainConfig, superDeployme

l1Host.SetTxOrigin(cfg.Deployer)

output, err := opsm.DeployOPChain(l1Host, opsm.DeployOPChainInput{
output, err := opcm.DeployOPChain(l1Host, opcm.DeployOPChainInput{
OpChainProxyAdminOwner: cfg.ProxyAdminOwner,
SystemConfigOwner: cfg.SystemConfigOwner,
Batcher: cfg.BatchSenderAddress,
Expand All @@ -207,7 +206,7 @@ func deployL2ToL1(l1Host *script.Host, superCfg *SuperchainConfig, superDeployme
BasefeeScalar: cfg.GasPriceOracleBaseFeeScalar,
BlobBaseFeeScalar: cfg.GasPriceOracleBlobBaseFeeScalar,
L2ChainId: new(big.Int).SetUint64(cfg.L2ChainID),
OpsmProxy: superDeployment.OpsmProxy,
OpcmProxy: superDeployment.OpcmProxy,
})
if err != nil {
return nil, fmt.Errorf("failed to deploy L2 OP chain: %w", err)
Expand All @@ -220,8 +219,8 @@ func deployL2ToL1(l1Host *script.Host, superCfg *SuperchainConfig, superDeployme
}

func genesisL2(l2Host *script.Host, cfg *L2Config, deployment *L2Deployment) error {
if err := opsm.L2Genesis(l2Host, &opsm.L2GenesisInput{
L1Deployments: opsm.L1Deployments{
if err := opcm.L2Genesis(l2Host, &opcm.L2GenesisInput{
L1Deployments: opcm.L1Deployments{
L1CrossDomainMessengerProxy: deployment.L1CrossDomainMessengerProxy,
L1StandardBridgeProxy: deployment.L1StandardBridgeProxy,
L1ERC721BridgeProxy: deployment.L1ERC721BridgeProxy,
Expand Down
4 changes: 2 additions & 2 deletions op-chain-ops/interopgen/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type L1Deployment struct {
}

type Implementations struct {
OpsmProxy common.Address `json:"OPSMProxy"`
OpsmImpl common.Address `json:"OPSMImpl"`
OpcmProxy common.Address `json:"OPCMProxy"`
OpcmImpl common.Address `json:"OPCMImpl"`
DelayedWETHImpl common.Address `json:"DelayedWETHImpl"`
OptimismPortalImpl common.Address `json:"OptimismPortalImpl"`
PreimageOracleSingleton common.Address `json:"PreimageOracleSingleton"`
Expand Down
6 changes: 3 additions & 3 deletions op-chain-ops/interopgen/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/params"

"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opsm"
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer/opcm"
"github.com/ethereum-optimism/optimism/op-chain-ops/devkeys"
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
)
Expand Down Expand Up @@ -67,7 +67,7 @@ func (r *InteropDevRecipe) Build(addrs devkeys.Addresses) (*WorldConfig, error)
ProxyAdminOwner: superchainProxyAdmin,
ProtocolVersionsOwner: superchainProtocolVersionsOwner,
Deployer: superchainDeployer,
Implementations: OPSMImplementationsConfig{
Implementations: OPCMImplementationsConfig{
Release: "dev",
FaultProof: SuperFaultProofConfig{
WithdrawalDelaySeconds: big.NewInt(604800),
Expand All @@ -77,7 +77,7 @@ func (r *InteropDevRecipe) Build(addrs devkeys.Addresses) (*WorldConfig, error)
DisputeGameFinalityDelaySeconds: big.NewInt(6),
},
UseInterop: true,
StandardVersionsToml: opsm.StandardVersionsData,
StandardVersionsToml: opcm.StandardVersionsData,
},
SuperchainL1DeployConfig: genesis.SuperchainL1DeployConfig{
RequiredProtocolVersion: params.OPStackSupport,
Expand Down
Loading