Documentation
¶
Index ¶
- Constants
- Variables
- func ModuleAccountAddrs() map[string]bool
- func ModuleAccountPerms() map[string][]string
- func ModuleBasics() module.BasicManager
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func OrderEndBlockers(_ []string) []string
- func OrderInitGenesis(_ []string) []string
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- type AkashApp
- func (app *AkashApp) AppCodec() codec.Codec
- func (app *AkashApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *AkashApp) BlockedAddrs() map[string]bool
- func (app *AkashApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *AkashApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *AkashApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *AkashApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *AkashApp) InterfaceRegistry() codectypes.InterfaceRegistry
- func (app *AkashApp) LegacyAmino() *codec.LegacyAmino
- func (app *AkashApp) LoadHeight(height int64) error
- func (app *AkashApp) ModuleAccountAddrs() map[string]bool
- func (app *AkashApp) Name() string
- func (app *AkashApp) NewProposalContext(header tmproto.Header) sdk.Context
- func (app *AkashApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *AkashApp) Precommitter(ctx sdk.Context)
- func (app *AkashApp) PrepareCheckStater(ctx sdk.Context)
- func (app *AkashApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *AkashApp) RegisterNodeService(cctx client.Context, cfg config.Config)
- func (app *AkashApp) RegisterTendermintService(cctx client.Context)
- func (app *AkashApp) RegisterTxService(clientCtx client.Context)
- func (app *AkashApp) SimulationManager() *module.SimulationManager
- func (app *AkashApp) TxConfig() client.TxConfig
- type GenesisState
- type HandlerOptions
- type SetupAppOption
- type SetupGenesisFn
- type TestnetAccount
- type TestnetConfig
- type TestnetDelegation
- type TestnetGov
- type TestnetUpgrade
- type TestnetValidator
Constants ¶
const (
AppName = "akash"
)
Variables ¶
var (
DefaultHome = os.ExpandEnv("$HOME/.akash")
)
Functions ¶
func ModuleAccountAddrs ¶ added in v1.0.0
func ModuleAccountPerms ¶ added in v1.0.0
func ModuleBasics ¶ added in v1.0.0
func ModuleBasics() module.BasicManager
ModuleBasics returns all app modules basics
func NewAnteHandler ¶ added in v1.0.0
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
func OrderEndBlockers ¶ added in v1.0.0
OrderEndBlockers returns EndBlockers (crisis, govtypes, staking) with no relative order.
func OrderInitGenesis ¶ added in v1.0.0
OrderInitGenesis returns module names in order for init genesis calls. NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts. NOTE: Capability module must occur first so that it can initialize any capabilities so that other modules that want to create or claim capabilities afterwards in InitChain can do so safely.
Types ¶
type AkashApp ¶ added in v1.0.0
AkashApp extends ABCI application
func InitAkashAppForTestnet ¶ added in v1.0.0
func InitAkashAppForTestnet( app *AkashApp, db dbm.DB, tcfg TestnetConfig, ) *AkashApp
InitAkashAppForTestnet is broken down into two sections: Required Changes: Changes that, if not made, will cause the testnet to halt or panic Optional Changes: Changes to customize the testnet to one's liking (lower vote times, fund accounts, etc)
func NewApp ¶ added in v1.0.0
func NewApp( logger log.Logger, db dbm.DB, tio io.Writer, loadLatest bool, invCheckPeriod uint, skipUpgradeHeights map[int64]bool, encodingConfig sdkutil.EncodingConfig, appOpts servertypes.AppOptions, options ...func(*baseapp.BaseApp), ) *AkashApp
NewApp creates and returns a new Akash App.
func Setup ¶ added in v1.0.0
func Setup(opts ...SetupAppOption) *AkashApp
Setup initializes a new AkashApp. A Nop logger is set in AkashApp.
func (*AkashApp) BeginBlocker ¶ added in v1.0.0
BeginBlocker is a function in which application updates every begin block
func (*AkashApp) BlockedAddrs ¶ added in v1.0.0
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*AkashApp) EndBlocker ¶ added in v1.0.0
EndBlocker is a function in which application updates every end block
func (*AkashApp) ExportAppStateAndValidators ¶ added in v1.0.0
func (app *AkashApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*AkashApp) GetSubspace ¶ added in v1.0.0
func (app *AkashApp) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
func (*AkashApp) InitChainer ¶ added in v1.0.0
func (app *AkashApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*AkashApp) InterfaceRegistry ¶ added in v1.0.0
func (app *AkashApp) InterfaceRegistry() codectypes.InterfaceRegistry
InterfaceRegistry returns AkashApp's InterfaceRegistry
func (*AkashApp) LegacyAmino ¶ added in v1.0.0
func (app *AkashApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns AkashApp's amino codec.
func (*AkashApp) LoadHeight ¶ added in v1.0.0
LoadHeight method of AkashApp loads baseapp application version with given height
func (*AkashApp) ModuleAccountAddrs ¶ added in v1.0.0
ModuleAccountAddrs returns all the app's module account addresses.
func (*AkashApp) NewProposalContext ¶ added in v1.0.0
NewProposalContext returns a context with a branched version of the state that is safe to query during ProcessProposal.
func (*AkashApp) PreBlocker ¶ added in v1.0.0
func (app *AkashApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates before each begin block.
func (*AkashApp) Precommitter ¶ added in v1.0.0
Precommitter application updates before the commital of a block after all transactions have been delivered.
func (*AkashApp) PrepareCheckStater ¶ added in v1.0.0
func (*AkashApp) RegisterAPIRoutes ¶ added in v1.0.0
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*AkashApp) RegisterNodeService ¶ added in v1.0.0
RegisterNodeService registers the node gRPC Query service.
func (*AkashApp) RegisterTendermintService ¶ added in v1.0.0
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*AkashApp) RegisterTxService ¶ added in v1.0.0
RegisterTxService implements the Application.RegisterTxService method.
func (*AkashApp) SimulationManager ¶ added in v1.0.0
func (app *AkashApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type GenesisState ¶ added in v1.0.0
type GenesisState map[string]json.RawMessage
GenesisState of the blockchain is represented here as a map of raw json messages key's by an 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 GenesisStateWithValSet ¶ added in v1.0.0
func GenesisStateWithValSet(cdc codec.Codec) GenesisState
func NewDefaultGenesisState ¶ added in v1.0.0
func NewDefaultGenesisState(cdc codec.Codec) GenesisState
NewDefaultGenesisState generates the default state for the application.
type HandlerOptions ¶ added in v1.0.0
type HandlerOptions struct {
ante.HandlerOptions
CDC codec.BinaryCodec
GovKeeper *govkeeper.Keeper
}
HandlerOptions extends the SDK's AnteHandler options
type SetupAppOption ¶ added in v1.0.0
type SetupAppOption func(*setupAppOptions)
func WithChainID ¶ added in v1.0.0
func WithChainID(val string) SetupAppOption
WithChainID sets home dir for app
func WithCheckTx ¶ added in v1.0.0
func WithCheckTx(val bool) SetupAppOption
WithCheckTx sets home dir for app
func WithEncConfig ¶ added in v1.0.0
func WithEncConfig(val sdkutil.EncodingConfig) SetupAppOption
func WithGenesis ¶ added in v1.0.0
func WithGenesis(val SetupGenesisFn) SetupAppOption
func WithHome ¶ added in v1.0.0
func WithHome(val string) SetupAppOption
WithHome sets home dir for app
type SetupGenesisFn ¶ added in v1.0.0
type SetupGenesisFn func(cdc codec.Codec) GenesisState
type TestnetAccount ¶ added in v1.0.0
type TestnetAccount struct {
Address sdk.AccAddress `json:"address"`
Balances []sdk.Coin `json:"balances"`
}
type TestnetConfig ¶ added in v1.0.0
type TestnetConfig struct {
Accounts []TestnetAccount
Validators []TestnetValidator
Gov TestnetGov
Upgrade TestnetUpgrade
}
type TestnetDelegation ¶ added in v1.0.0
type TestnetDelegation struct {
Address sdk.AccAddress `json:"address"`
Amount sdk.Coin `json:"amount"`
}
type TestnetGov ¶ added in v1.0.0
type TestnetUpgrade ¶ added in v1.0.0
type TestnetUpgrade struct {
Name string
}
type TestnetValidator ¶ added in v1.0.0
type TestnetValidator struct {
OperatorAddress sdk.Address
ConsensusAddress sdk.ConsAddress
ConsensusPubKey *types.Any
Status stakingtypes.BondStatus
Moniker string
Commission stakingtypes.Commission
MinSelfDelegation sdkmath.Int
Delegations []TestnetDelegation
}