Documentation ¶
Overview ¶
Package tsdk provides test utilities related to Cosmos SDK
Index ¶
- func DecF(amount float64) sdk.Dec
- func GenerateString(length uint) string
- func KVStore(t *testing.T) types.KVStore
- func NewCodec(registrars ...func(types.InterfaceRegistry)) codec.Codec
- func NewCommitMultiStore(t *testing.T, keys []types.StoreKey, tkeys []types.StoreKey) types.CommitMultiStore
- func NewCtx(t *testing.T, keys []types.StoreKey, tkeys []types.StoreKey) (sdk.Context, types.CommitMultiStore)
- func NewCtxOneStore(t *testing.T, keys types.StoreKey) (sdk.Context, types.CommitMultiStore)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecF ¶
DecF creates a Dec based on a float number. MUST not be used in production code. Can only be used in tests.
func GenerateString ¶ added in v6.5.0
func KVStore ¶
KVStore creates a memory based kv store without commit / wrapping functionality. Useful when sdk.Context is not needed for tests.
func NewCodec ¶
func NewCodec(registrars ...func(types.InterfaceRegistry)) codec.Codec
NewCodec creates Codec instance and registers standard Cosmos SDK interfaces (message interface, tx, pub & private keys) as well as all types provided through the registrar ( typically a RegisterInterfaces function in Cosmos SDK modules)
func NewCommitMultiStore ¶
func NewCommitMultiStore(t *testing.T, keys []types.StoreKey, tkeys []types.StoreKey) types.CommitMultiStore
NewCommitMultiStore creats SDK Multistore
func NewCtx ¶
func NewCtx(t *testing.T, keys []types.StoreKey, tkeys []types.StoreKey) (sdk.Context, types.CommitMultiStore)
NewCtx creates new context with store and mounted store keys and transient store keys.
func NewCtxOneStore ¶
NewCtxOneStore creates new context with only one store key
Types ¶
This section is empty.