docs: update docs (#19676)
Co-authored-by: son trinh <son@decentrio.ventures> Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
son trinh
Julien Robert
parent
2bf7e9f846
commit
2bfc037a07
+3
-3
@@ -89,13 +89,13 @@ func KVStoreHandler(storeKey storetypes.StoreKey) bam.MsgServiceHandler {
|
||||
}
|
||||
}
|
||||
|
||||
// basic KV structure
|
||||
// KV is a basic kv structure
|
||||
type KV struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// What Genesis JSON is formatted as
|
||||
// GenesisJSON what genesis JSON is formatted as
|
||||
type GenesisJSON struct {
|
||||
Values []KV `json:"values"`
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func AppGenStateEmpty(_ *codec.LegacyAmino, _ genutiltypes.AppGenesis, _ []json.
|
||||
return
|
||||
}
|
||||
|
||||
// Manually write the handlers for this custom message
|
||||
// MsgServer manually write the handlers for this custom message
|
||||
type MsgServer interface {
|
||||
Test(ctx context.Context, msg *KVStoreTx) (*sdk.Result, error)
|
||||
}
|
||||
|
||||
+3
-2
@@ -16,7 +16,7 @@ import (
|
||||
txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing"
|
||||
)
|
||||
|
||||
// An sdk.Tx which is its own sdk.Msg.
|
||||
// KVStoreTx is an sdk.Tx which is its own sdk.Msg.
|
||||
type KVStoreTx struct {
|
||||
key []byte
|
||||
value []byte
|
||||
@@ -72,6 +72,7 @@ func (msg *KVStoreTx) Equals(key cryptotypes.PubKey) bool {
|
||||
}
|
||||
|
||||
// dummy implementation of proto.Message
|
||||
|
||||
func (msg *KVStoreTx) Reset() {}
|
||||
func (msg *KVStoreTx) String() string { return "TODO" }
|
||||
func (msg *KVStoreTx) ProtoMessage() {}
|
||||
@@ -110,7 +111,7 @@ func (msg *KVStoreTx) GetSignBytes() []byte {
|
||||
return msg.bytes
|
||||
}
|
||||
|
||||
// Should the app be calling this? Or only handlers?
|
||||
// ValidateBasic should the app be calling this? or only handlers?
|
||||
func (msg *KVStoreTx) ValidateBasic() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user