app

package
v0.0.0-...-eccf466 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Name defines the application binary name
	Name           = "neurd"
	MainnetChainID = "neurd_5252"
)
View Source
const PremintAmount = 20_000_000_000

Variables

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

	// ModuleBasics defines the module BasicManager is in charge of setting up basic,
	// non-dependant module elements, such as codec registration
	// and genesis verification.
	ModuleBasics = module.NewBasicManager(
		auth.AppModuleBasic{},
		genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
		bank.AppModuleBasic{},
		capability.AppModuleBasic{},
		staking.AppModuleBasic{AppModuleBasic: &sdkstaking.AppModuleBasic{}},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(
			[]govclient.ProposalHandler{
				paramsclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler,
				ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler,

				erc20client.RegisterCoinProposalHandler,
				erc20client.RegisterERC20ProposalHandler,
				erc20client.ToggleTokenConversionProposalHandler,
			},
		),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		ibc.AppModuleBasic{},
		ibctm.AppModuleBasic{},
		ica.AppModuleBasic{},
		packetforward.AppModuleBasic{},
		authzmodule.AppModuleBasic{},
		feegrantmodule.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		transfer.AppModuleBasic{AppModuleBasic: &ibctransfer.AppModuleBasic{}},
		vesting.AppModuleBasic{},
		evm.AppModuleBasic{},
		feemarket.AppModuleBasic{},
		coinomics.AppModuleBasic{},
		erc20.AppModuleBasic{},
		epochs.AppModuleBasic{},
		consensus.AppModuleBasic{},
		liquidvesting.AppModuleBasic{},
		ucdao.AppModuleBasic{},
	)
)
View Source
var (
	// MinGasPrices defines 20B aISLM as the minimum gas price value on the fee market module.
	MinGasPrices = math.LegacyNewDec(20_000_000_000)

	// MinGasMultiplier defines the min gas multiplier value on the fee market module.
	// 50% of the leftover gas will be refunded
	MinGasMultiplier = math.LegacyNewDecWithPrec(5, 1)
)
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 Evmos testing.

View Source
var ErrCommunitySpendingComingLater = sdkerrors.Register("neura-ante", 6001, "community fund spend coming later")
View Source
var EthDefaultConsensusParams = &tmtypes.ConsensusParams{
	Block: &tmtypes.BlockParams{
		MaxBytes: 200000,
		MaxGas:   -1,
	},
	Evidence: &tmtypes.EvidenceParams{
		MaxAgeNumBlocks: 302400,
		MaxAgeDuration:  504 * time.Hour,
		MaxBytes:        10000,
	},
	Validator: &tmtypes.ValidatorParams{
		PubKeyTypes: []string{
			cmtypes.ABCIPubKeyTypeEd25519,
		},
	},
}

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

Functions

func EthSetup

func EthSetup(isCheckTx bool, patchGenesis func(*neura, types.GenesisState) types.GenesisState) *neura

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

func EthSetupWithDB

func EthSetupWithDB(isCheckTx bool, patchGenesis func(*neura, types.GenesisState) types.GenesisState, db dbm.DB) *neura

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

func GenesisStateWithValSet

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

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func NewDefaultGenesisState

func NewDefaultGenesisState() types.GenesisState

NewDefaultGenesisState generates the default state for the application.

func NewTestGenesisState

func NewTestGenesisState(codec codec.Codec) types.GenesisState

NewTestGenesisState generate genesis state with single validator

func Newneura

func Newneura(
	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),
) *neura

Newneura returns a reference to a new initialized Ethermint application.

func NewneuraAnteHandlerDecorator

func NewneuraAnteHandlerDecorator(_ keeper.Keeper, h types.AnteHandler) types.AnteHandler

func ObservabilityViews

func ObservabilityViews() (views []*view.View)

func RegisterSwaggerAPI

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

RegisterSwaggerAPI registers swagger route with API Server

func Setup

func Setup(
	isCheckTx bool,
	feemarketGenesis *feemarkettypes.GenesisState,
	chainID string,
) (*neura, []byte)

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

func SetupTestingApp

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

SetupTestingApp initializes the IBC-go testing application need to keep this design to comply with the ibctesting SetupTestingApp func and be able to set the chainID for the tests properly

Types

This section is empty.

Directories

Path Synopsis
evm
upgrades

Jump to

Keyboard shortcuts

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