app

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 125 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "realio-network"
)

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,
			},
		},
	}
	MultiStakingCoinA = multistakingtypes.MultiStakingCoin{
		Denom:      "ario",
		Amount:     sdk.NewIntFromUint64(1000000000000000000),
		BondWeight: sdk.MustNewDecFromStr("1.23"),
	}
	MultiStakingCoinB = multistakingtypes.MultiStakingCoin{
		Denom:      "arst",
		Amount:     sdk.NewIntFromUint64(1000000000000000000),
		BondWeight: sdk.MustNewDecFromStr("0.12"),
	}
)

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

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

DefaultTestingAppInit defines the IBC application used for testing

View Source
var ForkHeight = 5989487

Functions

func GenesisStateWithValSet added in v0.6.0

func GenesisStateWithValSet(app *RealioNetwork, 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 MakeEncodingConfig added in v0.0.4

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates the EncodingConfig for realio network

func RegisterSwaggerAPI added in v0.6.0

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

RegisterSwaggerAPI registers swagger route with API Server

func SetupTestingApp added in v0.6.0

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

SetupTestingApp initializes the IBC-go testing application

Types

type RealioNetwork added in v0.6.0

type RealioNetwork struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper      authkeeper.AccountKeeper
	BankKeeper         bankkeeper.Keeper
	CapabilityKeeper   *capabilitykeeper.Keeper
	StakingKeeper      stakingkeeper.Keeper
	MultiStakingKeeper multistakingkeeper.Keeper
	SlashingKeeper     slashingkeeper.Keeper
	MintKeeper         mintkeeper.Keeper
	DistrKeeper        distrkeeper.Keeper
	GovKeeper          govkeeper.Keeper
	CrisisKeeper       crisiskeeper.Keeper
	UpgradeKeeper      upgradekeeper.Keeper
	ParamsKeeper       paramskeeper.Keeper
	FeeGrantKeeper     feegrantkeeper.Keeper
	AuthzKeeper        authzkeeper.Keeper
	IBCKeeper          *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	EvidenceKeeper     evidencekeeper.Keeper
	TransferKeeper     ibctransferkeeper.Keeper

	// Ethermint keepers
	EvmKeeper       *evmkeeper.Keeper
	FeeMarketKeeper feemarketkeeper.Keeper

	// make scoped keepers public for test purposes
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper

	// Realio Network keepers
	AssetKeeper assetmodulekeeper.Keeper
	// contains filtered or unexported fields
}

RealioNetwork extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func New

func New(
	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),
) *RealioNetwork

New returns a reference to an initialized blockchain app

func Setup added in v0.6.0

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

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

func (*RealioNetwork) AppCodec added in v0.6.0

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

AppCodec returns an 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 (*RealioNetwork) BeginBlocker added in v0.6.0

BeginBlocker runs the Tendermint ABCI BeginBlock logic. It executes state changes at the beginning of the new block for every registered module. If there is a registered fork at the current height, BeginBlocker will schedule the upgrade plan and perform the state migration (if any).

func (*RealioNetwork) EndBlocker added in v0.6.0

EndBlocker application updates every end block

func (*RealioNetwork) ExportAppStateAndValidators added in v0.6.0

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

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

func (*RealioNetwork) GetBaseApp added in v0.6.0

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

GetBaseApp implements the TestingApp interface.

func (*RealioNetwork) GetIBCKeeper added in v0.6.0

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

GetIBCKeeper implements the TestingApp interface.

func (*RealioNetwork) GetKey added in v0.6.0

func (app *RealioNetwork) 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 (*RealioNetwork) GetMemKey added in v0.6.0

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

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*RealioNetwork) GetScopedIBCKeeper added in v0.6.0

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

GetScopedIBCKeeper implements the TestingApp interface.

func (*RealioNetwork) GetStakingKeeper added in v0.6.0

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

GetStakingKeeper implements the TestingApp interface.

func (*RealioNetwork) GetStakingKeeperSDK added in v0.6.0

func (app *RealioNetwork) GetStakingKeeperSDK() stakingkeeper.Keeper

GetStakingKeeper implements the TestingApp interface.

func (*RealioNetwork) GetSubspace added in v0.6.0

func (app *RealioNetwork) 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 (*RealioNetwork) GetTKey added in v0.6.0

func (app *RealioNetwork) 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 (*RealioNetwork) GetTxConfig added in v0.6.0

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

GetTxConfig implements the TestingApp interface.

func (*RealioNetwork) InitChainer added in v0.6.0

InitChainer application update at chain initialization

func (*RealioNetwork) InterfaceRegistry added in v0.6.0

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

InterfaceRegistry returns an InterfaceRegistry

func (*RealioNetwork) LegacyAmino added in v0.6.0

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

LegacyAmino returns SimApp'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 (*RealioNetwork) LoadHeight added in v0.6.0

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

LoadHeight loads a particular height

func (*RealioNetwork) ModuleAccountAddrs added in v0.6.0

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*RealioNetwork) Name added in v0.6.0

func (app *RealioNetwork) Name() string

Name returns the name of the App

func (*RealioNetwork) RegisterAPIRoutes added in v0.6.0

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

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

func (*RealioNetwork) RegisterTendermintService added in v0.6.0

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*RealioNetwork) RegisterTxService added in v0.6.0

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

RegisterTxService implements the Application.RegisterTxService method.

func (*RealioNetwork) ScheduleForkUpgrade added in v0.6.0

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

ScheduleForkUpgrade executes any necessary fork logic for based upon the current block height and chain ID (mainnet or testnet). It sets an upgrade plan once the chain reaches the pre-defined upgrade height.

CONTRACT: for this logic to work properly it is required to:

  1. Release a non-breaking patch version so that the chain can set the scheduled upgrade plan at upgrade-height.
  2. Release the software defined in the upgrade-info

func (*RealioNetwork) SimulationManager added in v0.6.0

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

SimulationManager implements the SimulationApp interface

Directories

Path Synopsis
upgrades
v2

Jump to

Keyboard shortcuts

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