amo

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// versions
	AMOAppVersion      = "v1.1.0-dev"
	AMOProtocolVersion = 0x2
)

Variables

This section is empty.

Functions

func FillGenesisState

func FillGenesisState(s *store.Store, genState *GenAmoAppState) error

Types

type AMOApp

type AMOApp struct {
	abci.BaseApplication
	// contains filtered or unexported fields
}

func NewAMOApp

func NewAMOApp(sdb dbm.DB, idb dbm.DB, l log.Logger) *AMOApp

func (*AMOApp) BeginBlock

func (app *AMOApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)

func (*AMOApp) CheckTx

func (app *AMOApp) CheckTx(txBytes []byte) abci.ResponseCheckTx

func (*AMOApp) Commit

func (app *AMOApp) Commit() abci.ResponseCommit

func (*AMOApp) DeliverTx

func (app *AMOApp) DeliverTx(txBytes []byte) abci.ResponseDeliverTx

func (*AMOApp) DistributeReward

func (app *AMOApp) DistributeReward(staker crypto.Address, numTxs int64) error

func (*AMOApp) EndBlock

func (app *AMOApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock)

TODO: use req.Height

func (*AMOApp) Info

func (app *AMOApp) Info(req abci.RequestInfo) (resInfo abci.ResponseInfo)

func (*AMOApp) InitChain

func (app *AMOApp) InitChain(req abci.RequestInitChain) abci.ResponseInitChain

func (*AMOApp) Query

func (app *AMOApp) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)

TODO: return proof also

type GenAccBalance

type GenAccBalance struct {
	Owner  crypto.Address `json:"owner"`
	Amount types.Currency `json:"amount"`
}

type GenAccStake

type GenAccStake struct {
	Holder    crypto.Address `json:"holder"`
	Amount    types.Currency `json:"amount"`
	Validator []byte         `json:"validator"`
}

type GenAmoAppState

type GenAmoAppState struct {
	Balances []GenAccBalance `json:"balances"`
	Stakes   []GenAccStake   `json:"stakes"`
}

func ParseGenesisStateBytes

func ParseGenesisStateBytes(data []byte) (*GenAmoAppState, error)

type State

type State struct {
	Walk int64 `json:"-"` // TODO: remove this
	// contains filtered or unexported fields
}

TODO: use 2-stage state

Directories

Path Synopsis
encoding

Jump to

Keyboard shortcuts

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