v1.5.0 Latest Latest

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 158 Imported by: 6






View Source
const (
	AccountAddressPrefix = "kyve"
	Name                 = "kyve"


View Source
var DefaultConsensusParams = &cmtProto.ConsensusParams{
	Block: &cmtProto.BlockParams{
		MaxBytes: 200000,
		MaxGas:   -1,
	Evidence: &cmtProto.EvidenceParams{
		MaxAgeNumBlocks: 302400,
		MaxAgeDuration:  504 * time.Hour,
		MaxBytes:        10000,
	Validator: &cmtProto.ValidatorParams{
		PubKeyTypes: []string{

DefaultConsensusParams ...

View Source
var DefaultNodeHome string

DefaultNodeHome default home directories for the application daemon


func AppConfig added in v1.5.0

func AppConfig() depinject.Config

AppConfig returns the default app config.

func BlockedAddresses added in v1.5.0

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func DefaultGenesisWithValSet

func DefaultGenesisWithValSet(app *App) map[string]json.RawMessage

func GetMaccPerms added in v1.5.0

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

NOTE: This is solely to be used for testing purposes.

func NewAnteHandler

func NewAnteHandler(
	accountKeeper authKeeper.AccountKeeper,
	bankKeeper bankKeeper.Keeper,
	feeGrantKeeper feeGrantKeeper.Keeper,
	globalKeeper globalKeeper.Keeper,
	ibcKeeper *ibcKeeper.Keeper,
	stakingKeeper *stakingKeeper.Keeper,
	sigGasConsumer ante.SignatureVerificationGasConsumer,
	signModeHandler *txsigning.HandlerMap,
) (sdk.AnteHandler, error)

func NewPostHandler

func NewPostHandler(
	bankKeeper bankKeeper.Keeper,
	feeGrantKeeper feeGrantKeeper.Keeper,
	globalKeeper globalKeeper.Keeper,
) (sdk.PostHandler, error)

func RegisterIBC added in v1.5.0

func RegisterIBC(registry cdctypes.InterfaceRegistry) map[string]appmodule.AppModule

Since the IBC modules don't support dependency injection, we need to manually register the modules on the client side. This needs to be removed after IBC supports App Wiring.


type App

type App struct {

	// keepers
	AccountKeeper      authkeeper.AccountKeeper
	BankKeeper         bankkeeper.Keeper
	StakingKeeper      *stakingkeeper.Keeper
	DistributionKeeper distrkeeper.Keeper
	ConsensusKeeper    consensuskeeper.Keeper

	SlashingKeeper slashingkeeper.Keeper
	MintKeeper     mintkeeper.Keeper
	GovKeeper      *govkeeper.Keeper
	CrisisKeeper   *crisiskeeper.Keeper
	UpgradeKeeper  *upgradekeeper.Keeper
	ParamsKeeper   paramskeeper.Keeper
	AuthzKeeper    authzkeeper.Keeper
	EvidenceKeeper evidencekeeper.Keeper
	FeeGrantKeeper feegrantkeeper.Keeper
	GroupKeeper    groupkeeper.Keeper

	// IBC
	IBCKeeper         *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	CapabilityKeeper  *capabilitykeeper.Keeper
	IBCTransferKeeper ibctransferkeeper.Keeper

	// Scoped IBC
	ScopedIBCKeeper         capabilitykeeper.ScopedKeeper
	ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper

	// KYVE
	BundlesKeeper    bundleskeeper.Keeper
	DelegationKeeper delegationkeeper.Keeper
	GlobalKeeper     globalkeeper.Keeper
	PoolKeeper       *poolkeeper.Keeper
	QueryKeeper      querykeeper.Keeper
	StakersKeeper    *stakerskeeper.Keeper
	TeamKeeper       teamkeeper.Keeper
	FundersKeeper    funderskeeper.Keeper
	// contains filtered or unexported fields

App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func New added in v1.5.0

func New(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) (*App, error)

New returns a reference to an initialized App.

func Setup

func Setup() *App

Setup initializes a new App.

func (*App) AppCodec

func (app *App) AppCodec() codec.Codec

AppCodec returns App's app codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*App) ExportAppStateAndValidators

func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (serverTypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*App) GetCapabilityScopedKeeper added in v1.5.0

func (app *App) GetCapabilityScopedKeeper(moduleName string) capabilitykeeper.ScopedKeeper

GetCapabilityScopedKeeper returns the capability scoped keeper.

func (*App) GetIBCKeeper added in v1.5.0

func (app *App) GetIBCKeeper() *ibckeeper.Keeper

GetIBCKeeper returns the IBC keeper.

func (*App) GetKey

func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

func (*App) GetMemKey

func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemoryStoreKey for the provided store key.

func (*App) GetSubspace

func (app *App) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

func (*App) InterfaceRegistry

func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry

InterfaceRegistry returns an InterfaceRegistry

func (*App) LegacyAmino

func (app *App) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns App's amino codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*App) RegisterAPIRoutes

func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*App) SimulationManager

func (app *App) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface.

type EmptyAppOptions added in v1.4.0

type EmptyAppOptions struct{}

func (EmptyAppOptions) Get added in v1.4.0

func (ao EmptyAppOptions) Get(_ string) interface{}

type GenesisAccount added in v1.5.0

type GenesisAccount struct {

	// vesting account fields
	OriginalVesting  sdk.Coins `json:"original_vesting" yaml:"original_vesting"`   // total vesting coins upon initialization
	DelegatedFree    sdk.Coins `json:"delegated_free" yaml:"delegated_free"`       // delegated vested coins at time of delegation
	DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` // delegated vesting coins at time of delegation
	StartTime        int64     `json:"start_time" yaml:"start_time"`               // vesting start time (UNIX Epoch time)
	EndTime          int64     `json:"end_time" yaml:"end_time"`                   // vesting end time (UNIX Epoch time)

	// module account fields
	ModuleName        string   `json:"module_name" yaml:"module_name"`               // name of the module account
	ModulePermissions []string `json:"module_permissions" yaml:"module_permissions"` // permissions of module account

GenesisAccount defines a type that implements the GenesisAccount interface to be used for simulation accounts in the genesis state.

func (GenesisAccount) Validate added in v1.5.0

func (sga GenesisAccount) Validate() error

Validate checks for errors on the vesting and module account parameters

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

Jump to

Keyboard shortcuts

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