app

package
v1.5.22 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 87 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INITCHAINKEY = "isInitChain"
	FIRSTSHARD   = "1"
)

Variables

View Source
var (
	// default home directories for expected binaries
	MainStoreKey       = sdk.NewKVStoreKey("main")
	ContractStoreKey   = sdk.NewKVStoreKey("contract")
	TxIndexStoreKey    = sdk.NewTransientStoreKey("tx_index")
	AccountStoreKey    = sdk.NewKVStoreKey(account.StoreKey)
	ParamStoreKey      = sdk.NewKVStoreKey(params.StoreKey)
	ParamTransStoreKey = sdk.NewTransientStoreKey(params.TStoreKey)
	AuthStoreKey       = sdk.NewKVStoreKey(auth.StoreKey)
	SupplyStoreKey     = sdk.NewKVStoreKey(supply.StoreKey)
	OrderStoreKey      = sdk.NewKVStoreKey(order.StoreKey)
	IBCStoreKey        = sdk.NewKVStoreKey(ibchost.StoreKey)

	DisrtStoreKey   = sdk.NewKVStoreKey(k.DisrtKey)
	StakingStoreKey = sdk.NewKVStoreKey(staking.StoreKey)

	SlashingStoreKey       = sdk.NewKVStoreKey(slashing.StoreKey)
	GravityStoreKey        = sdk.NewKVStoreKey(gravity.StoreKey)
	WasmStoreKey           = sdk.NewKVStoreKey(vm.StoreKey)
	MintStoreKey           = sdk.NewKVStoreKey(mint.StoreKey)
	InfrastructureStoreKey = sdk.NewKVStoreKey(infrastructure.StoreKey)
	IbcTransferStoreKey    = sdk.NewKVStoreKey(ibctransfertypes.StoreKey)
	CapabilityStoreKey     = sdk.NewKVStoreKey(capabilitytypes.StoreKey)
)

Functions

func AppGenStateJSON

func AppGenStateJSON(validators []tmtypes.GenesisValidator) (json.RawMessage, error)

func ExportGenesisFile

func ExportGenesisFile(genDoc *tmtypes.GenesisDoc, genFile string) error

func GenesisStateFromGenDoc

func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc,
) (genesisState map[string]json.RawMessage, err error)

func GenesisStateFromGenFile

func GenesisStateFromGenFile(cdc *codec.Codec, genFile string) (genesisState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, err error)

func GetRDB

func GetRDB(stateDB string, logger log.Logger) (db dbm.DB, err error)

func SetupContext

func SetupContext(ctx *Context, level string) error

Types

type AppCreator

type AppCreator func(home string, logger log.Logger, statedb, traceStore string) (sdk.Application, error)

func ConstructAppCreator

func ConstructAppCreator(appFn AppCreatorInit, name string) AppCreator

type AppCreatorInit

type AppCreatorInit func(logger log.Logger, ldb dbm.DB, cdb dbm.DB, writer io.Writer) sdk.Application

type AppExporter

type AppExporter func(home string, logger log.Logger, statedb, traceStore string) (json.RawMessage, []tmtypes.GenesisValidator, error)

func ConstructAppExporter

func ConstructAppExporter(appFn AppExporterInit, name string) AppExporter

type AppExporterInit

type AppExporterInit func(logger log.Logger, ldb dbm.DB, cdb dbm.DB, writer io.Writer) (json.RawMessage, []tmtypes.GenesisValidator, error)

type AppGenTx

type AppGenTx struct {
	// currently takes address as string because unmarshaling Ether address fails
	Address string `json:"address"`
}

type AppInit

type AppInit struct {
	// AppGenState creates the collactor parameters initialization. It takes in a
	// pubkey meant to represent the pubkey of the validator of this machine.
	AppGenState func(validators []types.GenesisValidator) (appState json.RawMessage, err error)

	GetValidator func(pk crypto.PubKey, name string) types.GenesisValidator
}

Core functionality passed from the application to the server init command

func NewAppInit

func NewAppInit() AppInit

type Chain

type Chain struct {
	*baseapp.BaseApp
	// contains filtered or unexported fields
}

func NewChain

func NewChain(logger log.Logger, ldb tmdb.DB, cdb tmdb.DB, traceStore io.Writer) *Chain

func (*Chain) BeginBlocker

func (c *Chain) BeginBlocker(ctx types.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

func (*Chain) EndBlocker

func (c *Chain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

func (*Chain) ExportAppStateJSON

func (c *Chain) ExportAppStateJSON() (json.RawMessage, []types.GenesisValidator, error)

func (*Chain) GetSubspace

func (app *Chain) GetSubspace(moduleName string) params.Subspace

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

func (*Chain) InitChainer

func (c *Chain) InitChainer(ctx sdk.Context, req tmabci.RequestInitChain) tmabci.ResponseInitChain

type Context

type Context struct {
	Config *cfg.Config
	Logger log.Logger
}

func NewContext

func NewContext(config *cfg.Config, logger log.Logger) *Context

func NewDefaultContext

func NewDefaultContext() *Context

type GenesisState

type GenesisState map[string]json.RawMessage

type GenesisTx

type GenesisTx struct {
	NodeID    string                 `json:"node_id"`
	IP        string                 `json:"ip"`
	Validator types.GenesisValidator `json:"validator"`
	AppGenTx  json.RawMessage        `json:"app_gen_tx"`
}

simple genesis tx

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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