types

package
v0.23.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyFieldName = errors.New("empty field name")
)

Functions

func FindStructField added in v0.24.0

func FindStructField[C any](obj interface{}, fieldName string) (C, error)

FindStructField if an interface is either a struct or a pointer to a struct and has the defined member field, if error is nil, the given fieldName exists and is accessible with reflect.

func GetForksList

func GetForksList() map[int64]IFork

func GetUpgradesList

func GetUpgradesList() map[string]UpgradeInitFn

func RegisterFork

func RegisterFork(height int64, fork IFork)

func RegisterUpgrade

func RegisterUpgrade(name string, fn UpgradeInitFn)

Types

type App added in v0.24.0

type App struct {
	Keepers      AppKeepers
	Configurator module.Configurator
	MM           *module.Manager
}

type AppKeepers added in v0.24.0

type AppKeepers struct {
	Cosmos struct {
		Acct                 authkeeper.AccountKeeper
		Authz                authzkeeper.Keeper
		FeeGrant             feegrantkeeper.Keeper
		Bank                 bankkeeper.Keeper
		Cap                  *capabilitykeeper.Keeper
		Staking              stakingkeeper.Keeper
		Slashing             slashingkeeper.Keeper
		Mint                 mintkeeper.Keeper
		Distr                distrkeeper.Keeper
		Gov                  govkeeper.Keeper
		Crisis               crisiskeeper.Keeper
		Upgrade              upgradekeeper.Keeper
		Params               paramskeeper.Keeper
		IBC                  *ibckeeper.Keeper
		Evidence             evidencekeeper.Keeper
		Transfer             ibctransferkeeper.Keeper
		ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
		ScopedTransferKeeper capabilitykeeper.ScopedKeeper
	}

	Akash struct {
		Escrow     escrowkeeper.Keeper
		Deployment dkeeper.IKeeper
		Market     mkeeper.IKeeper
		Provider   pkeeper.IKeeper
		Audit      audit.Keeper
		Cert       cert.Keeper
		Inflation  inflation.Keeper
		Staking    astakingkeeper.IKeeper
		Gov        agovkeeper.IKeeper
	}
}

type IFork

type IFork interface {
	Name() string
	BeginForkLogic(sdk.Context, *AppKeepers)
}

IFork defines an interface for a non-software upgrade proposal Hard Fork at a given height to implement. There is one time code that can be added for the start of the Fork, in `BeginForkLogic`. Any other change in the code should be height-gated, if the goal is to have old and new binaries to be compatible prior to the upgrade height.

type IUpgrade

type IUpgrade interface {
	StoreLoader() *storetypes.StoreUpgrades
	UpgradeHandler() upgradetypes.UpgradeHandler
}

IUpgrade defines an interface to run a SoftwareUpgradeProposal

type UpgradeInitFn

type UpgradeInitFn func(log.Logger, *App) (IUpgrade, error)

Jump to

Keyboard shortcuts

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