Documentation ¶
Index ¶
- Variables
- func GetAccountDecoder(cdc *codec.Codec) auth.AccountDecoder
- func MakeCodec() *codec.Codec
- type AppAccount
- type BasecoinApp
- func (app *BasecoinApp) BeginBlocker(_ sdk.Context, _ abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *BasecoinApp) EndBlocker(_ sdk.Context, _ abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *BasecoinApp) ExportAppStateAndValidators() (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- type GenesisAccount
- type GenesisState
Constants ¶
This section is empty.
Variables ¶
var ( DefaultCLIHome = os.ExpandEnv("$HOME/.ocecli") DefaultNodeHome = os.ExpandEnv("$HOME/.oce") )
default home directories for expected binaries
Functions ¶
func GetAccountDecoder ¶
func GetAccountDecoder(cdc *codec.Codec) auth.AccountDecoder
GetAccountDecoder returns the AccountDecoder function for the custom AppAccount.
Types ¶
type AppAccount ¶
type AppAccount struct { auth.BaseAccount Name string `json:"name"` }
AppAccount is a custom extension for this application. It is an example of extending auth.BaseAccount with custom fields. It is compatible with the stock auth.AccountKeeper, since auth.AccountKeeper uses the flexible go-amino library.
func NewAppAccount ¶
func NewAppAccount(name string, baseAcct auth.BaseAccount) *AppAccount
NewAppAccount returns a reference to a new AppAccount given a name and an auth.BaseAccount.
func (*AppAccount) SetName ¶
func (acc *AppAccount) SetName(name string)
type BasecoinApp ¶
BasecoinApp implements an extended ABCI application. It contains a BaseApp, a codec for serialization, KVStore keys for multistore state management, and various mappers and keepers to manage getting, setting, and serializing the integral app types.
func NewBasecoinApp ¶
func NewBasecoinApp(logger log.Logger, db dbm.DB, baseAppOptions ...func(*bam.BaseApp)) *BasecoinApp
NewBasecoinApp returns a reference to a new BasecoinApp given a logger and database. Internally, a codec is created along with all the necessary keys. In addition, all necessary mappers and keepers are created, routes registered, and finally the stores being mounted along with any necessary chain initialization.
func (*BasecoinApp) BeginBlocker ¶
func (app *BasecoinApp) BeginBlocker(_ sdk.Context, _ abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker reflects logic to run before any TXs application are processed by the application.
func (*BasecoinApp) EndBlocker ¶
func (app *BasecoinApp) EndBlocker(_ sdk.Context, _ abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker reflects logic to run after all TXs are processed by the application.
func (*BasecoinApp) ExportAppStateAndValidators ¶
func (app *BasecoinApp) ExportAppStateAndValidators() (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
ExportAppStateAndValidators implements custom application logic that exposes various parts of the application's state and set of validators. An error is returned if any step getting the state or set of validators fails.
type GenesisAccount ¶
type GenesisAccount struct { Name string `json:"name"` Address sdk.AccAddress `json:"address"` Coins sdk.Coins `json:"coins"` }
GenesisAccount reflects a genesis account the application expects in it's genesis state.
func NewGenesisAccount ¶
func NewGenesisAccount(aa *AppAccount) *GenesisAccount
NewGenesisAccount returns a reference to a new GenesisAccount given an AppAccount.
func (*GenesisAccount) ToAppAccount ¶
func (ga *GenesisAccount) ToAppAccount() (acc *AppAccount, err error)
ToAppAccount converts a GenesisAccount to an AppAccount.
type GenesisState ¶
type GenesisState struct {
Accounts []*GenesisAccount `json:"accounts"`
}
GenesisState reflects the genesis state of the application.