app

package
v0.0.0-...-f327dd6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Name = "blackd"

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 Black testing.

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

DefaultTestingAppInit defines the IBC application used for testing

Functions

func BeginBlockForks

func BeginBlockForks(ctx sdk.Context, app *BlackApp, 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 *BlackApp, 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 Black 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 BlackApp

type BlackApp struct {
	*baseapp.BaseApp

	keepers.AppKeepers
	// contains filtered or unexported fields
}

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

func NewBlackApp

func NewBlackApp(
	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),
) *BlackApp

NewBlackApp returns a reference to a new initialized Ethermint application.

func Setup

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

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

func (*BlackApp) AppCodec

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

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

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

BeginBlocker updates every begin block

func (*BlackApp) BlockedAddrs

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

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

func (*BlackApp) EndBlocker

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

EndBlocker updates every end block

func (*BlackApp) ExportAppStateAndValidators

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

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

func (*BlackApp) GetBaseApp

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

func (*BlackApp) GetIBCKeeper

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

func (*BlackApp) GetKey

func (app *BlackApp) 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 (*BlackApp) GetMemKey

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

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*BlackApp) GetScopedIBCKeeper

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

func (*BlackApp) GetStakingKeeper

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

func (*BlackApp) GetSubspace

func (app *BlackApp) 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 (*BlackApp) GetTKey

func (app *BlackApp) 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 (*BlackApp) GetTxConfig

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

func (*BlackApp) InitChainer

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

InitChainer updates at chain initialization

func (*BlackApp) InterfaceRegistry

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

InterfaceRegistry returns BlackApp's InterfaceRegistry

func (*BlackApp) LegacyAmino

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

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

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

LoadHeight loads state at a particular height

func (*BlackApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*BlackApp) Name

func (app *BlackApp) Name() string

Name returns the name of the App

func (*BlackApp) RegisterAPIRoutes

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

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

func (*BlackApp) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*BlackApp) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*BlackApp) SimulationManager

func (app *BlackApp) 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