Documentation ¶
Index ¶
- Constants
- Variables
- func AddTestAddrsIncremental(app *UmeeApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress
- func AllCapabilities() []string
- func GenTxValidator(msgs []sdk.Msg) error
- func GenesisStateWithValSet(codec codec.Codec, genesisState map[string]json.RawMessage, ...) (map[string]json.RawMessage, error)
- func GetMaccPerms() map[string][]string
- func IntegrationTestNetworkConfig() network.Config
- func MakeEncodingConfig() testutil.TestEncodingConfig
- func NewTestNetworkFixture() network.TestFixture
- func TestAddr(addr string, bech string) (sdk.AccAddress, error)
- type BankModule
- type CosmosApp
- type CrisisModule
- type EmptyAppOptions
- type GenerateAccountStrategy
- type GenesisState
- type GovModule
- type MintModule
- type SlashingModule
- type StakingModule
- type UmeeApp
- func (app *UmeeApp) AppCodec() codec.Codec
- func (app *UmeeApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *UmeeApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *UmeeApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *UmeeApp) GetBaseApp() *baseapp.BaseApp
- func (app *UmeeApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *UmeeApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *UmeeApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *UmeeApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *UmeeApp) GetStakingKeeper() ibctesting.StakingKeeper
- func (app *UmeeApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *UmeeApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *UmeeApp) GetTxConfig() client.TxConfig
- func (app *UmeeApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *UmeeApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *UmeeApp) LegacyAmino() *codec.LegacyAmino
- func (app *UmeeApp) LoadHeight(height int64) error
- func (app *UmeeApp) ModuleAccountAddrs() map[string]bool
- func (app *UmeeApp) Name() string
- func (app *UmeeApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *UmeeApp) RegisterNodeService(clientCtx client.Context)
- func (app *UmeeApp) RegisterTendermintService(clientCtx client.Context)
- func (app *UmeeApp) RegisterTxService(clientCtx client.Context)
- func (app UmeeApp) RegisterUpgradeHandlers()
- func (app *UmeeApp) SimulationManager() *module.SimulationManager
Constants ¶
const Experimental = false
Experimental is a flag which determines experimental features. It's set via build flag.
Variables ¶
var ( // DefaultNodeHome defines the default home directory for the application daemon. DefaultNodeHome string // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics module.BasicManager )
var DefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: 10000000, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ cmttypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in UmeeApp testing.
var EmptyWasmOpts []wasmkeeper.Option
Functions ¶
func AddTestAddrsIncremental ¶
func AddTestAddrsIncremental(app *UmeeApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress
AddTestAddrsIncremental constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func AllCapabilities ¶ added in v6.2.0
func AllCapabilities() []string
AllCapabilities returns all capabilities available with the current wasmvm See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425
func GenTxValidator ¶
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(codec codec.Codec, genesisState map[string]json.RawMessage, valSet *cmttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) (map[string]json.RawMessage, error)
GenesisStateWithValSet returns a new genesis state with the validator set
func GetMaccPerms ¶
GetMaccPerms returns a deep copy of the module account permissions.
func IntegrationTestNetworkConfig ¶
IntegrationTestNetworkConfig returns a networking configuration used for integration tests using the SDK's in-process network test suite.
func MakeEncodingConfig ¶
func MakeEncodingConfig() testutil.TestEncodingConfig
MakeEncodingConfig returns the application's encoding configuration with all types and interfaces registered.
func NewTestNetworkFixture ¶ added in v6.2.0
func NewTestNetworkFixture() network.TestFixture
Types ¶
type BankModule ¶
type BankModule struct {
bank.AppModuleBasic
}
BankModule defines a custom wrapper around the x/bank module's AppModuleBasic implementation to provide custom default genesis state.
func (BankModule) DefaultGenesis ¶
func (BankModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns custom Umee x/bank module genesis state.
type CosmosApp ¶
type CosmosApp interface { // The assigned name of the app. Name() string // The application legacy Amino codec. // // NOTE: This should be sealed before being returned. LegacyAmino() *codec.LegacyAmino // Application updates every begin block. BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // Application updates every end block. EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock // Application update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain // Loads the app at a given height. LoadHeight(height int64) error // Exports the state of the application for a genesis file. ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (types.ExportedApp, error) // All the registered module account addresses. ModuleAccountAddrs() map[string]bool }
CosmosApp defines the common methods for a Cosmos SDK-based application-specific blockchain.
type CrisisModule ¶
type CrisisModule struct {
crisis.AppModuleBasic
}
CrisisModule defines a custom wrapper around the x/crisis module's AppModuleBasic implementation to provide custom default genesis state.
func (CrisisModule) DefaultGenesis ¶
func (CrisisModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns custom Umee x/crisis module genesis state.
type EmptyAppOptions ¶
type EmptyAppOptions struct{}
func (EmptyAppOptions) Get ¶
func (EmptyAppOptions) Get(string) interface{}
type GenerateAccountStrategy ¶
type GenerateAccountStrategy func(int) []sdk.AccAddress
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.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.
type GovModule ¶
type GovModule struct {
gov.AppModuleBasic
}
GovModule defines a custom wrapper around the x/gov module's AppModuleBasic implementation to provide custom default genesis state.
func (GovModule) DefaultGenesis ¶
func (GovModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns custom Umee x/gov module genesis state.
type MintModule ¶
type MintModule struct {
mint.AppModuleBasic
}
MintModule defines a custom wrapper around the x/mint module's AppModuleBasic implementation to provide custom default genesis state.
func (MintModule) DefaultGenesis ¶
func (MintModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns custom Umee x/mint module genesis state.
type SlashingModule ¶
type SlashingModule struct {
slashing.AppModuleBasic
}
SlashingModule defines a custom wrapper around the x/slashing module's AppModuleBasic implementation to provide custom default genesis state.
func (SlashingModule) DefaultGenesis ¶
func (SlashingModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns custom Umee x/slashing module genesis state.
type StakingModule ¶
type StakingModule struct {
staking.AppModuleBasic
}
StakingModule defines a custom wrapper around the x/staking module's AppModuleBasic implementation to provide custom default genesis state.
func (StakingModule) DefaultGenesis ¶
func (StakingModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns custom Umee x/staking module genesis state.
type UmeeApp ¶
type UmeeApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.BaseKeeper CapabilityKeeper *capabilitykeeper.Keeper ConsensusParamsKeeper consensusparamskeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.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 NFTKeeper nftkeeper.Keeper WasmKeeper wasmkeeper.Keeper IBCTransferKeeper ibctransferkeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly ICAHostKeeper icahostkeeper.Keeper LeverageKeeper leveragekeeper.Keeper IncentiveKeeper incentivekeeper.Keeper OracleKeeper oraclekeeper.Keeper UIbcQuotaKeeperB uibcquotakeeper.Builder UGovKeeperB ugovkeeper.Builder MetokenKeeperB metokenkeeper.Builder // make scoped keepers public for testing purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedWasmKeeper capabilitykeeper.ScopedKeeper // simulation manager to create state StateSimulationManager *module.SimulationManager // contains filtered or unexported fields }
UmeeApp defines the ABCI application for the Umee network as an extension of the Cosmos SDK's BaseApp.
func SetupWithGenesisValSet ¶
func SetupWithGenesisValSet( t *testing.T, valSet *cmttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) *UmeeApp
SetupWithGenesisValSet initializes a new app with a validator set and genesis accounts that also act as delegators. For simplicity, each validator is bonded with a delegation of one consensus engine unit in the default token of the simapp from first genesis account. A Nop logger is set in app.
func (*UmeeApp) AppCodec ¶
AppCodec returns Umee'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 (*UmeeApp) BeginBlocker ¶
func (app *UmeeApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker implements Umee's BeginBlock ABCI method.
func (*UmeeApp) EndBlocker ¶
func (app *UmeeApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker implements Umee's EndBlock ABCI method.
func (*UmeeApp) ExportAppStateAndValidators ¶
func (app *UmeeApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*UmeeApp) GetBaseApp ¶
GetBaseApp is used solely for testing purposes.
func (*UmeeApp) GetIBCKeeper ¶
GetIBCKeeper is used solely for testing purposes.
func (*UmeeApp) GetKey ¶
func (app *UmeeApp) 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 (*UmeeApp) GetMemKey ¶
func (app *UmeeApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*UmeeApp) GetScopedIBCKeeper ¶
func (app *UmeeApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper is used solely for testing purposes.
func (*UmeeApp) GetStakingKeeper ¶
func (app *UmeeApp) GetStakingKeeper() ibctesting.StakingKeeper
GetStakingKeeper is used solely for testing purposes.
func (*UmeeApp) GetSubspace ¶
func (app *UmeeApp) 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 (*UmeeApp) GetTKey ¶
func (app *UmeeApp) 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 (*UmeeApp) GetTxConfig ¶
GetTxConfig is used solely for testing purposes.
func (*UmeeApp) InitChainer ¶
func (app *UmeeApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer implements Umee's InitChain ABCI method.
func (*UmeeApp) InterfaceRegistry ¶
func (app *UmeeApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Umee's InterfaceRegistry.
func (*UmeeApp) LegacyAmino ¶
func (app *UmeeApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Umee'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 (*UmeeApp) LoadHeight ¶
LoadHeight loads a particular height via Umee's BaseApp.
func (*UmeeApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all of Umee's module account addresses.
func (*UmeeApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided
API server.
func (*UmeeApp) RegisterNodeService ¶
func (*UmeeApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*UmeeApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (UmeeApp) RegisterUpgradeHandlers ¶
func (app UmeeApp) RegisterUpgradeHandlers()
RegisterUpgradeHandlersregisters upgrade handlers.
func (*UmeeApp) SimulationManager ¶
func (app *UmeeApp) SimulationManager() *module.SimulationManager
SimulationManager returns the application's SimulationManager.