Documentation
¶
Index ¶
- Constants
- func ErrDecoding() error
- func ErrInvalidCounter() error
- func IsInvalidCounterErr(err error) bool
- func NewHandler(feeDenom string) sdk.Handler
- func NewTx(valid bool, fee coin.Coins) sdk.Tx
- func SaveState(store state.SimpleDB, state State) error
- func StateKey() []byte
- func StoreActor() sdk.Actor
- type Handler
- func (Handler) AssertDispatcher()
- func (h Handler) CheckTx(ctx sdk.Context, store state.SimpleDB, tx sdk.Tx, _ sdk.Checker) (res sdk.CheckResult, err error)
- func (h Handler) DeliverTx(ctx sdk.Context, store state.SimpleDB, tx sdk.Tx, dispatch sdk.Deliver) (res sdk.DeliverResult, err error)
- func (Handler) Name() string
- type State
- type Tx
Constants ¶
View Source
const ( NameCounter = "cntr" ByteTx = 0x2F //TODO What does this byte represent should use typebytes probably TypeTx = NameCounter + "/count" )
register the tx type with it's validation logic make sure to use the name of the handler as the prefix in the tx type, so it gets routed properly
Variables ¶
This section is empty.
Functions ¶
func ErrDecoding ¶
func ErrDecoding() error
ErrDecoding - This is just a helper function to return a generic "internal error"
func IsInvalidCounterErr ¶
IsInvalidCounterErr - custom error class check
func NewHandler ¶
NewHandler returns a new counter transaction processing handler
func StoreActor ¶
StoreActor - return the basecoin actor for the account
Types ¶
type Handler ¶
type Handler struct { stack.PassInitState stack.PassInitValidate }
Handler the counter transaction processing handler
func (Handler) AssertDispatcher ¶
func (Handler) AssertDispatcher()
AssertDispatcher - placeholder to satisfy XXX
func (Handler) CheckTx ¶
func (h Handler) CheckTx(ctx sdk.Context, store state.SimpleDB, tx sdk.Tx, _ sdk.Checker) (res sdk.CheckResult, err error)
CheckTx checks if the tx is properly structured
type Tx ¶
Tx - struct for all counter transactions
func (Tx) ValidateBasic ¶
ValidateBasic just makes sure the Fee is a valid, non-negative value
Click to show internal directories.
Click to hide internal directories.