-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathcontracts.go
More file actions
95 lines (85 loc) · 3.97 KB
/
contracts.go
File metadata and controls
95 lines (85 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package addresses
import "github.com/ethereum/go-ethereum/common"
// This file contains the standard structs and contract names for all L1 contracts involved in an OpChain
// - structs are namespaced by deployment contract bundle (Superchain, Implementations and OpChain), then
// by feature set (e.g. FaultProofs has its own set of contracts nested within the OpChainContracts struct)
// - all contract field names are suffixed with "Impl" or "Proxy" to indicate the type of contract
type L1Contracts struct {
SuperchainContracts
ImplementationsContracts
OpChainContracts
}
// SuperchainContracts struct contains all the superchain-level contracts
// - these contracts are shared by all OpChains that are members of the same superchain
type SuperchainContracts struct {
SuperchainProxyAdminImpl common.Address
SuperchainConfigProxy common.Address
SuperchainConfigImpl common.Address
ProtocolVersionsProxy common.Address
ProtocolVersionsImpl common.Address
}
// ImplementationsContracts struct contains all the implementation contracts for a superchain
// - these contracts are shared by all OpChains that are members of the same superchain
// - these contracts are not upgradable, but can be replaced by new contract releases/deployments
type ImplementationsContracts struct {
OpcmInteropMigratorImpl common.Address
OpcmStandardValidatorImpl common.Address
OpcmUtilsImpl common.Address
OpcmMigratorImpl common.Address
OpcmV2Impl common.Address
OpcmContainerImpl common.Address
DelayedWethImpl common.Address
OptimismPortalImpl common.Address
EthLockboxImpl common.Address
PreimageOracleImpl common.Address
MipsImpl common.Address
SystemConfigImpl common.Address
L1CrossDomainMessengerImpl common.Address
L1Erc721BridgeImpl common.Address
L1StandardBridgeImpl common.Address
OptimismMintableErc20FactoryImpl common.Address
DisputeGameFactoryImpl common.Address
AnchorStateRegistryImpl common.Address
FaultDisputeGameImpl common.Address
PermissionedDisputeGameImpl common.Address
StorageSetterImpl common.Address
}
// OpChainContracts struct contains all the contracts for a specific L2 OpChain
// - these contracts are not shared by any other OpChains
// - these contracts are mostly proxies, which point to ImplementationContracts
// - feature sets are represented by nested structs, which are inlined so that individual contracts
// can be accessed directly on the OpChainContracts struct (i.e. no leaky abstraction)
type OpChainContracts struct {
OpChainCoreContracts
OpChainFaultProofsContracts
OpChainAltDAContracts
OpChainLegacyContracts
}
// OpChainCoreContracts struct contains contracts that all L2s need, regardless of feature set
type OpChainCoreContracts struct {
OpChainProxyAdminImpl common.Address
OptimismPortalProxy common.Address
AddressManagerImpl common.Address
L1Erc721BridgeProxy common.Address
SystemConfigProxy common.Address
OptimismMintableErc20FactoryProxy common.Address
L1StandardBridgeProxy common.Address
L1CrossDomainMessengerProxy common.Address
EthLockboxProxy common.Address
}
type OpChainFaultProofsContracts struct {
DisputeGameFactoryProxy common.Address
AnchorStateRegistryProxy common.Address
FaultDisputeGameImpl common.Address
FaultDisputeGameCannonKonaImpl common.Address
PermissionedDisputeGameImpl common.Address
DelayedWethPermissionedGameProxy common.Address
DelayedWethPermissionlessGameProxy common.Address
}
type OpChainAltDAContracts struct {
AltDAChallengeProxy common.Address
AltDAChallengeImpl common.Address
}
type OpChainLegacyContracts struct {
L2OutputOracleProxy common.Address
}