Documentation ¶
Index ¶
- Constants
- Variables
- func AddressToCodeNamespace(addr common.Address) (common.Address, error)
- func BuildSpecular(ctx context.Context, predeploy PredeployConfigs) (DeploymentResults, DeploymentResults, error)
- func IsL2Predeploy(addr common.Address) bool
- type DeploymentResult
- type DeploymentResults
- type PredeployConfig
- type PredeployConfigs
- type StorageConfig
Constants ¶
View Source
const ( UUPSPlaceholder = "0x2A00000000000000000000000000000000000000" L1Oracle = "0x2A00000000000000000000000000000000000010" L2Portal = "0x2A00000000000000000000000000000000000011" L2StandardBridge = "0x2A00000000000000000000000000000000000012" L1FeeVault = "0x2A00000000000000000000000000000000000020" L2BaseFeeVault = "0x2A00000000000000000000000000000000000021" MintableERC20Factory = "0x2A000000000000000000000000000000000000f0" )
TODO: This list should be generated from a configuration source
Variables ¶
View Source
var ( UUPSPlaceholderAddr = common.HexToAddress(UUPSPlaceholder) L1OracleAddr = common.HexToAddress(L1Oracle) L2PortalAddr = common.HexToAddress(L2Portal) L2StandardBridgeAddr = common.HexToAddress(L2StandardBridge) L1FeeVaultAddr = common.HexToAddress(L1FeeVault) L2BaseFeeVaultAddr = common.HexToAddress(L2BaseFeeVault) MintableERC20FactoryAddr = common.HexToAddress(MintableERC20Factory) Predeploys = make(map[string]*common.Address) )
View Source
var ( // bigL2PredeployNamespace represents the predeploy namespace as a big.Int BigL2PredeployNamespace = new(big.Int).SetBytes(l2PredeployNamespace.Bytes()) // implementationSlot represents the EIP 1967 implementation storage slot ImplementationSlot = common.HexToHash("0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc") // adminSlot represents the EIP 1967 admin storage slot AdminSlot = common.HexToHash("0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103") // predeployProxyCount represents the number of predeploy proxies in the namespace PredeployProxyCount uint64 = 2048 )
Functions ¶
func AddressToCodeNamespace ¶
AddressToCodeNamespace takes a predeploy address and computes the implementation address that the implementation should be deployed at
func BuildSpecular ¶
func BuildSpecular(ctx context.Context, predeploy PredeployConfigs) (DeploymentResults, DeploymentResults, error)
BuildSpecular will deploy the L2 predeploys so that their immutables are set correctly.
func IsL2Predeploy ¶
Types ¶
type DeploymentResult ¶
type DeploymentResults ¶
type DeploymentResults map[string]DeploymentResult
DeploymentResults represents the output of deploying each of the contracts so that the immutables can be set properly in the bytecode.
func BuildPredeployImpls ¶
func BuildPredeployImpls(ctx context.Context, backend *backends.SimulatedBackend, predeploys PredeployConfigs) (DeploymentResults, error)
func BuildPredeployProxies ¶
func BuildPredeployProxies(ctx context.Context, backend *backends.SimulatedBackend, predeploys PredeployConfigs, implDeploymentResults DeploymentResults) (DeploymentResults, error)
type PredeployConfig ¶
type PredeployConfigs ¶
type PredeployConfigs map[string]PredeployConfig
func (PredeployConfigs) Check ¶
func (p PredeployConfigs) Check() error
type StorageConfig ¶
Click to show internal directories.
Click to hide internal directories.