app

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: LGPL-3.0 Imports: 150 Imported by: 0

Documentation

Overview

Copyright 2022 PlanqApp Foundation This file is part of the PlanqApp Network packages.

PlanqApp is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The PlanqApp packages are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the PlanqApp packages. If not, see https://github.com/evmos/evmos/blob/main/LICENSE

Index

Constants

View Source
const Name = "planqd"

Variables

View Source
var DefaultConsensusParams = &tmproto.ConsensusParams{
	Block: &tmproto.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

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

EthDefaultConsensusParams defines the default Tendermint consensus params used in PlanqApp testing.

Functions

func BeginBlockForks

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 NewTestGenesisState

func NewTestGenesisState(codec codec.Codec) simapp.GenesisState

NewTestGenesisState generate genesis state with single validator

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 EthSetup

func EthSetup(isCheckTx bool, patchGenesis func(*PlanqApp, simapp.GenesisState) simapp.GenesisState) *PlanqApp

EthSetup initializes a new PlanqAppApp. A Nop logger is set in PlanqAppApp.

func EthSetupWithDB

func EthSetupWithDB(isCheckTx bool, patchGenesis func(*PlanqApp, simapp.GenesisState) simapp.GenesisState, db dbm.DB) *PlanqApp

EthSetupWithDB initializes a new PlanqAppApp. A Nop logger is set in PlanqAppApp.

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, modulesToExport []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) RegisterNodeService

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

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) ScheduleForkUpgrade

func (app *PlanqApp) ScheduleForkUpgrade(ctx sdk.Context)

func (*PlanqApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

Directories

Path Synopsis
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
evm
v2

Jump to

Keyboard shortcuts

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