app

package
v10.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 116 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName          = "PersistenceCore"
	Bech32MainPrefix = "persistence"
	BondDenom        = "uxprt"
	CoinType         = 118
	Purpose          = 44

	Bech32PrefixAccAddr  = Bech32MainPrefix
	Bech32PrefixAccPub   = Bech32MainPrefix + sdk.PrefixPublic
	Bech32PrefixValAddr  = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator
	Bech32PrefixValPub   = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	Bech32PrefixConsAddr = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus
	Bech32PrefixConsPub  = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

Variables

View Source
var (
	DefaultNodeHome string
	Upgrades        = []upgrades.Upgrade{v10_4_1.Upgrade}
	ModuleBasics    = module.NewBasicManager(keepers.AppModuleBasics...)
)
View Source
var (
	// ProposalsEnabled is "true" and EnabledSpecificProposals is "", then enable all x/wasm proposals.
	// ProposalsEnabled is not "true" and EnabledSpecificProposals is "", then disable all x/wasm proposals.
	ProposalsEnabled = "true"
	// EnableSpecificProposals if set to non-empty string it must be comma-separated list of values that are all a subset
	// of "EnableAllProposals" (takes precedence over ProposalsEnabled)
	// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
	EnableSpecificProposals = ""
)
View Source
var (
	FeeDenomsWhitelistMainnet = []string{
		BondDenom,
		"ibc/C8A74ABBE2AF892E15680D916A7C22130585CE5704F9B17A10F184A90D53BECA",
		"ibc/A6E3AF63B3C906416A9AF7A556C59EA4BD50E617EFFE6299B99700CCB780E444",
		"ibc/646315E3B0461F5FA4C5C8968A88FC45D4D5D04A45B98F1B8294DD82F386DD85",
		"ibc/23DC3FF0E4CBB53A1915E4C62507CB7796956E84C68CA49707787CB8BDE90A1E",
		"ibc/B3792E4A62DF4A934EF2DF5968556DB56F5776ED25BDE11188A4F58A7DD406F0",
		"stk/uatom",
		"stk/uosmo",
		"stk/adydx",
	}

	FeeDenomsWhitelistTestnet = []string{
		BondDenom,
		"ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9",
	}
)

Functions

func GetEnabledProposals

func GetEnabledProposals() []wasm.ProposalType

GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to produce a list of enabled proposals to pass into wasmd app.

func MakeEncodingConfig

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func NewAnteHandler

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

func NewTestNetworkFixture

func NewTestNetworkFixture() network.TestFixture

NewTestNetworkFixture returns a new persistenceCore AppConstructor for network simulation tests.

func RegisterSwaggerAPI

func RegisterSwaggerAPI(rtr *mux.Router)

func SendCoinBlockedAddrs

func SendCoinBlockedAddrs() map[string]bool

Types

type Application

type Application struct {
	*baseapp.BaseApp
	*keepers.AppKeepers
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(
	logger tendermintlog.Logger,
	db tendermintdb.DB,
	traceStore io.Writer,
	loadLatest bool,
	enabledProposals []wasm.ProposalType,
	applicationOptions servertypes.AppOptions,
	wasmOpts []wasm.Option,
	baseAppOptions ...func(*baseapp.BaseApp),
) *Application

func (*Application) AppCodec

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

func (*Application) BeginBlocker

func (*Application) ChainID

func (app *Application) ChainID() string

ChainID gets chainID from private fields of BaseApp Should be removed once SDK 0.50.x will be adopted

func (*Application) CheckTx

CheckTx will check the transaction with the provided checkTxHandler. We override the default handler so that we can verify bid transactions before they are inserted into the mempool. With the POB CheckTx, we can verify the bid transaction and all of the bundled transactions before inserting the bid transaction into the mempool.

func (*Application) DefaultGenesis

func (app *Application) DefaultGenesis() map[string]json.RawMessage

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

func (*Application) EndBlocker

func (*Application) ExportAppStateAndValidators

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

func (*Application) GetChainBondDenom

func (app *Application) GetChainBondDenom() string

GetChainBondDenom returns expected chain bond denom.

func (*Application) GetFeeDenomsWhitelist added in v10.2.0

func (app *Application) GetFeeDenomsWhitelist() []string

func (*Application) GetSubspace

func (app *Application) GetSubspace(moduleName string) paramstypes.Subspace

func (*Application) InitChainer

func (*Application) InterfaceRegistry

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

InterfaceRegistry returns Application's InterfaceRegistry

func (*Application) LegacyAmino

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

func (*Application) LoadHeight

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

func (*Application) ModuleAccountAddrs

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

func (*Application) ModuleManager

func (app *Application) ModuleManager() *module.Manager

func (*Application) Name

func (app *Application) Name() string

func (*Application) RegisterAPIRoutes

func (app *Application) RegisterAPIRoutes(apiServer *api.Server, apiConfig config.APIConfig)

func (*Application) RegisterNodeService

func (app *Application) RegisterNodeService(clientCtx client.Context)

func (*Application) RegisterTendermintService

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

func (*Application) RegisterTxService

func (app *Application) RegisterTxService(clientContect client.Context)

func (*Application) SetCheckTx

func (app *Application) SetCheckTx(handler pobabci.CheckTx)

SetCheckTx sets the checkTxHandler for the app.

func (*Application) SimulationManager

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

func (*Application) TxConfig

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

TxConfig returns Application's TxConfig

type FeeDenomWhitelistDecorator added in v10.2.0

type FeeDenomWhitelistDecorator struct {
	// contains filtered or unexported fields
}

func NewFeeDenomWhitelistDecorator added in v10.2.0

func NewFeeDenomWhitelistDecorator(denomsWhitelist []string) *FeeDenomWhitelistDecorator

func (*FeeDenomWhitelistDecorator) AnteHandle added in v10.2.0

func (fdd *FeeDenomWhitelistDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err 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.

func NewDefaultGenesisState

func NewDefaultGenesisState() GenesisState

NewDefaultGenesisState generates the default state for the Application.

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions
	IBCKeeper         *ibckeeper.Keeper
	WasmConfig        *wasmtypes.WasmConfig
	TXCounterStoreKey storetypes.StoreKey

	Mempool       mempool.Mempool
	TxDecoder     sdk.TxDecoder
	TxEncoder     sdk.TxEncoder
	BuilderKeeper *builderkeeper.Keeper

	FeeDenomsWhitelist []string
}

type OracleKeeper

type OracleKeeper interface {
	ValidateFeeder(ctx sdk.Context, validatorAddr sdk.ValAddress, feederAddr sdk.AccAddress) error
}

OracleKeeper for feeder validation

Directories

Path Synopsis
v10
v7
v8
v9

Jump to

Keyboard shortcuts

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