standard

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GasLimit                        uint64 = 60_000_000
	BasefeeScalar                   uint32 = 1368
	BlobBaseFeeScalar               uint32 = 801949
	WithdrawalDelaySeconds          uint64 = 302400
	MinProposalSizeBytes            uint64 = 126000
	ChallengePeriodSeconds          uint64 = 86400
	ProofMaturityDelaySeconds       uint64 = 604800
	DisputeGameFinalityDelaySeconds uint64 = 302400
	MIPSVersion                     uint64 = 1
	DisputeGameType                 uint32 = 1 // PERMISSIONED game type
	DisputeMaxGameDepth             uint64 = 73
	DisputeSplitDepth               uint64 = 30
	DisputeClockExtension           uint64 = 10800
	DisputeMaxClockDuration         uint64 = 302400
	Eip1559DenominatorCanyon        uint64 = 250
	Eip1559Denominator              uint64 = 50
	Eip1559Elasticity               uint64 = 6

	ContractsV160Tag        = "op-contracts/v1.6.0"
	ContractsV180Tag        = "op-contracts/v1.8.0-rc.4"
	ContractsV170Beta1L2Tag = "op-contracts/v1.7.0-beta.1+l2-contracts"
)

Variables

View Source
var DefaultL1ContractsTag = ContractsV180Tag
View Source
var DefaultL2ContractsTag = ContractsV170Beta1L2Tag
View Source
var DisputeAbsolutePrestate = common.HexToHash("0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c")
View Source
var VersionsMainnetData string
View Source
var VersionsSepoliaData string

Functions

func ArtifactsHashForTag added in v1.11.0

func ArtifactsHashForTag(tag string) (common.Hash, error)

func ArtifactsURLForTag

func ArtifactsURLForTag(tag string) (*url.URL, error)

func ChallengerAddressFor added in v1.11.0

func ChallengerAddressFor(chainID uint64) (common.Address, error)

func DefaultHardforkScheduleForTag added in v1.11.0

func DefaultHardforkScheduleForTag(tag string) *genesis.UpgradeScheduleDeployConfig

DefaultHardforkScheduleForTag is used to determine which hardforks should be activated by default given a contract tag. For example, passing in v1.6.0 will return all hardforks up to and including Granite. This allows OP Deployer to set sane defaults for hardforks. This is not an ideal solution, but it will have to work until we get to MCP L2.

func GuardianAddressFor added in v1.11.0

func GuardianAddressFor(chainID uint64) (common.Address, error)

func L1ProxyAdminOwner added in v1.11.0

func L1ProxyAdminOwner(chainID uint64) (common.Address, error)

func L1VersionsDataFor

func L1VersionsDataFor(chainID uint64) (string, error)

func ManagerImplementationAddrFor

func ManagerImplementationAddrFor(chainID uint64, tag string) (common.Address, error)

func ProtocolVersionsOwner added in v1.11.0

func ProtocolVersionsOwner(chainID uint64) (common.Address, error)

func SuperchainFor

func SuperchainFor(chainID uint64) (superchain.Superchain, error)

func SuperchainProxyAdminAddrFor added in v1.11.0

func SuperchainProxyAdminAddrFor(chainID uint64) (common.Address, error)

SuperchainProxyAdminAddrFor returns the address of the Superchain ProxyAdmin for the given chain ID. These have been verified to be the ProxyAdmin addresses on Mainnet and Sepolia. DO NOT MODIFY THIS METHOD WITHOUT CLEARING IT WITH THE EVM SAFETY TEAM.

Types

type L1Versions

type L1Versions map[string]L1VersionsReleases
var L1VersionsMainnet L1Versions
var L1VersionsSepolia L1Versions

func L1VersionsFor

func L1VersionsFor(chainID uint64) (L1Versions, error)

type L1VersionsReleases

type L1VersionsReleases struct {
	OptimismPortal               VersionRelease `toml:"optimism_portal"`
	SystemConfig                 VersionRelease `toml:"system_config"`
	AnchorStateRegistry          VersionRelease `toml:"anchor_state_registry"`
	DelayedWETH                  VersionRelease `toml:"delayed_weth"`
	DisputeGameFactory           VersionRelease `toml:"dispute_game_factory"`
	FaultDisputeGame             VersionRelease `toml:"fault_dispute_game"`
	PermissionedDisputeGame      VersionRelease `toml:"permissioned_dispute_game"`
	MIPS                         VersionRelease `toml:"mips"`
	PreimageOracle               VersionRelease `toml:"preimage_oracle"`
	L1CrossDomainMessenger       VersionRelease `toml:"l1_cross_domain_messenger"`
	L1ERC721Bridge               VersionRelease `toml:"l1_erc721_bridge"`
	L1StandardBridge             VersionRelease `toml:"l1_standard_bridge"`
	OptimismMintableERC20Factory VersionRelease `toml:"optimism_mintable_erc20_factory"`
}

type OPCMBlueprints added in v1.11.0

type OPCMBlueprints struct {
	AddressManager           common.Address
	Proxy                    common.Address
	ProxyAdmin               common.Address
	L1ChugSplashProxy        common.Address
	ResolvedDelegateProxy    common.Address
	AnchorStateRegistry      common.Address
	PermissionedDisputeGame1 common.Address
	PermissionedDisputeGame2 common.Address
}

func OPCMBlueprintsFor added in v1.11.0

func OPCMBlueprintsFor(chainID uint64, version string) (OPCMBlueprints, error)

type OPCMBlueprintsByChain added in v1.11.0

type OPCMBlueprintsByChain struct {
	Mainnet *OPCMBlueprints
	Sepolia *OPCMBlueprints
}

type VersionRelease

type VersionRelease struct {
	Version               string         `toml:"version"`
	ImplementationAddress common.Address `toml:"implementation_address"`
	Address               common.Address `toml:"address"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL