Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Name of the module for registering it Name = "eyes" // CostSet is the gas needed for the set operation CostSet uint64 = 10 // CostRemove is the gas needed for the remove operation CostRemove = 10 )
View Source
const ( TypeSet = Name + "/set" TypeRemove = Name + "/remove" ByteSet = 0xF4 ByteRemove = 0xF5 )
nolint
Variables ¶
This section is empty.
Functions ¶
func IsMissingDataErr ¶
func NewRemoveTx ¶
Types ¶
type Data ¶
type Data struct { // SetAt is the block height this was set at SetAt uint64 `json:"set_at"` // Value is the data that was stored. // data.Bytes is like []byte but json encodes as hex not base64 Value data.Bytes `json:"value"` }
Data is the struct we use to store in the merkle tree
type Handler ¶
type Handler struct { sdk.NopInitState sdk.NopInitValidate }
Handler allows us to set and remove data
func (Handler) CheckTx ¶
func (h Handler) CheckTx(ctx sdk.Context, store state.SimpleDB, tx sdk.Tx) (res sdk.CheckResult, err error)
CheckTx verifies if the transaction is properly formated
type RemoveTx ¶
RemoveTx deletes the value at this key, returns old value
func (RemoveTx) ValidateBasic ¶
ValidateBasic makes sure it is valid
type SetTx ¶
SetTx sets a key-value pair
func (SetTx) ValidateBasic ¶
ValidateBasic makes sure it is valid
Click to show internal directories.
Click to hide internal directories.