Documentation ¶
Index ¶
- Constants
- Variables
- func BlockedModuleAccountAddrs(modAccAddrs map[string]bool) map[string]bool
- func MakeCodecs() (codec.Codec, *codec.LegacyAmino)
- func MakeEncodingConfig() params.EncodingConfig
- func ModuleAccountAddrs() map[string]bool
- func NewPostHandler(options PostHandlerOptions) (sdk.PostHandler, error)
- func RegisterSwaggerAPI(rtr *mux.Router)
- type EmptyAppOptions
- type GenesisState
- type MilkyWayApp
- func (app *MilkyWayApp) AppCodec() codec.Codec
- func (app *MilkyWayApp) AutoCliOpts() autocli.AppOptions
- func (app *MilkyWayApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *MilkyWayApp) Close() error
- func (app *MilkyWayApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *MilkyWayApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *MilkyWayApp) GetBaseApp() *baseapp.BaseApp
- func (app *MilkyWayApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *MilkyWayApp) GetProviderKeeper() ibcproviderkeeper.Keeper
- func (app *MilkyWayApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *MilkyWayApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *MilkyWayApp) GetTestAccountKeeper() icstest.TestAccountKeeper
- func (app *MilkyWayApp) GetTestBankKeeper() icstest.TestBankKeeper
- func (app *MilkyWayApp) GetTestDistributionKeeper() icstest.TestDistributionKeeper
- func (app *MilkyWayApp) GetTestGovKeeper() *govkeeper.Keeper
- func (app *MilkyWayApp) GetTestSlashingKeeper() icstest.TestSlashingKeeper
- func (app *MilkyWayApp) GetTestStakingKeeper() icstest.TestStakingKeeper
- func (app *MilkyWayApp) GetTxConfig() client.TxConfig
- func (app *MilkyWayApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *MilkyWayApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *MilkyWayApp) LegacyAmino() *codec.LegacyAmino
- func (app *MilkyWayApp) LoadHeight(height int64) error
- func (app *MilkyWayApp) Name() string
- func (app *MilkyWayApp) OnTxFailed(_ sdk.Context, _, _ string, _ []byte, _ []byte)
- func (app *MilkyWayApp) OnTxSucceeded(_ sdk.Context, _, _ string, _ []byte, _ []byte)
- func (app *MilkyWayApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *MilkyWayApp) RegisterExecutorChangePlans() error
- func (app *MilkyWayApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *MilkyWayApp) RegisterTendermintService(clientCtx client.Context)
- func (app *MilkyWayApp) RegisterTxService(clientCtx client.Context)
- func (app *MilkyWayApp) SetOracleClient(oracleClient oracleclient.OracleClient)
- func (app *MilkyWayApp) SimulationManager() *module.SimulationManager
- func (app *MilkyWayApp) StartOracleClient(ctx context.Context) error
- type PostHandlerOptions
- type SimGenesisAccount
Constants ¶
const (
// EnvPrefix is environment variable prefix for the app
EnvPrefix = "MILKYWAY"
)
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string Upgrades []upgrades.Upgrade )
var EmptyWasmOptions []wasmkeeper.Option
EmptyWasmOptions is a stub implementing Wasmkeeper Option
var MaccPerms = map[string][]string{ authtypes.FeeCollectorName: nil, distrtypes.ModuleName: nil, minttypes.ModuleName: {authtypes.Minter}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, govtypes.ModuleName: {authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, ibcfeetypes.ModuleName: nil, providertypes.ConsumerRewardsPool: nil, wasmtypes.ModuleName: {authtypes.Burner}, feemarkettypes.ModuleName: nil, feemarkettypes.FeeCollectorName: nil, oracletypes.ModuleName: nil, rewardstypes.RewardsPoolName: nil, liquidvestingtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, }
Functions ¶
func BlockedModuleAccountAddrs ¶
BlockedModuleAccountAddrs returns all the app's blocked module account addresses.
func MakeCodecs ¶
func MakeCodecs() (codec.Codec, *codec.LegacyAmino)
MakeCodecs constructs the *codec.Codec and *codec.LegacyAmino instances used by MilkyWayApp.
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig.
func ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func NewPostHandler ¶
func NewPostHandler(options PostHandlerOptions) (sdk.PostHandler, error)
NewPostHandler returns a PostHandler chain with the fee deduct decorator.
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
Types ¶
type EmptyAppOptions ¶
type EmptyAppOptions struct{}
EmptyAppOptions is a stub implementing AppOptions
func (EmptyAppOptions) Get ¶
func (ao EmptyAppOptions) Get(_ string) interface{}
Get implements AppOptions
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState - 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.Codec, mbm module.BasicManager) GenesisState
NewDefaultGenesisState generates the default state for the application.
func (GenesisState) AddMarketData ¶
func (genState GenesisState) AddMarketData(cdc codec.JSONCodec) GenesisState
func (GenesisState) ConfigureIBCAllowedClients ¶
func (genState GenesisState) ConfigureIBCAllowedClients(cdc codec.JSONCodec) GenesisState
type MilkyWayApp ¶
type MilkyWayApp struct { *baseapp.BaseApp keepers.AppKeepers ModuleBasics module.BasicManager // contains filtered or unexported fields }
MilkyWayApp 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 NewMilkyWayApp ¶
func NewMilkyWayApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, oracleConfig oracleconfig.AppConfig, appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *MilkyWayApp
NewMilkyWayApp returns a reference to an initialized Initia.
func (*MilkyWayApp) AppCodec ¶
func (app *MilkyWayApp) AppCodec() codec.Codec
AppCodec returns MilkyWay'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 (*MilkyWayApp) AutoCliOpts ¶
func (app *MilkyWayApp) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*MilkyWayApp) BeginBlocker ¶
func (app *MilkyWayApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
BeginBlocker application updates every begin block
func (*MilkyWayApp) Close ¶
func (app *MilkyWayApp) Close() error
Close closes the underlying baseapp, the oracle service, and the prometheus server if required. This method blocks on the closure of both the prometheus server, and the oracle-service
func (*MilkyWayApp) EndBlocker ¶
EndBlocker application updates every end block
func (*MilkyWayApp) ExportAppStateAndValidators ¶
func (app *MilkyWayApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*MilkyWayApp) GetBaseApp ¶
func (app *MilkyWayApp) GetBaseApp() *baseapp.BaseApp
GetBaseApp implements the TestingApp interface.
func (*MilkyWayApp) GetIBCKeeper ¶
func (app *MilkyWayApp) GetIBCKeeper() *ibckeeper.Keeper
GetIBCKeeper implements the TestingApp interface.
func (*MilkyWayApp) GetProviderKeeper ¶
func (app *MilkyWayApp) GetProviderKeeper() ibcproviderkeeper.Keeper
GetProviderKeeper implements the ProviderApp interface.
func (*MilkyWayApp) GetScopedIBCKeeper ¶
func (app *MilkyWayApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*MilkyWayApp) GetStakingKeeper ¶
func (app *MilkyWayApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
GetStakingKeeper implements the TestingApp interface. Needed for ICS.
func (*MilkyWayApp) GetTestAccountKeeper ¶
func (app *MilkyWayApp) GetTestAccountKeeper() icstest.TestAccountKeeper
func (*MilkyWayApp) GetTestBankKeeper ¶
func (app *MilkyWayApp) GetTestBankKeeper() icstest.TestBankKeeper
GetTestBankKeeper implements the ProviderApp interface.
func (*MilkyWayApp) GetTestDistributionKeeper ¶
func (app *MilkyWayApp) GetTestDistributionKeeper() icstest.TestDistributionKeeper
GetTestDistributionKeeper implements the ProviderApp interface.
func (*MilkyWayApp) GetTestGovKeeper ¶
func (app *MilkyWayApp) GetTestGovKeeper() *govkeeper.Keeper
GetTestGovKeeper implements the TestingApp interface.
func (*MilkyWayApp) GetTestSlashingKeeper ¶
func (app *MilkyWayApp) GetTestSlashingKeeper() icstest.TestSlashingKeeper
GetTestSlashingKeeper implements the ProviderApp interface.
func (*MilkyWayApp) GetTestStakingKeeper ¶
func (app *MilkyWayApp) GetTestStakingKeeper() icstest.TestStakingKeeper
GetTestStakingKeeper implements the ProviderApp interface.
func (*MilkyWayApp) GetTxConfig ¶
func (app *MilkyWayApp) GetTxConfig() client.TxConfig
GetTxConfig implements the TestingApp interface.
func (*MilkyWayApp) InitChainer ¶
func (app *MilkyWayApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*MilkyWayApp) InterfaceRegistry ¶
func (app *MilkyWayApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns MilkyWay's InterfaceRegistry
func (*MilkyWayApp) LegacyAmino ¶
func (app *MilkyWayApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns MilkyWayApp'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 (*MilkyWayApp) LoadHeight ¶
func (app *MilkyWayApp) LoadHeight(height int64) error
LoadHeight loads a particular height
func (*MilkyWayApp) OnTxFailed ¶
func (*MilkyWayApp) OnTxSucceeded ¶
func (*MilkyWayApp) RegisterAPIRoutes ¶
func (app *MilkyWayApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*MilkyWayApp) RegisterExecutorChangePlans ¶
func (app *MilkyWayApp) RegisterExecutorChangePlans() error
func (*MilkyWayApp) RegisterNodeService ¶
func (app *MilkyWayApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
RegisterNodeService allows query minimum-gas-prices in app.toml
func (*MilkyWayApp) RegisterTendermintService ¶
func (app *MilkyWayApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*MilkyWayApp) RegisterTxService ¶
func (app *MilkyWayApp) RegisterTxService(clientCtx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
func (*MilkyWayApp) SetOracleClient ¶
func (app *MilkyWayApp) SetOracleClient(oracleClient oracleclient.OracleClient)
SetOracleClient sets the oracle client
func (*MilkyWayApp) SimulationManager ¶
func (app *MilkyWayApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
func (*MilkyWayApp) StartOracleClient ¶
func (app *MilkyWayApp) StartOracleClient(ctx context.Context) error
StartOracleClient starts the oracle client
type PostHandlerOptions ¶
type PostHandlerOptions struct { AccountKeeper feemarketpost.AccountKeeper BankKeeper feemarketpost.BankKeeper FeeMarketKeeper feemarketpost.FeeMarketKeeper }
PostHandlerOptions are the options required for constructing a FeeMarket PostHandler.
type SimGenesisAccount ¶
type SimGenesisAccount struct { *authtypes.BaseAccount // 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 }
SimGenesisAccount defines a type that implements the GenesisAccount interface to be used for simulation accounts in the genesis state.
func (SimGenesisAccount) Validate ¶
func (sga SimGenesisAccount) Validate() error
Validate checks for errors on the vesting and module account parameters