app

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 115 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpgradeV103 = "v1.0.3"
	UpgradeV104 = "v1.0.4"
	UpgradeV105 = "v1.0.5"
	UpgradeV106 = "v1.0.6"
)

UpgradeName is the name of the upgrade. It is used to identify the upgrade in the upgrade handler and

Variables

View Source
var (
	// DefaultNodeHome is the default home directory for the application
	DefaultNodeHome string
)

Functions

func BlockedAddresses

func BlockedAddresses() map[string]bool

BlockedAddresses returns all the app's blocked account addresses.

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func NewAnteHandler

func NewAnteHandler(options HandlerOptions, app *PaxiApp, wasmKeeper wasmkeeper.Keeper, ak authkeeper.AccountKeeper, customWasmKeeper customwasmkeeper.Keeper, paxiKeeper paxikeeper.Keeper) (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

func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router, swaggerEnabled bool) error

Paxi clones the original Swagger UI from the Cosmos SDK and integrates the Paxi API into it.

Types

type BlockStatusData

type BlockStatusData struct {
	TotalTxs uint64 `json:"total_txs"`
}

type BlockStatusDecorator

type BlockStatusDecorator struct {
	App *PaxiApp
}

func NewBlockStatusDecorator

func NewBlockStatusDecorator(app *PaxiApp) BlockStatusDecorator

func (BlockStatusDecorator) AnteHandle

func (p BlockStatusDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error)

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState 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.

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions
	CircuitKeeper circuitante.CircuitBreaker
}

HandlerOptions are the options required for constructing a default SDK AnteHandler.

type PaxiApp

type PaxiApp struct {
	*baseapp.BaseApp

	// essential keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.BaseKeeper
	StakingKeeper         *customstaking.CustomStakingKeeper
	SlashingKeeper        slashingkeeper.Keeper
	MintKeeper            custommintkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	GovKeeper             govkeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	ConsensusParamsKeeper consensusparamkeeper.Keeper
	CircuitKeeper         circuitkeeper.Keeper
	PaxiKeeper            paxikeeper.Keeper
	SwapKeeper            swapkeeper.Keeper

	// ibc keepers
	IBCKeeper         *ibckeeper.Keeper
	IBCTransferKeeper ibctransferkeeper.Keeper

	// supplementary keepers
	WasmKeeper       wasmkeeper.Keeper
	CustomWasmKeeper customwasmkeeper.Keeper

	// the module manager
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager

	// block status
	LastBlockGasUsed    uint64 // for observation only, don't use it for consensus
	CurrentBlockGasUsed uint64 // for observation only, don't use it for consensus
	TotalTxs            uint64 // for observation only, don't use it for consensus
	// contains filtered or unexported fields
}

PaxiApp 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 NewPaxiApp

func NewPaxiApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	appOpts servertypes.AppOptions,
	enableWasm bool,
	baseAppOptions ...func(*baseapp.BaseApp),
) *PaxiApp

NewPaxiApp returns a reference to an initialized PaxiApp.

func (*PaxiApp) AppCodec

func (app *PaxiApp) AppCodec() codec.Codec

AppCodec returns app's app codec.

func (*PaxiApp) AutoCliOpts

func (app *PaxiApp) AutoCliOpts() autocli.AppOptions

AutoCliOpts returns the autocli options for the app.

func (*PaxiApp) BeginBlocker

func (app *PaxiApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

BeginBlocker application updates every begin block

func (*PaxiApp) Configurator

func (a *PaxiApp) Configurator() module.Configurator

func (*PaxiApp) DefaultGenesis

func (a *PaxiApp) DefaultGenesis() map[string]json.RawMessage

DefaultGenesis returns a default genesis from the registered AppModuleBasic's.

func (*PaxiApp) EndBlocker

func (app *PaxiApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

EndBlocker application updates every end block

func (*PaxiApp) ExportAppStateAndValidators

func (app *PaxiApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*PaxiApp) GetKey

func (app *PaxiApp) GetKey(storeKey string) *storetypes.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

func (*PaxiApp) GetLastBlockGasUsed

func (app *PaxiApp) GetLastBlockGasUsed() uint64

func (*PaxiApp) GetStoreKeys

func (app *PaxiApp) GetStoreKeys() []storetypes.StoreKey

GetStoreKeys returns all the stored store keys.

func (*PaxiApp) GetTotalTxs

func (app *PaxiApp) GetTotalTxs() uint64

func (*PaxiApp) InitChainer

func (app *PaxiApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)

InitChainer application update at chain initialization

func (*PaxiApp) InterfaceRegistry

func (app *PaxiApp) InterfaceRegistry() types.InterfaceRegistry

InterfaceRegistry returns app's InterfaceRegistry

func (*PaxiApp) LegacyAmino

func (app *PaxiApp) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns app's amino codec.

func (*PaxiApp) LoadHeight

func (app *PaxiApp) LoadHeight(height int64) error

LoadHeight loads a particular height

func (*PaxiApp) Name

func (app *PaxiApp) Name() string

Name returns the name of the App

func (*PaxiApp) PreBlocker

func (app *PaxiApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates every pre block

func (*PaxiApp) ReadBlockStatusFromFile

func (app *PaxiApp) ReadBlockStatusFromFile() error

func (*PaxiApp) RegisterAPIRoutes

func (app *PaxiApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*PaxiApp) RegisterNodeService

func (app *PaxiApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)

func (*PaxiApp) RegisterTendermintService

func (app *PaxiApp) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*PaxiApp) RegisterTxService

func (app *PaxiApp) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (*PaxiApp) RegisterUpgradeHandlers

func (app *PaxiApp) RegisterUpgradeHandlers()

func (*PaxiApp) SetLastBlockGasUsed

func (app *PaxiApp) SetLastBlockGasUsed()

func (*PaxiApp) SimulationManager

func (app *PaxiApp) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface

func (*PaxiApp) TxConfig

func (app *PaxiApp) TxConfig() client.TxConfig

TxConfig returns app's TxConfig

func (*PaxiApp) WriteBlockStatusToFile

func (app *PaxiApp) WriteBlockStatusToFile() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL