band

package
v3.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 133 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bech32MainPrefix = "band"
	Bip44CoinType    = 494
)

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string

	Upgrades = []upgrades.Upgrade{v3.Upgrade}
)

Functions

func NewAnteHandler

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)

func NewPostHandler

func NewPostHandler(options PostHandlerOptions) (sdk.PostHandler, error)

NewPostHandler returns a PostHandler chain with decorators.

func SetBech32AddressPrefixesAndBip44CoinTypeAndSeal

func SetBech32AddressPrefixesAndBip44CoinTypeAndSeal(config *sdk.Config)

SetBech32AddressPrefixesAndBip44CoinTypeAndSeal sets the global Bech32 prefixes and HD wallet coin type and seal config.

Types

type BandApp

type BandApp struct {
	*baseapp.BaseApp
	keepers.AppKeepers

	ModuleBasics module.BasicManager
	// contains filtered or unexported fields
}

BandApp is the application of BandChain, extended base ABCI application.

func NewBandApp

func NewBandApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	appOpts servertypes.AppOptions,
	owasmCacheSize uint32,
	baseAppOptions ...func(*baseapp.BaseApp),
) *BandApp

NewBandApp returns a reference to an initialized BandApp.

func (*BandApp) AppCodec

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

AppCodec returns Band'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 (*BandApp) AutoCliOpts

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

AutoCliOpts returns the autocli options for the app.

func (*BandApp) BeginBlocker

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

BeginBlocker application updates every begin block

func (*BandApp) BlockedModuleAccountAddrs

func (app *BandApp) BlockedModuleAccountAddrs(modAccAddrs map[string]bool) map[string]bool

BlockedModuleAccountAddrs returns all the app's blocked module account addresses.

func (*BandApp) EndBlocker

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

EndBlocker application updates every end block

func (*BandApp) ExportAppStateAndValidators

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

ExportAppStateAndValidators export the state of band for a genesis file

func (*BandApp) GetBaseApp

func (app *BandApp) GetBaseApp() *baseapp.BaseApp

GetBaseApp implements the TestingApp interface.

func (*BandApp) GetIBCKeeper

func (app *BandApp) GetIBCKeeper() *ibckeeper.Keeper

GetIBCKeeper implements the TestingApp interface.

func (*BandApp) GetScopedIBCKeeper

func (app *BandApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper

GetScopedIBCKeeper implements the TestingApp interface.

func (*BandApp) GetStakingKeeper

func (app *BandApp) GetStakingKeeper() ibctestingtypes.StakingKeeper

GetStakingKeeper implements the TestingApp interface.

func (*BandApp) GetTestGovKeeper

func (app *BandApp) GetTestGovKeeper() *govkeeper.Keeper

GetTestGovKeeper implements the TestingApp interface.

func (*BandApp) GetTxConfig

func (app *BandApp) GetTxConfig() client.TxConfig

GetTxConfig implements the TestingApp interface.

func (*BandApp) InitChainer

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

InitChainer application update at chain initialization

func (*BandApp) InterfaceRegistry

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

InterfaceRegistry returns Band's InterfaceRegistry

func (*BandApp) LegacyAmino

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

LegacyAmino returns BandApp'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 (*BandApp) LoadHeight

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

LoadHeight loads a particular height

func (*BandApp) ModuleAccountAddrs

func (app *BandApp) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*BandApp) Name

func (app *BandApp) Name() string

Name returns the name of the App.

func (*BandApp) PreBlocker

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

PreBlocker application updates every pre block

func (*BandApp) RegisterAPIRoutes

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

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

func (*BandApp) RegisterNodeService

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

RegisterNodeService allows query minimum-gas-prices in app.toml

func (*BandApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*BandApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*BandApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState defines a type alias for the Band genesis application state.

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.Codec
	AuthzKeeper     *authzkeeper.Keeper
	OracleKeeper    *oraclekeeper.Keeper
	IBCKeeper       *ibckeeper.Keeper
	StakingKeeper   *stakingkeeper.Keeper
	GlobalfeeKeeper *globalfeekeeper.Keeper
	TSSKeeper       *tsskeeper.Keeper
	BandtssKeeper   *bandtsskeeper.Keeper
	FeedsKeeper     *feedskeeper.Keeper
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.

type PostHandlerOptions

type PostHandlerOptions struct{}

PostHandlerOptions are the options required for constructing PostHandlers.

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

Directories

Path Synopsis
Package params defines the simulation parameters in the band.
Package params defines the simulation parameters in the band.
v3

Jump to

Keyboard shortcuts

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