app

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: LGPL-3.0 Imports: 130 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "planqd"

Variables

View Source
var DefaultConsensusParams = &abci.ConsensusParams{
	Block: &abci.BlockParams{
		MaxBytes: 200000,
		MaxGas:   -1,
	},
	Evidence: &tmproto.EvidenceParams{
		MaxAgeNumBlocks: 302400,
		MaxAgeDuration:  504 * time.Hour,
		MaxBytes:        10000,
	},
	Validator: &tmproto.ValidatorParams{
		PubKeyTypes: []string{
			tmtypes.ABCIPubKeyTypeEd25519,
		},
	},
}

DefaultConsensusParams defines the default Tendermint consensus params used in Planq testing.

View Source
var DefaultTestingAppInit func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp

DefaultTestingAppInit defines the IBC application used for testing

Functions

func BeginBlockForks added in v1.0.1

func BeginBlockForks(ctx sdk.Context, app *PlanqApp, baseApp baseapp.BaseApp)

BeginBlockForks is intended to be ran in a chain upgrade.

func ConsumeMultisignatureVerificationGas

func ConsumeMultisignatureVerificationGas(
	meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey,
	params authtypes.Params, accSeq uint64,
) error

ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature

func GenesisStateWithValSet

func GenesisStateWithValSet(app *PlanqApp, genesisState simapp.GenesisState,
	valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount,
	balances ...banktypes.Balance,
) simapp.GenesisState

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func NewDefaultGenesisState

func NewDefaultGenesisState() simapp.GenesisState

NewDefaultGenesisState generates the default state for the application.

func RegisterSwaggerAPI

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

RegisterSwaggerAPI registers swagger route with API Server

func SetupTestingApp

func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)

SetupTestingApp initializes the IBC-go testing application

func SigVerificationGasConsumer

func SigVerificationGasConsumer(
	meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params,
) error

SigVerificationGasConsumer is the Planq implementation of SignatureVerificationGasConsumer. It consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type. The types of keys supported are:

- ethsecp256k1 (Ethereum keys)

- ed25519 (Validators)

- multisig (Cosmos SDK multisigs)

Types

type PlanqApp

type PlanqApp struct {
	*baseapp.BaseApp

	keepers.AppKeepers
	// contains filtered or unexported fields
}

PlanqApp implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.

func NewPlanqApp

func NewPlanqApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	encodingConfig simappparams.EncodingConfig,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) *PlanqApp

NewPlanqApp returns a reference to a new initialized Ethermint application.

func Setup

func Setup(
	isCheckTx bool,
	feemarketGenesis *feemarkettypes.GenesisState,
) *PlanqApp

Setup initializes a new PlanqApp. A Nop logger is set in PlanqApp.

func (*PlanqApp) AppCodec

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

AppCodec returns PlanqApp'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 (*PlanqApp) BeginBlocker

func (app *PlanqApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker updates every begin block

func (*PlanqApp) BlockedAddrs

func (app *PlanqApp) BlockedAddrs() map[string]bool

BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.

func (*PlanqApp) EndBlocker

func (app *PlanqApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker updates every end block

func (*PlanqApp) ExportAppStateAndValidators

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

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

func (*PlanqApp) GetBaseApp

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

func (*PlanqApp) GetIBCKeeper

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

func (*PlanqApp) GetKey

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

GetKey returns the KVStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*PlanqApp) GetMemKey

func (app *PlanqApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*PlanqApp) GetScopedIBCKeeper

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

func (*PlanqApp) GetStakingKeeper

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

func (*PlanqApp) GetSubspace

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

GetSubspace returns a param subspace for a given module name.

NOTE: This is solely to be used for testing purposes.

func (*PlanqApp) GetTKey

func (app *PlanqApp) GetTKey(storeKey string) *storetypes.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*PlanqApp) GetTxConfig

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

func (*PlanqApp) InitChainer

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

InitChainer updates at chain initialization

func (*PlanqApp) InterfaceRegistry

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

InterfaceRegistry returns PlanqApp's InterfaceRegistry

func (*PlanqApp) LegacyAmino

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

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

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

LoadHeight loads state at a particular height

func (*PlanqApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*PlanqApp) Name

func (app *PlanqApp) Name() string

Name returns the name of the App

func (*PlanqApp) RegisterAPIRoutes

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

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

func (*PlanqApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*PlanqApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*PlanqApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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