Documentation ¶
Index ¶
- Constants
- Variables
- func AppStateFn(cdc codec.JSONMarshaler, simManager *module.SimulationManager) simtypes.AppStateFn
- func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONMarshaler, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account)
- func AppStateRandomizedFn(simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONMarshaler, ...) (json.RawMessage, []simtypes.Account)
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- func NewConfig() network.Config
- func QueryBalanceExec(clientCtx client.Context, address string, denom string, extraArgs ...string) (testutil.BufferWriter, error)
- func SetConfig()
- func SimAppConstructor(val network.Validator) servertypes.Application
- type Bitsong
- func (app *Bitsong) AppCodec() codec.Marshaler
- func (app *Bitsong) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Bitsong) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *Bitsong) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *Bitsong) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *Bitsong) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *Bitsong) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Bitsong) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *Bitsong) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Bitsong) InterfaceRegistry() types.InterfaceRegistry
- func (app *Bitsong) LegacyAmino() *codec.LegacyAmino
- func (app *Bitsong) LoadHeight(height int64) error
- func (app *Bitsong) ModuleAccountAddrs() map[string]bool
- func (app *Bitsong) Name() string
- func (app *Bitsong) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Bitsong) RegisterTendermintService(clientCtx client.Context)
- func (app *Bitsong) RegisterTxService(clientCtx client.Context)
- func (app *Bitsong) SimulationManager() *module.SimulationManager
- type CosmosApp
- type GenesisState
Constants ¶
const (
AccountAddressPrefix = "bitsong"
)
const Name = "bitsongd"
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(getGovProposalHandlers()...), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, fantoken.AppModuleBasic{}, nft.AppModuleBasic{}, ) )
var ( AccountPubKeyPrefix = AccountAddressPrefix + "pub" ValidatorAddressPrefix = AccountAddressPrefix + "valoper" ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" )
Functions ¶
func AppStateFn ¶
func AppStateFn(cdc codec.JSONMarshaler, simManager *module.SimulationManager) simtypes.AppStateFn
AppStateFn returns the initial application state using a genesis or the simulation parameters. It panics if the user provides files for both of them. If a file is not given for the genesis or the sim params, it creates a randomized one.
func AppStateFromGenesisFileFn ¶
func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONMarshaler, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account)
AppStateFromGenesisFileFn util function to generate the genesis AppState from a genesis.json file.
func AppStateRandomizedFn ¶
func AppStateRandomizedFn( simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONMarshaler, accs []simtypes.Account, genesisTimestamp time.Time, appParams simtypes.AppParams, ) (json.RawMessage, []simtypes.Account)
AppStateRandomizedFn creates calls each module's GenesisState generator function and creates the simulation params
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func QueryBalanceExec ¶
func SimAppConstructor ¶
func SimAppConstructor(val network.Validator) servertypes.Application
Types ¶
type Bitsong ¶
type Bitsong struct { *baseapp.BaseApp // 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 EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper FanTokenKeeper fantokenkeeper.Keeper NFTKeeper nftkeeper.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 ¶
func New( 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), ) *Bitsong
New returns a reference to an initialized Gaia. NewSimApp returns a reference to an initialized SimApp.
func (*Bitsong) AppCodec ¶
AppCodec returns Gaia'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 (*Bitsong) BeginBlocker ¶
func (app *Bitsong) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*Bitsong) EndBlocker ¶
func (app *Bitsong) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*Bitsong) ExportAppStateAndValidators ¶
func (app *Bitsong) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Bitsong) GetKey ¶
func (app *Bitsong) GetKey(storeKey string) *sdk.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*Bitsong) GetMemKey ¶
func (app *Bitsong) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*Bitsong) GetSubspace ¶
func (app *Bitsong) 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 (*Bitsong) GetTKey ¶
func (app *Bitsong) GetTKey(storeKey string) *sdk.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*Bitsong) InitChainer ¶
func (app *Bitsong) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*Bitsong) InterfaceRegistry ¶
func (app *Bitsong) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Gaia's InterfaceRegistry
func (*Bitsong) LegacyAmino ¶
func (app *Bitsong) 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 (*Bitsong) LoadHeight ¶
LoadHeight loads a particular height
func (*Bitsong) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Bitsong) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Bitsong) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*Bitsong) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*Bitsong) SimulationManager ¶
func (app *Bitsong) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type CosmosApp ¶
type CosmosApp interface { // Name The assigned name of the app. Name() string // LegacyAmino The application types codec. // NOTE: This shoult be sealed before being returned. LegacyAmino() *codec.LegacyAmino // BeginBlocker Application updates every begin block. BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // EndBlocker Application updates every end block. EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock // InitChainer Application update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain // LoadHeight Loads the app at a given height. LoadHeight(height int64) error // ExportAppStateAndValidators Exports the state of the application for a genesis file. ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (types.ExportedApp, error) // ModuleAccountAddrs All the registered module account addreses. ModuleAccountAddrs() map[string]bool }
CosmosApp implements the common methods for a Cosmos SDK-based application specific blockchain.
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.JSONMarshaler) GenesisState
NewDefaultGenesisState generates the default state for the application.