apptesting

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAcctFunds sdk.Coins = sdk.NewCoins(
	sdk.NewCoin("poppy", sdk.NewInt(1000000000000000)),
	sdk.NewCoin("foo", sdk.NewInt(10000000)),
	sdk.NewCoin("bar", sdk.NewInt(10000000)),
	sdk.NewCoin("baz", sdk.NewInt(10000000)),
)

Functions

func CreateRandomAccounts

func CreateRandomAccounts(numAccts int) []sdk.AccAddress

CreateRandomAccounts is a function return a list of randomly generated AccAddresses

Types

type KeeperTestHelper

type KeeperTestHelper struct {
	suite.Suite

	App         *app.App
	Ctx         sdk.Context
	QueryHelper *baseapp.QueryServiceTestHelper
	TestAccs    []sdk.AccAddress
}

func (*KeeperTestHelper) BuildTx

func (s *KeeperTestHelper) BuildTx(
	txBuilder client.TxBuilder,
	msgs []sdk.Msg,
	sigV2 signing.SignatureV2,
	memo string, txFee sdk.Coins,
	gasLimit uint64,
) authsigning.Tx

func (*KeeperTestHelper) EndBlock

func (s *KeeperTestHelper) EndBlock()

func (*KeeperTestHelper) FundAcc

func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins)

func (*KeeperTestHelper) LockTokens

func (s *KeeperTestHelper) LockTokens(addr sdk.AccAddress, coins sdk.Coins, duration time.Duration) (lockID uint64)

func (*KeeperTestHelper) PrepareBalancerPool

func (suite *KeeperTestHelper) PrepareBalancerPool() uint64

func (*KeeperTestHelper) PrepareBalancerPoolWithPoolAsset

func (suite *KeeperTestHelper) PrepareBalancerPoolWithPoolAsset(assets []balancer.PoolAsset) uint64

func (*KeeperTestHelper) PrepareBalancerPoolWithPoolParams

func (suite *KeeperTestHelper) PrepareBalancerPoolWithPoolParams(poolParams balancer.PoolParams) uint64

func (*KeeperTestHelper) PrepareUni2PoolWithAssets

func (suite *KeeperTestHelper) PrepareUni2PoolWithAssets(asset1, asset2 sdk.Coin) uint64

Returns a Univ2 pool with the initial liquidity being the provided balances

func (*KeeperTestHelper) Setup

func (s *KeeperTestHelper) Setup()

func (*KeeperTestHelper) SetupValidator

func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sdk.ValAddress

Jump to

Keyboard shortcuts

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