testfactory

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// nolint:lll
	TestAccName  = "test-account"
	TestAccMnemo = `` /* 162-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CheckSubArray

func CheckSubArray(txList []types.Tx, subTxList []types.Tx) bool

CheckSubArray returns whether subTxList is a subarray of txList

func DelimLen

func DelimLen(size uint64) int

DelimLen calculates the length of the delimiter for a given unit size

func FundKeyringAccounts

func FundKeyringAccounts(accounts ...string) (keyring.Keyring, []banktypes.Balance, []authtypes.GenesisAccount)

func GenerateAccounts

func GenerateAccounts(count int) []string

func GenerateBlobsWithNamespace

func GenerateBlobsWithNamespace(count int, blobSize int, ns appns.Namespace) []types.Blob

GenerateBlobsWithNamespace generates blobs with namespace ns.

func GenerateKeyring

func GenerateKeyring(accounts ...string) keyring.Keyring

func GenerateRandNamespacedRawData

func GenerateRandNamespacedRawData(count int) (result [][]byte)

GenerateRandNamespacedRawData returns random data of length count. Each chunk of random data is of size shareSize and is prefixed with a random blob namespace.

func GenerateRandomBlob

func GenerateRandomBlob(dataSize int) types.Blob

func GenerateRandomBlobOfShareCount

func GenerateRandomBlobOfShareCount(count int) types.Blob

GenerateRandomBlobOfShareCount returns a blob that spans the given number of shares

func GenerateRandomTxs

func GenerateRandomTxs(count, size int) types.Txs

func GenerateRandomlySizedBlobs

func GenerateRandomlySizedBlobs(count, maxBlobSize int) []types.Blob

func GenerateRandomlySizedTxs

func GenerateRandomlySizedTxs(count, maxSize int) types.Txs

func GetAccountNames added in v1.14.0

func GetAccountNames(keys keyring.Keyring) []string

func GetAddress

func GetAddress(keys keyring.Keyring, account string) sdk.AccAddress

func GetAddresses added in v1.14.0

func GetAddresses(keys keyring.Keyring) []sdk.AccAddress

func GetRandomSubSlice

func GetRandomSubSlice(size int) (start int, length int)

GetRandomSubSlice returns two integers representing a randomly sized range in the interval [0, size]

func QueryWithoutProof

func QueryWithoutProof(clientCtx client.Context, hashHexStr string) (*rpctypes.ResultTx, error)

func RandomAccountNames

func RandomAccountNames(count int) []string

func RandomAddress

func RandomAddress() sdk.Address

func RandomEVMAddress

func RandomEVMAddress() gethcommon.Address

func Repeat

func Repeat[T any](s T, count int) []T

func SortBlobs

func SortBlobs(blobs []types.Blob) []types.Blob

Types

This section is empty.

Jump to

Keyboard shortcuts

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