upgrades

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fork

type Fork struct {
	// Upgrade version name, for the upgrade handler, e.g. `v2`.
	UpgradeName string
	// UpgradeHeight the upgrade occurs at.
	UpgradeHeight func(chainID string) int64
	// BeginForkLogic runs some custom state transition code at the
	// beginning of a fork.
	BeginForkLogic func(sdk.Context, *Keepers)
}

Fork defines a struct containing the requisite fields for hard-fork upgrade proposal. The one-time code that should be triggered at the start of the Fork, should be defined in `BeginForkLogic`.

type Keepers

type Keepers struct {
	ConsensusParamsKeeper consensusparamskeeper.Keeper
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.Keeper
	PoaKeeper             poakeeper.Keeper
	CrisisKeeper          *crisiskeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	AuthzKeeper           authzkeeper.Keeper
	EvmKeeper             *evmkeeper.Keeper
	FeeMarketKeeper       feemarketkeeper.Keeper
	BridgeKeeper          bridgekeeper.Keeper
	OracleKeeper          oraclekeeper.Keeper
	MarketMapKeeper       marketmapkeeper.Keeper
}

Keepers defines a set of keepers exposed by the app.

type Upgrade

type Upgrade struct {
	// Upgrade version name, for the upgrade handler, e.g. `v2`.
	UpgradeName string
	// CreateUpgradeHandler defines the function that creates an upgrade handler.
	CreateUpgradeHandler func(*module.Manager, module.Configurator, *Keepers) upgradetypes.UpgradeHandler
	// StoreUpgrades, should be used for any new modules introduced,
	// new modules deleted, or store names renamed.
	StoreUpgrades store.StoreUpgrades
}

Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal must have written, in order for the state migration to go smoothly. An upgrade must implement this struct, and then set it in the app.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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