Documentation ¶
Overview ¶
Package upgrades contains upgrade related tooling.
JSON files that follow the Safe UI batch call format can be generated using this package. A bindings subpackage exists to decouple versioning of bindings with other packages. A just recipe exists to easily regenerate the bindings.
Index ¶
- Variables
- func CheckL1(ctx context.Context, list *superchain.ImplementationList, ...) error
- func CheckVersionedContract(ctx context.Context, contract superchain.VersionedContract, ...) error
- func GetContractVersions(ctx context.Context, addresses *superchain.AddressList, ...) (superchain.ContractVersions, error)
- func L1(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
- func L1CrossDomainMessenger(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
- func L1ERC721Bridge(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
- func L1StandardBridge(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
- func L2OutputOracle(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
- func OptimismMintableERC20Factory(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
- func OptimismPortal(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
- func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationList, ...) error
Constants ¶
This section is empty.
Variables ¶
var ( // The default values for the ResourceConfig, used as part of // an EIP-1559 curve for deposit gas. DefaultResourceConfig = bindings.ResourceMeteringResourceConfig{ MaxResourceLimit: genesis.MaxResourceLimit, ElasticityMultiplier: genesis.ElasticityMultiplier, BaseFeeMaxChangeDenominator: genesis.BaseFeeMaxChangeDenominator, MinimumBaseFee: genesis.MinimumBaseFee, SystemTxMaxGas: genesis.SystemTxMaxGas, MaximumBaseFee: genesis.MaximumBaseFee, } )
Functions ¶
func CheckL1 ¶
func CheckL1(ctx context.Context, list *superchain.ImplementationList, backend bind.ContractBackend) error
CheckL1 will check that the versions of the contracts on L1 match the versions in the superchain registry.
func CheckVersionedContract ¶
func CheckVersionedContract(ctx context.Context, contract superchain.VersionedContract, backend bind.ContractBackend) error
CheckVersionedContract will check that the version of the deployed contract matches the artifact in the superchain registry.
func GetContractVersions ¶
func GetContractVersions(ctx context.Context, addresses *superchain.AddressList, chainConfig *superchain.ChainConfig, backend bind.ContractBackend) (superchain.ContractVersions, error)
getContractVersions will fetch the versions of all of the contracts.
func L1 ¶
func L1(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
L1 will add calls for upgrading each of the L1 contracts.
func L1CrossDomainMessenger ¶
func L1CrossDomainMessenger(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
L1CrossDomainMessenger will add a call to the batch that upgrades the L1CrossDomainMessenger.
func L1ERC721Bridge ¶
func L1ERC721Bridge(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
L1ERC721Bridge will add a call to the batch that upgrades the L1ERC721Bridge.
func L1StandardBridge ¶
func L1StandardBridge(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
L1StandardBridge will add a call to the batch that upgrades the L1StandardBridge.
func L2OutputOracle ¶
func L2OutputOracle(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
L2OutputOracle will add a call to the batch that upgrades the L2OutputOracle.
func OptimismMintableERC20Factory ¶
func OptimismMintableERC20Factory(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
OptimismMintableERC20Factory will add a call to the batch that upgrades the OptimismMintableERC20Factory.
func OptimismPortal ¶
func OptimismPortal(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
OptimismPortal will add a call to the batch that upgrades the OptimismPortal.
func SystemConfig ¶
func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationList, list superchain.AddressList, config *genesis.DeployConfig, chainConfig *superchain.ChainConfig, superchainConfig *superchain.Superchain, backend bind.ContractBackend) error
SystemConfig will add a call to the batch that upgrades the SystemConfig.
Types ¶
This section is empty.