Documentation ¶
Index ¶
- Variables
- func ErrGenesisFailed(msg string) sdk.Error
- func InitCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command
- func LinoBlockchainGenState(cdc *wire.Codec, appGenTxs []json.RawMessage) (appState json.RawMessage, err error)
- func LinoBlockchainGenTx(cdc *wire.Codec, pk crypto.PubKey) (appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, ...)
- func MakeCodec() *wire.Codec
- func MakeEventManagerCodec() *wire.Codec
- func VersionCmd() *cobra.Command
- type GenesisAccount
- type GenesisAppDeveloper
- type GenesisParam
- type GenesisPool
- type GenesisPools
- type GenesisState
- type LinoBlockchain
Constants ¶
This section is empty.
Variables ¶
var (
DefaultNodeHome = os.ExpandEnv("$HOME/.lino")
)
default home directories for expected binaries
var Version = ""
Functions ¶
func InitCmd ¶ added in v0.2.0
InitCmd initializes all files for tendermint and application XXX(yumin): after upgrade-1, we deprecated previous init function and start to use cosmos gaia init.
func LinoBlockchainGenState ¶
func LinoBlockchainGenState(cdc *wire.Codec, appGenTxs []json.RawMessage) (appState json.RawMessage, err error)
LinoBlockchainGenState - default genesis file
func LinoBlockchainGenTx ¶
func LinoBlockchainGenTx(cdc *wire.Codec, pk crypto.PubKey) ( appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, err error)
LinoBlockchainGenTx - init genesis account
func MakeCodec ¶
MackCodec - codec for application, used by command line tool and authenticate handler
func MakeEventManagerCodec ¶ added in v0.6.0
MakeEventManagerCodec - return a codec that can marshal events.
func VersionCmd ¶ added in v0.4.0
VersionCmd - print current version of binary.
Types ¶
type GenesisAccount ¶
type GenesisAccount struct { Name string `json:"name"` Coin types.Coin `json:"coin"` TxKey crypto.PubKey `json:"tx_key"` SignKey crypto.PubKey `json:"sign_key"` IsValidator bool `json:"is_validator"` ValPubKey crypto.PubKey `json:"validator_pub_key"` }
genesis account will get coin to the address and register user if genesis account is validator, it will be added to validator list automatically
type GenesisAppDeveloper ¶
type GenesisAppDeveloper struct { Name string `json:"name"` Website string `json:"web_site"` Description string `json:"description"` AppMetaData string `json:"app_meta_data"` }
GenesisAppDeveloper - register developer in genesis phase
type GenesisParam ¶
type GenesisParam struct { InitFromConfig bool `json:"init_from_config"` param.GlobalAllocationParam param.VoteParam param.ProposalParam param.DeveloperParam param.ValidatorParam param.CoinDayParam param.BandwidthParam param.AccountParam param.PostParam param.ReputationParam param.PriceParam }
GenesisParam - genesis parameters
type GenesisPool ¶ added in v0.6.0
type GenesisPools ¶ added in v0.6.0
type GenesisPools struct { Pools []GenesisPool `json:"pools"` Total types.Coin `json:"total"` }
func (GenesisPools) IsValid ¶ added in v0.6.0
func (g GenesisPools) IsValid() error
func (GenesisPools) ReservePool ¶ added in v0.6.0
func (g GenesisPools) ReservePool() types.Coin
type GenesisState ¶
type GenesisState struct { LoadPrevStates bool `json:"load_prev_states"` GenesisPools GenesisPools `json:"genesis_pools"` InitCoinPrice types.MiniDollar `json:"init_coin_price"` Accounts []GenesisAccount `json:"accounts"` Developers []GenesisAppDeveloper `json:"developers"` GenesisParam GenesisParam `json:"genesis_param"` }
genesis state for blockchain
type LinoBlockchain ¶
type LinoBlockchain struct { *bam.BaseApp // keys to access the KVStore CapKeyMainStore *sdk.KVStoreKey CapKeyAccountStore *sdk.KVStoreKey CapKeyPostStore *sdk.KVStoreKey CapKeyValStore *sdk.KVStoreKey CapKeyVoteStore *sdk.KVStoreKey CapKeyDeveloperStore *sdk.KVStoreKey CapKeyIBCStore *sdk.KVStoreKey CapKeyGlobalStore *sdk.KVStoreKey CapKeyParamStore *sdk.KVStoreKey CapKeyProposalStore *sdk.KVStoreKey CapKeyReputationV2Store *sdk.KVStoreKey CapKeyBandwidthStore *sdk.KVStoreKey CapKeyPriceStore *sdk.KVStoreKey // contains filtered or unexported fields }
LinoBlockchain - Extended ABCI application
func NewLinoBlockchain ¶
func NewLinoBlockchain( logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptions ...func(*bam.BaseApp)) *LinoBlockchain
NewLinoBlockchain - create a Lino Blockchain instance
func (*LinoBlockchain) ExportAppStateAndValidators ¶
func (lb *LinoBlockchain) ExportAppStateAndValidators() (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
Custom logic for state export
func (*LinoBlockchain) GetHomeDir ¶ added in v0.6.4
func (lb *LinoBlockchain) GetHomeDir() string
func (*LinoBlockchain) ImportFromFiles ¶ added in v0.2.0
func (lb *LinoBlockchain) ImportFromFiles(ctx sdk.Context)
ImportFromFiles Custom logic for state export