tsdk

package
v6.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tsdk provides test utilities related to Cosmos SDK

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecF

func DecF(amount float64) sdk.Dec

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 GenerateString(length uint) string

func KVStore

func KVStore(t *testing.T) types.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

func NewCtxOneStore(t *testing.T, keys types.StoreKey) (sdk.Context, types.CommitMultiStore)

NewCtxOneStore creates new context with only one store key

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL