@@ -13,6 +13,7 @@ import (
1313 "github.com/ethereum-optimism/optimism/op-chain-ops/addresses"
1414 "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts"
1515 "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/standard"
16+ "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/version"
1617 "github.com/ethereum-optimism/optimism/op-service/ioutil"
1718 "github.com/ethereum-optimism/optimism/op-service/jsonutil"
1819 "github.com/ethereum-optimism/superchain-registry/validation"
@@ -26,8 +27,10 @@ const (
2627 IntentTypeStandardOverrides IntentType = "standard-overrides"
2728)
2829
29- var emptyAddress common.Address
30- var emptyHash common.Hash
30+ var (
31+ emptyAddress common.Address
32+ emptyHash common.Hash
33+ )
3134
3235type SuperchainProofParams struct {
3336 WithdrawalDelaySeconds uint64 `json:"faultGameWithdrawalDelay" toml:"faultGameWithdrawalDelay"`
@@ -81,6 +84,7 @@ type L1DevGenesisParams struct {
8184
8285type Intent struct {
8386 ConfigType IntentType `json:"configType" toml:"configType"`
87+ OpDeployerVersion string `json:"opDeployerVersion" toml:"opDeployerVersion"`
8488 L1ChainID uint64 `json:"l1ChainID" toml:"l1ChainID"`
8589 OPCMAddress * common.Address `json:"opcmAddress" toml:"opcmAddress"`
8690 SuperchainConfigProxy * common.Address `json:"superchainConfigProxy" toml:"superchainConfigProxy"`
@@ -96,8 +100,10 @@ type Intent struct {
96100 L1DevGenesisParams * L1DevGenesisParams `json:"l1DevGenesisParams"`
97101}
98102
99- var ErrL1ContractsLocatorUndefined = errors .New ("L1ContractsLocator undefined" )
100- var ErrL2ContractsLocatorUndefined = errors .New ("L2ContractsLocator undefined" )
103+ var (
104+ ErrL1ContractsLocatorUndefined = errors .New ("L1ContractsLocator undefined" )
105+ ErrL2ContractsLocatorUndefined = errors .New ("L2ContractsLocator undefined" )
106+ )
101107
102108func (c * Intent ) L1ChainIDBig () * big.Int {
103109 return big .NewInt (int64 (c .L1ChainID ))
@@ -305,6 +311,7 @@ func NewIntent(configType IntentType, l1ChainId uint64, l2ChainIds []common.Hash
305311 return
306312 }
307313 intent .ConfigType = configType
314+ intent .OpDeployerVersion = version .VersionWithMeta
308315 return
309316}
310317
@@ -313,6 +320,7 @@ func NewIntent(configType IntentType, l1ChainId uint64, l2ChainIds []common.Hash
313320func NewIntentCustom (l1ChainId uint64 , l2ChainIds []common.Hash ) (Intent , error ) {
314321 intent := Intent {
315322 ConfigType : IntentTypeCustom ,
323+ OpDeployerVersion : version .VersionWithMeta ,
316324 L1ChainID : l1ChainId ,
317325 L1ContractsLocator : & artifacts.Locator {URL : & url.URL {}},
318326 L2ContractsLocator : & artifacts.Locator {URL : & url.URL {}},
@@ -336,6 +344,7 @@ func NewIntentStandard(l1ChainId uint64, l2ChainIds []common.Hash) (Intent, erro
336344
337345 intent := Intent {
338346 ConfigType : IntentTypeStandard ,
347+ OpDeployerVersion : version .VersionWithMeta ,
339348 L1ChainID : l1ChainId ,
340349 L1ContractsLocator : artifacts .DefaultL1ContractsLocator ,
341350 L2ContractsLocator : artifacts .DefaultL2ContractsLocator ,
0 commit comments