Documentation ¶
Index ¶
- Variables
- func GetMaccPerms() map[string][]string
- func MakeCodecs() (codec.Codec, *codec.LegacyAmino)
- func MakeEncodingConfig() params.EncodingConfig
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- type GenesisState
- type SimGenesisAccount
- type SommelierApp
- func (app *SommelierApp) AppCodec() codec.Codec
- func (app *SommelierApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *SommelierApp) BlockedAddrs() map[string]bool
- func (app *SommelierApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *SommelierApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *SommelierApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *SommelierApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *SommelierApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *SommelierApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *SommelierApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *SommelierApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *SommelierApp) LegacyAmino() *codec.LegacyAmino
- func (app *SommelierApp) LoadHeight(height int64) error
- func (app *SommelierApp) ModuleAccountAddressesToNames(moduleAccounts []string) map[string]string
- func (app *SommelierApp) ModuleAccountAddrs() map[string]bool
- func (app *SommelierApp) Name() string
- func (app *SommelierApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *SommelierApp) RegisterTendermintService(clientCtx client.Context)
- func (app *SommelierApp) RegisterTxService(clientCtx client.Context)
- func (app *SommelierApp) SimulationManager() *module.SimulationManager
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultNodeHome default home directories 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.NewBasicManager( auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, gravityclient.ProposalHandler, corkclient.AddProposalHandler, corkclient.RemoveProposalHandler, axelarcorkclient.AddProposalHandler, axelarcorkclient.RemoveProposalHandler, axelarcorkclient.AddChainConfigurationHandler, axelarcorkclient.RemoveChainConfigurationHandler, axelarcorkclient.ScheduledCorkProposalHandler, axelarcorkclient.CommunityPoolEthereumSpendProposalHandler, axelarcorkclient.UpgradeAxelarProxyContractHandler, axelarcorkclient.CancelAxelarProxyContractUpgradeHandler, corkclient.ScheduledCorkProposalHandler, auctionclient.SetProposalHandler, pubsubclient.AddPublisherProposalHandler, pubsubclient.RemovePublisherProposalHandler, pubsubclient.AddDefaultSubscriptionProposalHandler, pubsubclient.RemoveDefaultSubscriptionProposalHandler, }, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, ica.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, vesting.AppModuleBasic{}, authzmodule.AppModuleBasic{}, gravity.AppModuleBasic{}, cork.AppModuleBasic{}, axelarcork.AppModuleBasic{}, cellarfees.AppModuleBasic{}, incentives.AppModuleBasic{}, auction.AppModuleBasic{}, pubsub.AppModuleBasic{}, ) )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func MakeCodecs ¶
func MakeCodecs() (codec.Codec, *codec.LegacyAmino)
MakeCodecs constructs the *std.Codec and *codec.LegacyAmino instances used by simapp. It is useful for tests and clients who do not want to construct the full simapp
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing. This function should be used only in tests or when creating a new app instance (NewApp*()). App user shouldn't create new codecs - use the app.AppCodec instead. [DEPRECATED]
Types ¶
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() GenesisState
NewDefaultGenesisState generates the default state for the application.
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
type SommelierApp ¶
type SommelierApp struct { *baseapp.BaseApp // SDK keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.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 IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly ICAHostKeeper icahostkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper GravityKeeper gravitykeeper.Keeper AuthzKeeper authzkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper // Sommelier keepers CorkKeeper corkkeeper.Keeper AxelarCorkKeeper axelarcorkkeeper.Keeper CellarFeesKeeper cellarfeeskeeper.Keeper IncentivesKeeper incentiveskeeper.Keeper AuctionKeeper auctionkeeper.Keeper PubsubKeeper pubsubkeeper.Keeper // make capability scoped keepers public for test purposes (IBC only) ScopedAxelarCorkKeeper capabilitykeeper.ScopedKeeper ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper // contains filtered or unexported fields }
SommelierApp 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 NewSommelierApp ¶
func NewSommelierApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig appParams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *SommelierApp
NewSommelierApp returns a reference to an initialized Sommelier.
func Setup ¶
func Setup(isCheckTx bool) *SommelierApp
Setup initializes a new SimApp. A Nop logger is set in SimApp.
func (*SommelierApp) AppCodec ¶
func (app *SommelierApp) AppCodec() codec.Codec
AppCodec returns Sommelier'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 (*SommelierApp) BeginBlocker ¶
func (app *SommelierApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*SommelierApp) BlockedAddrs ¶
func (app *SommelierApp) BlockedAddrs() map[string]bool
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*SommelierApp) EndBlocker ¶
func (app *SommelierApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*SommelierApp) ExportAppStateAndValidators ¶
func (app *SommelierApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*SommelierApp) GetKey ¶
func (app *SommelierApp) 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 (*SommelierApp) GetMemKey ¶
func (app *SommelierApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*SommelierApp) GetSubspace ¶
func (app *SommelierApp) 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 (*SommelierApp) GetTKey ¶
func (app *SommelierApp) 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 (*SommelierApp) InitChainer ¶
func (app *SommelierApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*SommelierApp) InterfaceRegistry ¶
func (app *SommelierApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Sommelier's InterfaceRegistry
func (*SommelierApp) LegacyAmino ¶
func (app *SommelierApp) 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 (*SommelierApp) LoadHeight ¶
func (app *SommelierApp) LoadHeight(height int64) error
LoadHeight loads a particular height
func (*SommelierApp) ModuleAccountAddressesToNames ¶
func (app *SommelierApp) ModuleAccountAddressesToNames(moduleAccounts []string) map[string]string
ModuleAccountNames returns a map of module account address to module name
func (*SommelierApp) ModuleAccountAddrs ¶
func (app *SommelierApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*SommelierApp) RegisterAPIRoutes ¶
func (app *SommelierApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*SommelierApp) RegisterTendermintService ¶
func (app *SommelierApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the application.RegisterTendermintService method
func (*SommelierApp) RegisterTxService ¶
func (app *SommelierApp) RegisterTxService(clientCtx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
func (*SommelierApp) SimulationManager ¶
func (app *SommelierApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface