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 RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func TrimQuotes(data string) string
- 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 TestnetGovConfig
- type TestnetUpgrade
- type TestnetValidator
- type TestnetVotingPeriod
Constants ¶
const (
AppName = "akash"
)
Variables ¶
var (
DefaultHome = os.ExpandEnv("$HOME/.akash")
)
Functions ¶
func ModuleAccountAddrs ¶
func ModuleAccountPerms ¶
func ModuleBasics ¶
func ModuleBasics() module.BasicManager
ModuleBasics returns all app modules basics
func NewAnteHandler ¶
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 RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func TrimQuotes ¶
Types ¶
type AkashApp ¶
AkashApp extends ABCI application
func InitAkashAppForTestnet ¶
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 ¶
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 ¶
func Setup(opts ...SetupAppOption) *AkashApp
Setup initializes a new AkashApp. A Nop logger is set in AkashApp.
func (*AkashApp) BeginBlocker ¶
BeginBlocker is a function in which application updates every begin block
func (*AkashApp) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*AkashApp) EndBlocker ¶
EndBlocker is a function in which an application updates every end block
func (*AkashApp) ExportAppStateAndValidators ¶
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 ¶
func (app *AkashApp) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
func (*AkashApp) InitChainer ¶
func (app *AkashApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*AkashApp) InterfaceRegistry ¶
func (app *AkashApp) InterfaceRegistry() codectypes.InterfaceRegistry
InterfaceRegistry returns AkashApp's InterfaceRegistry
func (*AkashApp) LegacyAmino ¶
func (app *AkashApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns AkashApp's amino codec.
func (*AkashApp) LoadHeight ¶
LoadHeight method of AkashApp loads baseapp application version with given height
func (*AkashApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*AkashApp) NewProposalContext ¶
NewProposalContext returns a context with a branched version of the state that is safe to query during ProcessProposal.
func (*AkashApp) PreBlocker ¶
func (app *AkashApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates before each begin block.
func (*AkashApp) Precommitter ¶
Precommitter application updates before the committal of a block after all transactions have been delivered.
func (*AkashApp) PrepareCheckStater ¶
func (*AkashApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*AkashApp) RegisterNodeService ¶
RegisterNodeService registers the node gRPC Query service.
func (*AkashApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*AkashApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*AkashApp) SimulationManager ¶
func (app *AkashApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type GenesisState ¶
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 ¶
func GenesisStateWithValSet(cdc codec.Codec) GenesisState
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.Codec) GenesisState
NewDefaultGenesisState generates the default state for the application.
type HandlerOptions ¶
type HandlerOptions struct {
ante.HandlerOptions
CDC codec.BinaryCodec
GovKeeper *govkeeper.Keeper
}
HandlerOptions extends the SDK's AnteHandler options
type SetupAppOption ¶
type SetupAppOption func(*setupAppOptions)
func WithEncConfig ¶
func WithEncConfig(val sdkutil.EncodingConfig) SetupAppOption
func WithGenesis ¶
func WithGenesis(val SetupGenesisFn) SetupAppOption
type SetupGenesisFn ¶
type SetupGenesisFn func(cdc codec.Codec) GenesisState
type TestnetAccount ¶
type TestnetAccount struct {
Address sdk.AccAddress `json:"address"`
Balances []sdk.Coin `json:"balances"`
}
type TestnetConfig ¶
type TestnetConfig struct {
Accounts []TestnetAccount
Validators []TestnetValidator
Gov TestnetGovConfig
Upgrade TestnetUpgrade
}
type TestnetDelegation ¶
type TestnetDelegation struct {
Address sdk.AccAddress `json:"address"`
Amount sdk.Coin `json:"amount"`
}
type TestnetGovConfig ¶
type TestnetGovConfig struct {
VotingParams *struct {
VotingPeriod TestnetVotingPeriod `json:"voting_period,omitempty"`
ExpeditedVotePeriod TestnetVotingPeriod `json:"expedited_vote_period"`
} `json:"voting_params,omitempty"`
}
type TestnetUpgrade ¶
type TestnetUpgrade struct {
Name string
}
type TestnetValidator ¶
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
}
type TestnetVotingPeriod ¶
func (*TestnetVotingPeriod) UnmarshalJSON ¶
func (t *TestnetVotingPeriod) UnmarshalJSON(data []byte) error