Documentation ¶
Index ¶
- Constants
- Variables
- func AppGenStateJSON(validators []tmtypes.GenesisValidator) (json.RawMessage, error)
- func CreatePVWithKey(cdc *amino.Codec, validatorKeyStr string) (ed25519.PrivKey, error)
- func ExportGenesisFile(genDoc *tmtypes.GenesisDoc, genFile string) error
- func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc) (genesisState map[string]json.RawMessage, err error)
- func GenesisStateFromGenFile(cdc *codec.Codec, genFile string) (genesisState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, err error)
- func GetRDB(stateDB string, logger log.Logger) (db dbm.DB, err error)
- func SetupContext(ctx *Context, level string) error
- type AppCreator
- type AppCreatorInit
- type AppExporter
- type AppExporterInit
- type AppGenTx
- type AppInit
- type AppOptions
- type Application
- type Chain
- func (c *Chain) BeginBlocker(ctx types.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (c *Chain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (c *Chain) ExportAppStateJSON() (ExportedApp, error)
- func (app *Chain) GetSubspace(moduleName string) params.Subspace
- func (c *Chain) InitChainer(ctx sdk.Context, req tmabci.RequestInitChain) tmabci.ResponseInitChain
- func (app *Chain) LoadStartVersion(height int64) error
- func (app *Chain) RegisterTxService(clientCtx client.Context)
- type Context
- type ExportedApp
- type GenesisState
- type GenesisTx
Constants ¶
View Source
const ( FlagMasterDomain = "master_domain" FlagValidatorKey = "validator_key" )
View Source
const ( INITCHAINKEY = "isInitChain" FIRSTSHARD = "1" )
View Source
const AppName = "ci123"
View Source
const HomeFlag = "home"
View Source
const (
StoreKey = "main"
)
Variables ¶
View Source
var (
GasPriceConfig *config.GasPriceConfig
)
Functions ¶
func AppGenStateJSON ¶
func AppGenStateJSON(validators []tmtypes.GenesisValidator) (json.RawMessage, error)
func CreatePVWithKey ¶ added in v1.6.8
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 SetupContext ¶
Types ¶
type AppCreator ¶
type AppCreator func(home string, logger log.Logger, statedb, traceStore string) (Application, error)
func ConstructAppCreator ¶
func ConstructAppCreator(appFn AppCreatorInit, name string) AppCreator
type AppCreatorInit ¶
type AppExporter ¶
type AppExporter func(log.Logger, string, io.Writer, int64, bool, []string, AppOptions) (ExportedApp, error)
AppExporter is a function that dumps all app state to JSON-serializable structure and returns the current validator set.
func ConstructAppExporter ¶
func ConstructAppExporter(name string) AppExporter
type AppExporterInit ¶
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 AppOptions ¶ added in v1.5.23
type AppOptions interface {
Get(string) interface{}
}
type Application ¶ added in v1.5.28
type Application interface { sdk.Application // RegisterTxService registers the gRPC Query service for tx (such as tx // simulation, fetching txs by hash...). RegisterTxService(clientCtx client.Context) }
type Chain ¶
type Chain struct { *baseapp.BaseApp // keys to access the substores //capKeyMainStore *sdk.KVStoreKey //txIndexStore *sdk.TransientStoreKey AccountKeeper account.AccountKeeper AuthKeeper auth.AuthKeeper ParamsKeepr params.Keeper StakingKeeper keeper2.StakingKeeper SupplyKeeper supply.Keeper SlashingKeeper slashing.Keeper MintKeeper mint.Keeper DistrKeeper distr.Keeper InfrastructureKeeper infrastructure.Keeper CapabilityKeeper *capabilitykeeper.Keeper ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper PrestakingKeeper prestaking.Keeper RegistryKeeper registry.Keeper IBCKeeper ibc.Keeper VMKeeper vm.Keeper GravityKeeper gravity.Keeper UpgradeKeeper upgrade.Keeper // contains filtered or unexported fields }
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() (ExportedApp, error)
func (*Chain) GetSubspace ¶
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
func (*Chain) LoadStartVersion ¶ added in v1.6.8
func (*Chain) RegisterTxService ¶ added in v1.5.28
type Context ¶
func NewDefaultContext ¶
func NewDefaultContext() *Context
type ExportedApp ¶ added in v1.5.23
type ExportedApp struct { // AppState is the application state as JSON. AppState json.RawMessage // Validators is the exported validator set. Validators []stypes.Validator // Height is the app's latest block height. Height int64 // ConsensusParams are the exported consensus params for ABCI. ConsensusParams *sdk.ConsensusParams }
ExportedApp represents an exported app state, along with validators, consensus params and latest app height.
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.