Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentResults ¶
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.3.0
func Deploy(config *PredeploysImmutableConfig) (DeploymentResults, error)
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.3.0
type PredeploysImmutableConfig struct { L2ToL1MessagePasser struct{} // [Kroma: START] // DeployerWhitelist struct{} // [Kroma: END] WETH9 struct{} L2CrossDomainMessenger struct { OtherMessenger common.Address } L2StandardBridge struct { OtherBridge common.Address } // [Kroma: START] // SequencerFeeVault struct { // Recipient common.Address // MinWithdrawalAmount *big.Int // WithdrawalNetwork uint8 // } // [Kroma: END] KromaMintableERC20Factory struct { Bridge common.Address } L1BlockNumber struct{} GasPriceOracle struct{} L1Block struct{} GovernanceToken struct{} // [Kroma: START] // LegacyMessagePasser struct{} // [Kroma: END] L2ERC721Bridge struct { OtherBridge common.Address Messenger common.Address } KromaMintableERC721Factory struct { Bridge common.Address RemoteChainId *big.Int } ProxyAdmin struct{} ProtocolVault struct { Recipient common.Address } L1FeeVault struct { Recipient common.Address } // [Kroma: START] // SchemaRegistry struct{} // EAS struct { // Name string // } // [Kroma: END] Create2Deployer struct{} // [Kroma: START] ValidatorRewardVault struct { ValidatorPoolAddress common.Address RewardDivider *big.Int } }
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.3.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.