immutables

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentResults

type DeploymentResults map[string]hexutil.Bytes

DeploymentResults represents the output of deploying each of the contracts so that the immutables can be set properly in the bytecode.

func Deploy added in v1.4.0

Deploy will deploy L2 predeploys that include immutables. This is to prevent the need for parsing the solc output to find the correct immutable offsets and splicing in the values. Skip any predeploys that do not have immutables as their bytecode will be directly inserted into the state. This does not currently support recursive structs.

type PredeploysImmutableConfig added in v1.4.0

type PredeploysImmutableConfig struct {
	L2ToL1MessagePasser    struct{}
	DeployerWhitelist      struct{}
	WETH9                  struct{}
	L2CrossDomainMessenger struct{}
	L2StandardBridge       struct{}
	SequencerFeeVault      struct {
		Recipient           common.Address
		MinWithdrawalAmount *big.Int
		WithdrawalNetwork   uint8
	}
	OptimismMintableERC20Factory  struct{}
	L1BlockNumber                 struct{}
	GasPriceOracle                struct{}
	L1Block                       struct{}
	GovernanceToken               struct{}
	LegacyMessagePasser           struct{}
	L2ERC721Bridge                struct{}
	OptimismMintableERC721Factory struct {
		Bridge        common.Address
		RemoteChainId *big.Int
	}
	ProxyAdmin   struct{}
	BaseFeeVault struct {
		Recipient           common.Address
		MinWithdrawalAmount *big.Int
		WithdrawalNetwork   uint8
	}
	L1FeeVault struct {
		Recipient           common.Address
		MinWithdrawalAmount *big.Int
		WithdrawalNetwork   uint8
	}
	SchemaRegistry struct{}
	EAS            struct {
		Name string
	}
	Create2Deployer              struct{}
	MultiCall3                   struct{}
	Safe_v130                    struct{}
	SafeL2_v130                  struct{}
	MultiSendCallOnly_v130       struct{}
	SafeSingletonFactory         struct{}
	DeterministicDeploymentProxy struct{}
	MultiSend_v130               struct{}
	Permit2                      struct{}
	SenderCreator                struct{}
	EntryPoint                   struct{}
}

PredeploysImmutableConfig represents the set of L2 predeploys. It includes all L2 predeploys - not just ones with immutable values. This is to be very explicit about the configuration of the predeploys. It is important that the inner struct fields are in the same order as the constructor arguments in the solidity code.

func (*PredeploysImmutableConfig) Check added in v1.4.0

func (c *PredeploysImmutableConfig) Check() error

Check will ensure that the required fields are set on the config. An error returned by `GetImmutableReferences` means that the solc compiler output for the contract has no immutables in it.

func (*PredeploysImmutableConfig) ForEach added in v1.4.0

func (c *PredeploysImmutableConfig) ForEach(cb func(string, any) error) error

ForEach will iterate over each of the fields in the config and call the callback with the value of the field as well as the field's name.

Jump to

Keyboard shortcuts

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