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:
Qt
2024-03-08 16:59:11 +00:00
committed by GitHub
co-authored by son trinh Julien Robert
parent 2bf7e9f846
commit 2bfc037a07
24 changed files with 201 additions and 195 deletions
+3 -3
View File
@@ -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
View File
@@ -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
}