Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertRouterParameters ¶
func ConvertRouterParameters(localParams RouterParameters) bindings.RouterParameters
ConvertRouterParameters converts local RouterParameters to bindings RouterParameters.
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 ¶
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 ¶
type PredeploysImmutableConfig struct { LegacyERC20NativeToken struct { RemoteToken common.Address Bridge common.Address Decimals uint8 } L2ToL1MessagePasser struct{} DeployerWhitelist struct{} WNativeToken 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 } ETH struct { RemoteToken common.Address Bridge common.Address Decimals uint8 } L2UsdcBridge struct{} SignatureChecker struct{} MasterMinter struct { MinterManager common.Address } FiatTokenV2_2 struct{} QuoterV2 struct { Factory common.Address WETH9 common.Address } SwapRouter02 struct { FactoryV2 common.Address FactoryV3 common.Address PositionManager common.Address WETH9 common.Address } UniswapV3Factory struct{} NFTDescriptor struct{} NonfungiblePositionManager struct { Factory common.Address WETH9 common.Address TokenDescriptor_ common.Address } NonfungibleTokenPositionDescriptor struct { WETH9 common.Address NativeCurrencyLabelBytes [32]byte } TickLens struct{} UniswapInterfaceMulticall struct{} UniversalRouter struct { Permit2 common.Address Weth9 common.Address SeaportV15 common.Address SeaportV14 common.Address OpenseaConduit common.Address NftxZap common.Address X2y2 common.Address Foundation common.Address Sudoswap common.Address ElementMarket common.Address Nft20Zap common.Address Cryptopunks common.Address LooksRareV2 common.Address RouterRewardsDistributor common.Address LooksRareRewardsDistributor common.Address LooksRareToken common.Address V2Factory common.Address V3Factory common.Address PairInitCodeHash [32]byte PoolInitCodeHash [32]byte } UnsupportedProtocol struct{} 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 ¶
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.
type RouterParameters ¶
type RouterParameters struct { Permit2 common.Address Weth9 common.Address SeaportV15 common.Address SeaportV14 common.Address OpenseaConduit common.Address NftxZap common.Address X2y2 common.Address Foundation common.Address Sudoswap common.Address ElementMarket common.Address Nft20Zap common.Address Cryptopunks common.Address LooksRareV2 common.Address RouterRewardsDistributor common.Address LooksRareRewardsDistributor common.Address LooksRareToken common.Address V2Factory common.Address V3Factory common.Address PairInitCodeHash [32]byte PoolInitCodeHash [32]byte }