app

package
v0.15.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: Apache-2.0 Imports: 150 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "fetch"
)
View Source
const CapabilityMemStoreKey = "mem_capability"

MemStoreKey defines the in-memory store key

View Source
const CapabilityStoreKey = "capability"
View Source
const IBCHostStoreKey = "ibc_host"
View Source
const Name = "fetchd"
View Source
const UpgradeNameV053 = "v0.15.0-rc1-gemini"

---- Match this to the plan name that is already stored on disk and halted the chain.

Variables

View Source
var (
	// ProposalsEnabled controls x/wasm Proposals
	// If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals.
	// If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals.
	ProposalsEnabled = "false"
	// EnableSpecificProposals allows to enable only specific x/wasm proposals
	// If set to non-empty string it must be comma-separated list of values that are all a subset
	// of "EnableAllProposals" (takes precedence over ProposalsEnabled)
	// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
	EnableSpecificProposals = ""
)
View Source
var (
	AccountPubKeyPrefix    = AccountAddressPrefix + "pub"
	ValidatorAddressPrefix = AccountAddressPrefix + "valoper"
	ValidatorPubKeyPrefix  = AccountAddressPrefix + "valoperpub"
	ConsNodeAddressPrefix  = AccountAddressPrefix + "valcons"
	ConsNodePubKeyPrefix   = AccountAddressPrefix + "valconspub"
)
View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string
)

Keep your existing wasmd upgrades

Functions

func BlockedAddresses

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func ConvertToProposals

func ConvertToProposals(keys []string) ([]wasmtypes.ProposalType, error)

func GenerateSHA256FromFile added in v0.14.0

func GenerateSHA256FromFile(filePath string) (string, error)

func GenerateSha256Hex added in v0.14.0

func GenerateSha256Hex(dataToVerify []byte) (actualHashHex string)

func GetEnabledProposals

func GetEnabledProposals() []wasmtypes.ProposalType

GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to produce a list of enabled proposals to pass into wasmd app.

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func NewAnteHandler added in v0.10.0

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)

NewAnteHandler constructor

func RegisterSwaggerAPI added in v0.8.4

func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

func SetConfig added in v0.8.0

func SetConfig()

func VerifyAddressPrefix added in v0.14.0

func VerifyAddressPrefix(addr string, expectedPrefix string) error

func VerifySha256 added in v0.14.0

func VerifySha256(dataToVerify []byte, expectedSha256Hex *string) (isVerified bool, actualHashHex string, err error)

Types

type App added in v0.8.0

type App struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.BaseKeeper
	StakingKeeper         *stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            mintkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             govkeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper
	ParamsKeeper          paramskeeper.Keeper
	CircuitKeeper         circuitkeeper.Keeper

	// supplementary keepers
	FeeGrantKeeper     feegrantkeeper.Keeper
	GroupKeeper        groupkeeper.Keeper
	AuthzKeeper        authzkeeper.Keeper
	NFTKeeper          nftkeeper.Keeper
	EpochsKeeper       epochskeeper.Keeper
	ProtocolPoolKeeper protocolpoolkeeper.Keeper

	IBCKeeper           *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	ICAControllerKeeper icacontrollerkeeper.Keeper
	ICAHostKeeper       icahostkeeper.Keeper
	TransferKeeper      ibctransferkeeper.Keeper
	WasmKeeper          wasmkeeper.Keeper

	BasicModuleManager module.BasicManager
	// 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 v0.8.0

func New(
	logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	skipUpgradeHeights map[int64]bool, invCheckPeriod uint,
	appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp),
) *App

New returns a reference to an initialized App. NewSimApp returns a reference to an initialized SimApp.

func (*App) AppCodec added in v0.8.0

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

AppCodec returns 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) AutoCliOpts

func (app *App) AutoCliOpts() autocli.AppOptions

AutoCliOpts returns the autocli options for the app.

func (*App) BeginBlocker added in v0.8.0

func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

BeginBlocker application updates every begin block

func (*App) DefaultGenesis

func (a *App) DefaultGenesis() map[string]json.RawMessage

DefaultGenesis returns a default genesis from the registered AppModuleBasic's.

func (*App) EndBlocker added in v0.8.0

func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

EndBlocker application updates every end block

func (*App) ExportAppStateAndValidators added in v0.8.0

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

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

func (*App) GetKey added in v0.8.0

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

GetKey returns the KVStoreKey for the provided store key.

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

func (*App) GetMemKey added in v0.8.0

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

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*App) GetStoreKeys

func (app *App) GetStoreKeys() []storetypes.StoreKey

GetStoreKeys returns all the stored store keys.

func (*App) GetSubspace added in v0.8.0

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

GetSubspace returns a param subspace for a given module name.

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

func (*App) GetTKey added in v0.8.0

func (app *App) GetTKey(storeKey string) *storetypes.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

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

func (*App) InitChainer added in v0.8.0

func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)

InitChainer application update at chain initialization

func (*App) InterfaceRegistry added in v0.8.0

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

InterfaceRegistry returns InterfaceRegistry

func (*App) LegacyAmino added in v0.8.0

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

LegacyAmino returns SimApp'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) LoadHeight added in v0.8.0

func (app *App) LoadHeight(height int64) error

LoadHeight loads a particular height

func (*App) ModuleAccountAddrs added in v0.8.0

func (app *App) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*App) Name added in v0.8.0

func (app *App) Name() string

Name returns the name of the App

func (*App) PreBlocker

func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates every pre block

func (*App) RegisterAPIRoutes added in v0.8.0

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

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

func (*App) RegisterNodeService

func (app *App) RegisterNodeService(clientCtx client.Context, cfg config.Config)

func (*App) RegisterTendermintService added in v0.8.0

func (app *App) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*App) RegisterTxService added in v0.8.0

func (app *App) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (*App) RegisterUpgradeHandlers added in v0.10.4

func (app *App) RegisterUpgradeHandlers(cfg module.Configurator)

func (*App) SimulationManager

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

SimulationManager implements the SimulationApp interface

func (*App) TxConfig

func (app *App) TxConfig() client.TxConfig

TxConfig returns WasmApp's TxConfig

type GenesisState

type GenesisState map[string]json.RawMessage

The genesis state 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.

type HandlerOptions added in v0.10.0

type HandlerOptions struct {
	ante.HandlerOptions

	IBCKeeper             *keeper.Keeper
	NodeConfig            *wasmTypes.NodeConfig
	WasmKeeper            *wasmkeeper.Keeper
	TXCounterStoreService corestoretypes.KVStoreService
	CircuitKeeper         *circuitkeeper.Keeper
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.

type OrderedMap added in v0.14.0

type OrderedMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewOrderedMap added in v0.14.0

func NewOrderedMap[K comparable, V any]() *OrderedMap[K, V]

NewOrderedMap creates a new OrderedMap empty instance

func NewOrderedMapFromPairs added in v0.14.0

func NewOrderedMapFromPairs[K comparable, V any](pairs []Pair[K, V]) *OrderedMap[K, V]

NewOrderedMapFromPairs creates an OrderedMap from the keys-value pairs

func NewOrderedSet added in v0.14.0

func NewOrderedSet[K comparable](keys []K) *OrderedMap[K, bool]

NewOrderedSet creates an OrderedMap with the keys set to true

func (*OrderedMap[K, V]) Delete added in v0.14.0

func (om *OrderedMap[K, V]) Delete(key K)

Delete removes a key-value pair from the map

func (*OrderedMap[K, V]) Get added in v0.14.0

func (om *OrderedMap[K, V]) Get(key K) (V, bool)

Get retrieves the value associated with the key

func (*OrderedMap[K, V]) GetOrSetDefault added in v0.14.0

func (om *OrderedMap[K, V]) GetOrSetDefault(key K, defaultValue V) (V, bool)

func (*OrderedMap[K, V]) Has added in v0.14.0

func (om *OrderedMap[K, V]) Has(key K) bool

func (*OrderedMap[K, V]) IsSorted added in v0.14.0

func (om *OrderedMap[K, V]) IsSorted() bool

IsSorted returns true *IF* order in the map is *still* sorted after calling `SortKeys(...)` method.

func (*OrderedMap[K, V]) Iterate added in v0.14.0

func (om *OrderedMap[K, V]) Iterate() <-chan Pair[K, V]

Iterate returns a channel that yields key-value pairs in insertion order

func (*OrderedMap[K, V]) Keys added in v0.14.0

func (om *OrderedMap[K, V]) Keys() []K

Keys returns the keys in insertion order

func (*OrderedMap[K, V]) MustGet added in v0.14.0

func (om *OrderedMap[K, V]) MustGet(key K) V

MustGet retrieves the value associated with the key, panics otherwise

func (*OrderedMap[K, V]) PrintOrdered added in v0.14.0

func (om *OrderedMap[K, V]) PrintOrdered()

PrintOrdered prints the map in current order

func (*OrderedMap[K, V]) Set added in v0.14.0

func (om *OrderedMap[K, V]) Set(key K, value V)

Set adds a key-value pair to the map

func (*OrderedMap[K, V]) SetNew added in v0.14.0

func (om *OrderedMap[K, V]) SetNew(key K, value V)

SetNew adds a key-value pair to the map - it must not exist before

func (*OrderedMap[K, V]) SortKeys added in v0.14.0

func (om *OrderedMap[K, V]) SortKeys(lessFunc func(i, j K) bool)

SortKeys sorts the keys in ascending order

type Pair added in v0.14.0

type Pair[K comparable, V any] struct {
	Key   K `json:"key"`
	Value V `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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